jugo
fuego for JavaScript
Installation
To run jugo, the following must be installed
Once both are installed, run the following to install jugo locally
npm install jugo
Usage
Collection script
To start collecting tweets from your "universe" via the twitter gardenhose, create a script containing the following...
var jugo = ; var J = // start collectingJ;
And then run it as a background process. This will collect tweets as they come in, as well as metadata scraped from the urls. The collection script creates two mongo collections posts
and meta
which contain documents of the following schema...
// example post document url : post_url date : tweetcreated_at account : tweetuserscreen_name followers : tweetuserfollowers_count retweets : tweetretweet_count favorites : tweetfavorite_count // example meta document url : url title : ... // open graph protocol title image : ...// open graph protocol image author : ... // open graph protocol author description : // open graph protocol description date : ... // open graph protocol date
Usage in a web app
Jugo also provides a little wrapper for aggregating and accessing the tweets in the database. For example, in node express application, one might use Jugo as follows...
var jugo = ; var J = ; // open jugo database connection when app startsJ; // database query apiapp