Skip to content

Commit

Permalink
Console log as of now
Browse files Browse the repository at this point in the history
  • Loading branch information
hemanth committed Jun 21, 2012
1 parent 88c4ecc commit 051c6c4
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions rsj.js
@@ -1,22 +1,18 @@
exports.r2j = r2j;

var FeedParser = require('feedparser')
, parser

parser = new FeedParser();

jss = [];
function toJSON(err, meta, articles){
if(err) console.error(err);
else {
articles.forEach(function (article) {
jss.push(JSON.stringify(article));
});
}
if(err) return console.error(err);
console.log(JSON.stringify(articles));
}

var rsj = function (uri){
function r2j (uri,cb){
parser.parseUrl(uri,toJSON);
return jss;
}

exports.rsj = rsj;

//function rsj(uri,cb){ ... .parseUri(... function callback(){ cb(JSON.stringify(articles)) } ) }

0 comments on commit 051c6c4

Please sign in to comment.