updated bored
This commit is contained in:
parent
7a5a1de3e3
commit
4cc37c8067
25
bored.js
25
bored.js
@ -1,4 +1,4 @@
|
||||
var outputFile = 'paleo',
|
||||
var outputFile = 'bored',
|
||||
RssBraider = require('rss-braider'),
|
||||
fs = require('fs'),
|
||||
ejs = require('ejs'),
|
||||
@ -42,7 +42,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);
|
||||
}
|
||||
@ -50,16 +50,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 + "/dist/" + outputFile + ".html", ejsOutput, function (err) {
|
||||
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
|
||||
console.log("The file was saved!");
|
||||
});
|
||||
|
||||
fs.writeFile(__dirname + "/dist/" + outputFile + ".json", data, function (err) {
|
||||
fs.writeFile(__dirname + "/dist/" + outputFile + ".json", data, function(err) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
@ -67,6 +58,12 @@ rss_braider.processFeed('simple_test_feed', 'json', function (err, data) {
|
||||
console.log("The file was saved!");
|
||||
});
|
||||
|
||||
/*fs.writeFile(__dirname + "/html/" + outputFile + ".html", ejsOutput, function (err) {
|
||||
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
|
||||
console.log("The file was saved!");
|
||||
});*/
|
||||
});
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user