updated tech
This commit is contained in:
parent
39e443ef9e
commit
7de8b566ce
63
bored.js
Normal file
63
bored.js
Normal file
@ -0,0 +1,63 @@
|
||||
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 = {};
|
||||
|
||||
// Pull feeds from config files: ,
|
||||
// feeds.simple_test_feed = require("./config/feed").feed;
|
||||
// Or define in-line
|
||||
|
||||
feeds.simple_test_feed = {
|
||||
"feed_name": "feed",
|
||||
"default_count": 1,
|
||||
"no_cdata_fields": [], // Don't wrap these fields in CDATA tags
|
||||
"meta": {
|
||||
"title": "Bored",
|
||||
"description": "Combined Bored Feed",
|
||||
'site_url': 'http://pipes.silvrtree.co.uk/bored.xml'
|
||||
},
|
||||
"plugins" : ['filter_3_days',"fix_images" ],
|
||||
"sources": [
|
||||
{
|
||||
/* "name" : "JobServe",*/
|
||||
"count": 100,
|
||||
"feed_url": "http://xml.metafilter.com/atom.xml"
|
||||
}
|
||||
]
|
||||
};
|
||||
var braider_options = {
|
||||
feeds: feeds,
|
||||
indent: " ",
|
||||
date_sort_order: "desc", // Newest first
|
||||
log_level: "warn",
|
||||
dedupe_fields: ['guid'],
|
||||
plugins_directories : [__dirname + "/plugins/"]
|
||||
};
|
||||
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) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
|
||||
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!");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
1483
html/tech.html
Normal file
1483
html/tech.html
Normal file
File diff suppressed because one or more lines are too long
2333
html/tech.json
Normal file
2333
html/tech.json
Normal file
File diff suppressed because one or more lines are too long
1946
html/tech.xml
Normal file
1946
html/tech.xml
Normal file
File diff suppressed because one or more lines are too long
118
tech.js
118
tech.js
@ -20,62 +20,56 @@ feeds.simple_test_feed = {
|
||||
"description": "Combined Tech Feed",
|
||||
'site_url': 'http://pipes.silvrtree.co.uk/tech.xml'
|
||||
},
|
||||
"plugins" : ['filter_3_days' ,'fix_images'],
|
||||
"sources": [
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "http://feeds.feedburner.com/lenovoblogs/designmatters"
|
||||
},
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "http://www.engadget.com/rss.xml"
|
||||
}
|
||||
,
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "http://www.computerweekly.com/rss/All-Computer-Weekly-content.xml"
|
||||
},
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "http://winsupersite.com/rss.xml"
|
||||
},
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "https://feeds.feedburner.com/TheGadgeteer"
|
||||
},
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "http://www.wired.com/category/gear/feed/"
|
||||
},
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "https://feeds2.feedburner.com/AndroidCommunity"
|
||||
},
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "https://feeds.feedburner.com/AndroidPolice"
|
||||
},
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "https://feeds.feedburner.com/AndroidPolice"
|
||||
},
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "https://feeds2.feedburner.com/PlanetAndroidCom"
|
||||
},
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "http://www.theverge.com/rss/frontpage"
|
||||
},
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "http://feed.androidauthority.com/"
|
||||
},
|
||||
{
|
||||
"count": 100,
|
||||
"feed_url": "https://feeds.feedburner.com/codinghorror"
|
||||
}
|
||||
]
|
||||
"plugins": ['filter_3_days', 'fix_images'],
|
||||
"sources": [{
|
||||
"count": 100,
|
||||
"feed_url": "http://feeds.feedburner.com/lenovoblogs/designmatters"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "http://www.engadget.com/rss.xml"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "http://www.computerweekly.com/rss/All-Computer-Weekly-content.xml"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "http://winsupersite.com/rss.xml"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "https://feeds.feedburner.com/TheGadgeteer"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "http://www.wired.com/category/gear/feed/"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "https://feeds2.feedburner.com/AndroidCommunity"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "https://feeds.feedburner.com/AndroidPolice"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "https://feeds.feedburner.com/AndroidPolice"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "https://feeds2.feedburner.com/PlanetAndroidCom"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "http://www.theverge.com/rss/frontpage"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "http://feed.androidauthority.com/"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "https://feeds.feedburner.com/codinghorror"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "http://www.androidcentral.com/feed"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "http://www.anandtech.com/rss/"
|
||||
}, {
|
||||
"count": 100,
|
||||
"feed_url": "https://medium.com/feed/google-developers"
|
||||
}]
|
||||
};
|
||||
var braider_options = {
|
||||
feeds: feeds,
|
||||
@ -83,14 +77,14 @@ var braider_options = {
|
||||
date_sort_order: "desc", // Newest first
|
||||
log_level: "warn",
|
||||
dedupe_fields: ['link', 'guid'],
|
||||
plugins_directories : [__dirname + "/plugins/"]
|
||||
plugins_directories: [__dirname + "/plugins/"]
|
||||
};
|
||||
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);
|
||||
}
|
||||
@ -98,7 +92,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 + "/html/" + outputFile + ".html", ejsOutput, function (err) {
|
||||
fs.writeFile(__dirname + "/html/" + outputFile + ".html", ejsOutput, function(err) {
|
||||
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
@ -107,7 +101,7 @@ rss_braider.processFeed('simple_test_feed', 'json', function (err, data) {
|
||||
console.log("The file was saved!");
|
||||
});
|
||||
|
||||
fs.writeFile(__dirname + "/html/" + outputFile + ".json", data, function (err) {
|
||||
fs.writeFile(__dirname + "/html/" + outputFile + ".json", data, function(err) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
@ -116,11 +110,11 @@ rss_braider.processFeed('simple_test_feed', 'json', function (err, data) {
|
||||
});
|
||||
});
|
||||
|
||||
rss_braider.processFeed('simple_test_feed', 'rss', function (err, data) {
|
||||
rss_braider.processFeed('simple_test_feed', 'rss', function(err, data) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
fs.writeFile(__dirname + "/html/" + outputFile + ".xml", data, function (err) {
|
||||
fs.writeFile(__dirname + "/html/" + outputFile + ".xml", data, function(err) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user