3 lines
1.4 KiB
JavaScript
3 lines
1.4 KiB
JavaScript
var outputFile="paleo",RssBraider=require("rss-braider"),fs=require("fs"),ejs=require("ejs"),read=require("fs").readFileSync,join=require("path").join,str=read(join(__dirname,"/templates/rss.ejs"),"utf8"),feeds={};feeds.simple_test_feed={feed_name:"feed",default_count:1,no_cdata_fields:[],meta:{title:"Paleo",description:"Combined Paleo Feed",site_url:"http://pipes.silvrtree.co.uk/paleo.xml"},plugins:["filter_3_days","fix_images"],sources:[{count:100,feed_url:"http://feeds.feedburner.com/PaleoPlan"},{count:100,feed_url:"http://nomnompaleo.com/rss"},{count:100,feed_url:"http://thepaleodiet.com/feed/"},{count:100,feed_url:"http://paleoleap.com/feed/"},{count:100,feed_url:"http://ultimatepaleoguide.com/feed/"},{count:100,feed_url:"http://elanaspantry.com/feed/"},{count:100,feed_url:"http://feeds.feedburner.com/Paleomg-PaleoRecipes"},{count:100,feed_url:"http://civilizedcavemancooking.com/feed/"}]};var braider_options={feeds:feeds,indent:" ",date_sort_order:"desc",log_level:"warn",dedupe_fields:["guid"],plugins_directories:[__dirname+"/plugins/"]},rss_braider=RssBraider.createClient(braider_options);rss_braider.logger.level("off"),rss_braider.processFeed("simple_test_feed","json",function(e,o){if(e)return console.log(e);{var t=JSON.parse(o);ejs.compile(str)(t)}fs.writeFile(__dirname+"/html/"+outputFile+".json",o,function(e){return e?console.log(e):void console.log("The file was saved!")})});
|
|
//# sourceMappingURL=paleo.min.js.map
|