debugging braider

This commit is contained in:
Martin Donnelly 2015-07-31 11:49:19 +01:00
parent b1ac90d447
commit 0c720448ab

View File

@ -205,10 +205,12 @@ var rss_braider = RssBraider.createClient(braider_options);
rss_braider.logger.level('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) {
console.log('A');
if (err) { if (err) {
return console.log(err); return console.log(err);
} }
console.log('B');
var j; var j;
try{ try{
j = JSON.parse(data); j = JSON.parse(data);
@ -218,8 +220,11 @@ rss_braider.processFeed('simple_test_feed', 'json', function (err, data) {
console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'); console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
} }
var ejsOutput = ejs.compile(str)(j); console.log('C');
//var ejsOutput = ejs.compile(str)(j);
console.log('D');
fs.writeFile(__dirname + "/html/" + outputFile + ".json", data, function (err) { fs.writeFile(__dirname + "/html/" + outputFile + ".json", data, function (err) {
if (err) { if (err) {
return console.log(err); return console.log(err);
@ -228,6 +233,7 @@ rss_braider.processFeed('simple_test_feed', 'json', function (err, data) {
console.log("The file was saved!"); console.log("The file was saved!");
}); });
/*fs.writeFile(__dirname + "/html/" + outputFile + ".html", ejsOutput, function (err) { /*fs.writeFile(__dirname + "/html/" + outputFile + ".html", ejsOutput, function (err) {
if (err) { if (err) {