This commit is contained in:
unknown 2015-07-20 15:26:53 +01:00
parent 5a1cdc5fac
commit a4d725211f
3 changed files with 30 additions and 40 deletions

View File

@ -51,11 +51,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="paleo.js" pinned="false" current-in-tab="true">
<file leaf-file-name="paleo.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/paleo.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.50344825">
<caret line="98" column="26" selection-start-line="98" selection-start-column="26" selection-end-line="98" selection-end-column="26" />
<state vertical-scroll-proportion="0.0">
<caret line="76" column="25" selection-start-line="76" selection-start-column="25" selection-end-line="76" selection-end-column="25" />
<folding />
</state>
</provider>
@ -81,11 +81,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="jobs-local.js" pinned="false" current-in-tab="false">
<file leaf-file-name="jobs-local.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/jobs-local.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="10" column="88" selection-start-line="10" selection-start-column="88" selection-end-line="10" selection-end-column="88" />
<state vertical-scroll-proportion="0.6827586">
<caret line="207" column="25" selection-start-line="207" selection-start-column="25" selection-end-line="207" selection-end-column="25" />
<folding />
</state>
</provider>
@ -142,12 +142,12 @@
<option value="$PROJECT_DIR$/jobs.js" />
<option value="$PROJECT_DIR$/jobs-local.html" />
<option value="$PROJECT_DIR$/plugins/filter_for_local_jobs.js" />
<option value="$PROJECT_DIR$/jobs-local.js" />
<option value="$PROJECT_DIR$/plugins/capitalize_title.js" />
<option value="$PROJECT_DIR$/plugins/filter_glasgow.js" />
<option value="$PROJECT_DIR$/jobs-local.xml" />
<option value="$PROJECT_DIR$/cron.js" />
<option value="$PROJECT_DIR$/paleo.js" />
<option value="$PROJECT_DIR$/jobs-local.js" />
</list>
</option>
</component>
@ -1068,14 +1068,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/jobs-local.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="10" column="88" selection-start-line="10" selection-start-column="88" selection-end-line="10" selection-end-column="88" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/plugins/filter_out_all_articles.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
@ -1142,8 +1134,16 @@
</entry>
<entry file="file://$PROJECT_DIR$/paleo.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.50344825">
<caret line="98" column="26" selection-start-line="98" selection-start-column="26" selection-end-line="98" selection-end-column="26" />
<state vertical-scroll-proportion="0.0">
<caret line="76" column="25" selection-start-line="76" selection-start-column="25" selection-end-line="76" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/jobs-local.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.6827586">
<caret line="207" column="25" selection-start-line="207" selection-start-column="25" selection-end-line="207" selection-end-column="25" />
<folding />
</state>
</provider>

View File

@ -1,4 +1,4 @@
var RssBraider = require('rss-braider'),
var RssBraider = require('rss-braider'), fs = require('fs'),
feeds = {};
// Pull feeds from config files:
@ -190,7 +190,7 @@ var braider_options = {
feeds : feeds,
indent : " ",
date_sort_order : "desc", // Newest first
log_level : "debug",
log_level : "warn",
plugins_directories : [__dirname + "/plugins/"]
};
var rss_braider = RssBraider.createClient(braider_options);
@ -204,5 +204,12 @@ rss_braider.processFeed('simple_test_feed', 'rss', function(err, data){
if (err) {
return console.log(err);
}
console.log(data);
});
// console.log(data);
fs.writeFile("./html/jobs-local.xml", data, function(err) {
if(err) {
return console.log(err);
}
console.log("The file was saved!");
});
});

View File

@ -1,4 +1,4 @@
var RssBraider = require('rss-braider'), fs = require('fs'), CronJob = require('cron').CronJob,
var RssBraider = require('rss-braider'), fs = require('fs'),
feeds = {};
// Pull feeds from config files: ,
@ -74,7 +74,7 @@ rss_braider.processFeed('simple_test_feed', 'rss', function(err, data){
return console.log(err);
}
// console.log(data);
fs.writeFile("./paleo.xml", data, function(err) {
fs.writeFile("./html/paleo.xml", data, function(err) {
if(err) {
return console.log(err);
}
@ -82,20 +82,3 @@ rss_braider.processFeed('simple_test_feed', 'rss', function(err, data){
console.log("The file was saved!");
});
});
var job = new CronJob({
//cronTime: '0 0/60 * 1/1 * ? *',
cronTime: '0 0/5 * 1/1 * ? *',
onTick: function() {
// Runs every hour
console.log('Tick');
},
start: false,
timeZone: "America/Los_Angeles"
});
job.start();