Make the feeds generate json

This commit is contained in:
unknown 2015-07-27 13:52:34 +01:00
parent bcab492f95
commit 6e76d564ab
2 changed files with 16 additions and 0 deletions

View File

@ -212,6 +212,14 @@ 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 + ".json", data, function (err) {
if (err) {
return console.log(err);
}
console.log("The file was saved!");
});
fs.writeFile(__dirname + "/html/" + outputFile + ".html", ejsOutput, function (err) {
if (err) {

View File

@ -86,6 +86,14 @@ 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 + ".json", data, function (err) {
if (err) {
return console.log(err);
}
console.log("The file was saved!");
});
fs.writeFile(__dirname + "/html/" + outputFile + ".html", ejsOutput, function (err) {
if (err) {