added some to tech
This commit is contained in:
parent
0e22bc7ec4
commit
1b1ad977a0
31
tech.js
31
tech.js
@ -71,9 +71,24 @@ feeds.simple_test_feed = {
|
||||
"feed_url": "https://medium.com/feed/google-developers"
|
||||
},
|
||||
{
|
||||
"count":100,
|
||||
"feed_url":"http://feedproxy.google.com/typepad/alleyinsider/silicon_alley_insider"
|
||||
}]
|
||||
"count": 100,
|
||||
"feed_url": "http://feedproxy.google.com/typepad/alleyinsider/silicon_alley_insider"
|
||||
}
|
||||
|
||||
,
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "http://techcrunch.com/feed/"
|
||||
},
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "http://feeds.venturebeat.com/VentureBeat"
|
||||
},
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "http://feeds2.feedburner.com/thenextweb"
|
||||
}
|
||||
]
|
||||
};
|
||||
var braider_options = {
|
||||
feeds: feeds,
|
||||
@ -88,7 +103,7 @@ var rss_braider = RssBraider.createClient(braider_options);
|
||||
// Override logging level (debug, info, warn, err, off)
|
||||
rss_braider.logger.level('off');
|
||||
|
||||
rss_braider.processFeed('simple_test_feed', 'json', function(err, data) {
|
||||
rss_braider.processFeed('simple_test_feed', 'json', function (err, data) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
@ -96,7 +111,7 @@ rss_braider.processFeed('simple_test_feed', 'json', function(err, data) {
|
||||
var j = JSON.parse(data);
|
||||
var ejsOutput = ejs.compile(str)(j);
|
||||
|
||||
fs.writeFile(__dirname + "/html/" + outputFile + ".html", ejsOutput, function(err) {
|
||||
fs.writeFile(__dirname + "/html/" + outputFile + ".html", ejsOutput, function (err) {
|
||||
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
@ -105,7 +120,7 @@ rss_braider.processFeed('simple_test_feed', 'json', function(err, data) {
|
||||
console.log("The file was saved!");
|
||||
});
|
||||
|
||||
fs.writeFile(__dirname + "/html/" + outputFile + ".json", data, function(err) {
|
||||
fs.writeFile(__dirname + "/html/" + outputFile + ".json", data, function (err) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
@ -114,11 +129,11 @@ rss_braider.processFeed('simple_test_feed', 'json', function(err, data) {
|
||||
});
|
||||
});
|
||||
|
||||
rss_braider.processFeed('simple_test_feed', 'rss', function(err, data) {
|
||||
rss_braider.processFeed('simple_test_feed', 'rss', function (err, data) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
fs.writeFile(__dirname + "/html/" + outputFile + ".xml", data, function(err) {
|
||||
fs.writeFile(__dirname + "/html/" + outputFile + ".xml", data, function (err) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user