debugging braider
This commit is contained in:
parent
135afa9103
commit
54e2cd5231
@ -3,11 +3,6 @@
|
||||
<component name="issues">
|
||||
<option name="index">
|
||||
<map>
|
||||
<entry key="/Dummy.txt">
|
||||
<value>
|
||||
<set />
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="/a.dummy">
|
||||
<value>
|
||||
<set />
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -3,11 +3,7 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="c2fd5632-2143-4c7e-8b0d-96d7692b700b" name="Default" comment="">
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/rss-braider/lib/RssBraider.js" afterPath="$PROJECT_DIR$/node_modules/rss-braider/lib/RssBraider.js" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/jsLibraryMappings.xml" afterPath="$PROJECT_DIR$/.idea/jsLibraryMappings.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/html/paleo.html" afterPath="$PROJECT_DIR$/html/paleo.html" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/html/paleo.json" afterPath="$PROJECT_DIR$/html/paleo.json" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/html/paleo.xml" afterPath="$PROJECT_DIR$/html/paleo.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/rinser.iml" afterPath="$PROJECT_DIR$/.idea/rinser.iml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lifestyle.js" afterPath="$PROJECT_DIR$/lifestyle.js" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/sonarIssues.xml" afterPath="$PROJECT_DIR$/.idea/sonarIssues.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/vcs.xml" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
@ -51,21 +47,31 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="lifestyle.js" pinned="false" current-in-tab="true">
|
||||
<file leaf-file-name="lifestyle.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lifestyle.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-2.9477353">
|
||||
<caret line="92" column="0" selection-start-line="92" selection-start-column="0" selection-end-line="92" selection-end-column="0" />
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="213" column="29" selection-start-line="213" selection-start-column="29" selection-end-line="213" selection-end-column="29" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="RssBraider.js" pinned="false" current-in-tab="false">
|
||||
<file leaf-file-name="output.txt" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/output.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="1" column="13" selection-start-line="1" selection-start-column="13" selection-end-line="1" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="RssBraider.js" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/node_modules/rss-braider/lib/RssBraider.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-4.8965516">
|
||||
<caret line="133" column="44" selection-start-line="133" selection-start-column="44" selection-end-line="133" selection-end-column="44" />
|
||||
<state vertical-scroll-proportion="0.7357798">
|
||||
<caret line="134" column="39" selection-start-line="134" selection-start-column="39" selection-end-line="134" selection-end-column="39" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@ -111,16 +117,6 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="filter_glasgow.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/plugins/filter_glasgow.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="5" column="18" selection-start-line="5" selection-start-column="18" selection-end-line="5" selection-end-column="18" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="jobs-local.xml" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/jobs-local.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
@ -315,6 +311,116 @@
|
||||
<recent name="D:\dev\rinser" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RestoreUpdateTree" date="Moments ago" ActionInfo="_Update">
|
||||
<UpdatedFiles>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Updated from server" />
|
||||
<option name="myStatusName" value="Changed on server" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="CHANGED_ON_SERVER" />
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Updated" />
|
||||
<option name="myStatusName" value="Changed" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="UPDATED" />
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Created" />
|
||||
<option name="myStatusName" value="Created" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="CREATED" />
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/output.txt</PATH>
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Deleted" />
|
||||
<option name="myStatusName" value="Deleted" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="true" />
|
||||
<option name="myId" value="REMOVED_FROM_REPOSITORY" />
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Restored" />
|
||||
<option name="myStatusName" value="Will be restored" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="RESTORED" />
|
||||
</FILE-GROUP>
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Modified" />
|
||||
<option name="myStatusName" value="Modified" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="MODIFIED" />
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Skipped" />
|
||||
<option name="myStatusName" value="Skipped" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="SKIPPED" />
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Merged with conflicts" />
|
||||
<option name="myStatusName" value="Will be merged with conflicts" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="MERGED_WITH_CONFLICTS" />
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Merged with tree conflicts" />
|
||||
<option name="myStatusName" value="Merged with tree conflicts" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="MERGED_WITH_TREE_CONFLICT" />
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Merged with property conflicts" />
|
||||
<option name="myStatusName" value="Will be merged with property conflicts" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="MERGED_WITH_PROPERTY_CONFLICT" />
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Merged" />
|
||||
<option name="myStatusName" value="Will be merged" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="MERGED" />
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Not in repository" />
|
||||
<option name="myStatusName" value="Not in repository" />
|
||||
<option name="mySupportsDeletion" value="true" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="UNKNOWN" />
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Locally added" />
|
||||
<option name="myStatusName" value="Locally added" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="LOCALLY_ADDED" />
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Locally removed" />
|
||||
<option name="myStatusName" value="Locally removed" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="LOCALLY_REMOVED" />
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Switched" />
|
||||
<option name="myStatusName" value="Switched" />
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="SWITCHED" />
|
||||
</FILE-GROUP>
|
||||
</UpdatedFiles>
|
||||
</component>
|
||||
<component name="RunManager" selected="Node.js.paleo.js">
|
||||
<configuration default="false" name="paleo.js" type="NodeJSConfigurationType" factoryName="Node.js" temporary="true" path-to-node="C:/Program Files/nodejs/node" path-to-js-file="paleo.js" working-dir="$PROJECT_DIR$">
|
||||
<method />
|
||||
@ -378,6 +484,13 @@
|
||||
<option name="number" value="Default" />
|
||||
<updated>1437394742450</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="debugging braider">
|
||||
<created>1438335954140</created>
|
||||
<option name="number" value="00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1438335954140</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="2" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
@ -386,9 +499,10 @@
|
||||
<layout>
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24973656" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="SonarQube" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="SonarQube" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32962137" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32962137" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
@ -727,18 +841,26 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/node_modules/rss-braider/lib/RssBraider.js">
|
||||
<entry file="file://$PROJECT_DIR$/output.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-4.8965516">
|
||||
<caret line="133" column="44" selection-start-line="133" selection-start-column="44" selection-end-line="133" selection-end-column="44" />
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="1" column="13" selection-start-line="1" selection-start-column="13" selection-end-line="1" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lifestyle.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-2.9477353">
|
||||
<caret line="92" column="0" selection-start-line="92" selection-start-column="0" selection-end-line="92" selection-end-column="0" />
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="213" column="29" selection-start-line="213" selection-start-column="29" selection-end-line="213" selection-end-column="29" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/node_modules/rss-braider/lib/RssBraider.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.7357798">
|
||||
<caret line="134" column="39" selection-start-line="134" selection-start-column="39" selection-end-line="134" selection-end-column="39" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
10
lifestyle.js
10
lifestyle.js
@ -209,7 +209,15 @@ rss_braider.processFeed('simple_test_feed', 'json', function (err, data) {
|
||||
return console.log(err);
|
||||
}
|
||||
|
||||
var j = JSON.parse(data);
|
||||
var j;
|
||||
try{
|
||||
j = JSON.parse(data);
|
||||
}catch(e){
|
||||
console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
|
||||
console.log(e);
|
||||
console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
|
||||
}
|
||||
|
||||
var ejsOutput = ejs.compile(str)(j);
|
||||
|
||||
fs.writeFile(__dirname + "/html/" + outputFile + ".json", data, function (err) {
|
||||
|
5
node_modules/rss-braider/lib/RssBraider.js
generated
vendored
5
node_modules/rss-braider/lib/RssBraider.js
generated
vendored
@ -132,7 +132,7 @@ RssBraider.prototype.processFeed = function(feed_name, format, callback)
|
||||
feedparser.on("end", function(){
|
||||
// de-dupe , date sort, and trim this feed's articles and push them into array
|
||||
console.log('** Go for dedupe');
|
||||
console.log(feed.meta.site_url);
|
||||
console.log(source.feed_url);
|
||||
source_articles = self.dedupe(source_articles, self.dedupe_fields);
|
||||
console.log('** Go for dateSort');
|
||||
source_articles = self.date_sort(source_articles);
|
||||
@ -150,7 +150,7 @@ RssBraider.prototype.processFeed = function(feed_name, format, callback)
|
||||
} else {
|
||||
// Final Dedupe step and resort
|
||||
console.log('** ERR Go for dedupe');
|
||||
console.log(feed.meta.site_url);
|
||||
|
||||
feed_articles = self.dedupe(feed_articles, self.dedupe_fields);
|
||||
feed_articles = self.date_sort(feed_articles);
|
||||
|
||||
@ -269,6 +269,7 @@ RssBraider.prototype.dedupe = function(articles_arr, fields){
|
||||
articles_arr.forEach(function(article){
|
||||
var count = 0;
|
||||
fields.forEach(function(field){
|
||||
console.log('---');
|
||||
console.log(field);
|
||||
console.log(uniques[field]);
|
||||
if (!uniques[field]) {
|
||||
|
Loading…
Reference in New Issue
Block a user