From 4cc37c8067bee77d271d3bb578e9f45b722bcb92 Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Tue, 5 Jul 2016 11:16:36 +0100 Subject: [PATCH] updated bored --- bored.js | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/bored.js b/bored.js index e363c24..ccb5c9d 100644 --- a/bored.js +++ b/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!"); + });*/ }); - -