Git Product home page Git Product logo

tweetstorss's Introduction

What it is

A node.js app that periodically reads a Twitter account and generates an RSS feed from it.

Written by Dave Winer.

Overview

Once it's set up, every minute it gets the most recent tweets for one Twitter account, and writes an RSS file with the content of those tweets.

I've included an example feed in the repo to show you what one looks like.

Set up with Twitter

You need to set four environment variables, to connect this app with Twitter.

To begin, create a new app at apps.twitter.com. From there, you'll need to set environment variables with these four values.

  1. twitterConsumerKey

  2. twitterConsumerSecret

  3. twitterAccessToken

  4. twitterAccessTokenSecret

You can get these values by clicking on the Test OAuth button in apps.twitter.com, as shown in this screen shot.

All four values are shown on that page. Perfect. ;-)

Which Twitter account, where to save the feed

twitterScreenName -- the screen_name of the user whose timeline you want to convert to RSS. Examples of screen names: davewiner, nyt, dsearls, nakedjen.

pathRssFile -- this is the local filesystem path for the file we'll maintain. It's optional, if you don't specify it we write the file as rss.xml in the same folder as the app.

Managing multiple feeds

In version 0.45 I added a feature that allows you to watch more than one Twitter account, producing a separate RSS feed for each.

If there's a file called config.json in the same folder as tweetstorss.js, the app will read it every minute, and use the accounts listed in the file, instead of the twitterScreenName environment variable.

Here's an example of the config.json file that's running on my system.

  1. The folder value says where to store the generated RSS feeds. It can be a relative path as shown in the example, or can be a path from the root of your filesystem.

  2. The items array is a set of objects, each of which specifies a Twitter username and the name of the RSS file created from the account.

Because we read config.json every time we do a scan, you can change the file without having to relaunch tweetstorss.js.

Questions, comments?

Please use the server-snacks list for support.

tweetstorss's People

Contributors

chilace avatar scripting avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.