Giter VIP home page Giter VIP logo

twittersifter's Introduction

Twitter Sifter

This is a simple node app for watching and hearing tweets.

Setting things up

1. Make sure you have node installed for your operating system - you can get it from https://nodejs.org/en/download/

2. With npm (which is installed with node), install bower and grunt:

npm install -g bower

npm install -g grunt-cli

3. Download the needed node/bower components (these will take a few minutes to complete):

npm install

bower install

4. Create config.js

Create a file config.js in the main directory that contains your twitter keys:

  module.exports = {
     "consumer_secret": "your-twitter-consumer-secret",
     "consumer_key": "your-twitter-consumer-key",
     "access_token": "your-twitter-access-token",
     "access_token_secret": "your-twitter-access-secret"
   };

You can get these by creating an "app" at twitter at https://apps.twitter.com/

Don't commit config.js to a public repository!

5. Build the web app side of things

grunt

Do this any time you modify files in the public directory.

It puts everything needed for the web side in public_dist (creating public_dist if necessary).

6. Start the server portion

In a command window, start the server portion

node twittersifter.js --track hello,hi

The example above will catch tweets that contain "hello" or "hi". You can also omit --track and then set terms from the client.

7. Watch and Listen to Tweets

Open a browser using web address http://localhost:8080

By default, the tweets are "colorified" based on how BeeLine does this - this simply gradually changes the color of each character from red to black to blue to black to red. This may improve readability for fast-moving text, but other options need to be explored (for example, maybe color parts of speech certain ways). This can be disabled in the current settings.

"Interesting" Tweets

This currently uses Cynthia Whissel's "dictionary with imagery", where words were assigned pleasantness, activation, and imagery scores. This dictionary is used here with permission of C. Whissel. Commercial use of this dictionary is not permitted. Check with C. Whissel at [email protected] regarding such uses of her dictionary.

If you want to try different approaches for what "interesting" means, just tweak the method ponderTweet in the file pondertweeets.js. This is a web worker that is passed the tweet content for every tweet received, and can send those tweets it finds "interesting" back to the main page via the method sendBackInterestingTweet.

twittersifter's People

Contributors

nowherenearithaca avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

twittersifter's Issues

Node express issue? Sometimes browser gets "cannot GET /"

#6 might be either an issue with a slower machine coupled with search terms that have generally have lots of tweets going on. Just recently I noticed this happening after not seeing it happen in a long time (and no changes to the relevant code).

Browser just shows:

Cannot GET /

It looks like an older version of things works fine, so something in one of the updated node packages might be causing this.

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.