Skip to content

Commit

Permalink
v0.88
Browse files Browse the repository at this point in the history
  • Loading branch information
scripting committed Jun 17, 2014
1 parent 5bbf78f commit 43f2e31
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 5 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -77,6 +77,12 @@ Specifically thanks to Dan for writing the excellent <a href="https://github.com

#### Changes

##### v0.88 -- 6/17/14 by DW

A subscription list can now contain an include node, so you can have a list of lists. Full explanation in this <a href="http://river4.smallpict.com/2014/06/17/river4V088.html">blog post</a>.

Changed the package.json file to require Node v0.8.x. Previously it was 0.6.x. This should make it possible to deploy on Nodejitsu without modification, per <a href="https://groups.google.com/d/msg/river4/r8kSLjfZo6Q/msXpBg_6zG0J">Dave Seidel's report</a>.

##### v0.87 -- 6/09/14 by DW

Fixed a bug that would cause River4 to crash when processing an item with a null title.
Expand Down
60 changes: 57 additions & 3 deletions opml/river4.opml
@@ -1,5 +1,5 @@
<?xml encoding="ISO-8859-1" version="1.0"?>
<!-- OPML generated by OPML Editor v0.75 on 6/9/14; 11:36:55 AM -->
<!-- OPML generated by OPML Editor v0.75 on 6/17/14; 1:43:19 PM -->
<opml version="2.0">
<head>
<title>river4.js</title>
Expand All @@ -11,7 +11,7 @@
<windowRight>1500</windowRight>
</head>
<body text="river4.js">
<outline text="var myVersion = &quot;0.87&quot;, myProductName = &quot;River4&quot;, flRunningOnServer = true;"></outline>
<outline text="var myVersion = &quot;0.88&quot;, myProductName = &quot;River4&quot;, flRunningOnServer = true;"></outline>
<outline text=""></outline>
<outline isComment="true" text="notes, building, testing">
<outline text="npm install MD5"></outline>
Expand All @@ -21,7 +21,7 @@
<outline text="heroku config:set s3path=/tmp.fargo.io/river4/"></outline>
<outline text=""></outline>
<outline text="workspace.river4builder.script ()">
<outline isComment="true" text="&quot;6/9/14; 8:10:09 AM&quot;"></outline>
<outline isComment="true" text="&quot;6/9/14; 11:37:26 AM&quot;"></outline>
</outline>
<outline text=""></outline>
<outline text="testing">
Expand Down Expand Up @@ -1111,6 +1111,49 @@
<outline text="}"></outline>
</outline>
<outline text=""></outline>
<outline text="function readIncludedList (listname, urloutline) { //6/17/14 by DW">
<outline text="var req = request (urloutline);"></outline>
<outline text="var opmlparser = new OpmlParser ();"></outline>
<outline text=""></outline>
<outline text="console.log (&quot;readIncludedList: listname == &quot; + listname + &quot;, urloutline == &quot; + urloutline);"></outline>
<outline text=""></outline>
<outline text="req.on (&quot;response&quot;, function (res) {">
<outline text="var stream = this;"></outline>
<outline text="if (res.statusCode == 200) {">
<outline text="stream.pipe (opmlparser);"></outline>
<outline text="}"></outline>
</outline>
<outline text="});"></outline>
</outline>
<outline text="req.on (&quot;error&quot;, function (res) {">
<outline text="});"></outline>
</outline>
<outline text="opmlparser.on (&quot;error&quot;, function (error) {">
<outline text="console.log (&quot;readIncludedList: opml parser error == &quot; + error.message);"></outline>
<outline text="});"></outline>
</outline>
<outline text="opmlparser.on (&quot;readable&quot;, function () {">
<outline text="var outline;"></outline>
<outline text="while (outline = this.read ()) {">
<outline text="var type = outline [&quot;#type&quot;];"></outline>
<outline text="if (type == &quot;feed&quot;) {">
<outline text="if ((outline.xmlurl != undefined) &amp;&amp; (outline.xmlurl.length &gt; 0)) { //6/9/14 by DW">
<outline text="addToFeedsArray (outline.xmlurl, outline, listname); "></outline>
<outline text="addToFeedsInLists (outline.xmlurl); //5/30/14 by DW"></outline>
<outline text="}"></outline>
</outline>
<outline text="}"></outline>
</outline>
<outline text="}"></outline>
</outline>
<outline text="});"></outline>
</outline>
<outline text="opmlparser.on (&quot;end&quot;, function () {">
<outline text="});"></outline>
</outline>
<outline text="}"></outline>
</outline>
<outline text=""></outline>
<outline text="function readOneList (listname, filepath) {">
<outline text="console.log (&quot;readOneList: listname == &quot; + listname + &quot;, filepath == &quot; + filepath);"></outline>
<outline text="var opmlparser = new OpmlParser ();"></outline>
Expand All @@ -1126,6 +1169,7 @@
<outline text="var outline;"></outline>
<outline text="while (outline = this.read ()) {">
<outline text="var type = outline [&quot;#type&quot;];"></outline>
<outline text=""></outline>
<outline text="if (type == &quot;feed&quot;) {">
<outline text="if ((outline.xmlurl != undefined) &amp;&amp; (outline.xmlurl.length &gt; 0)) { //6/9/14 by DW">
<outline text="addToFeedsArray (outline.xmlurl, outline, listname); "></outline>
Expand All @@ -1134,6 +1178,16 @@
</outline>
<outline text="}"></outline>
</outline>
<outline text="else { //6/17/14 by DW">
<outline text="if (outline.type != undefined) {">
<outline text="if (outline.type == &quot;include&quot;) {">
<outline text="qAddTask (&quot;readIncludedList (\&quot;&quot; + listname + &quot;\&quot;, \&quot;&quot; + outline.url + &quot;\&quot;)&quot;);"></outline>
<outline text="}"></outline>
</outline>
<outline text="}"></outline>
</outline>
<outline text="}"></outline>
</outline>
<outline text="}"></outline>
</outline>
<outline text="});"></outline>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -16,6 +16,6 @@
},
"license": "GPL",
"engines": {
"node": "0.6.x"
"node": "0.8.x"
}
}
43 changes: 42 additions & 1 deletion river4.js
@@ -1,4 +1,4 @@
var myVersion = "0.87", myProductName = "River4", flRunningOnServer = true;
var myVersion = "0.88", myProductName = "River4", flRunningOnServer = true;


var http = require ("http");
Expand Down Expand Up @@ -1420,6 +1420,39 @@ function readFeed (urlfeed) {
});
}

function readIncludedList (listname, urloutline) { //6/17/14 by DW
var req = request (urloutline);
var opmlparser = new OpmlParser ();

console.log ("readIncludedList: listname == " + listname + ", urloutline == " + urloutline);

req.on ("response", function (res) {
var stream = this;
if (res.statusCode == 200) {
stream.pipe (opmlparser);
}
});
req.on ("error", function (res) {
});
opmlparser.on ("error", function (error) {
console.log ("readIncludedList: opml parser error == " + error.message);
});
opmlparser.on ("readable", function () {
var outline;
while (outline = this.read ()) {
var type = outline ["#type"];
if (type == "feed") {
if ((outline.xmlurl != undefined) && (outline.xmlurl.length > 0)) { //6/9/14 by DW
addToFeedsArray (outline.xmlurl, outline, listname);
addToFeedsInLists (outline.xmlurl); //5/30/14 by DW
}
}
}
});
opmlparser.on ("end", function () {
});
}

function readOneList (listname, filepath) {
console.log ("readOneList: listname == " + listname + ", filepath == " + filepath);
var opmlparser = new OpmlParser ();
Expand All @@ -1432,12 +1465,20 @@ function readOneList (listname, filepath) {
var outline;
while (outline = this.read ()) {
var type = outline ["#type"];

if (type == "feed") {
if ((outline.xmlurl != undefined) && (outline.xmlurl.length > 0)) { //6/9/14 by DW
addToFeedsArray (outline.xmlurl, outline, listname);
addToFeedsInLists (outline.xmlurl); //5/30/14 by DW
}
}
else { //6/17/14 by DW
if (outline.type != undefined) {
if (outline.type == "include") {
qAddTask ("readIncludedList (\"" + listname + "\", \"" + outline.url + "\")");
}
}
}
}
});
opmlparser.on ("end", function () {
Expand Down

0 comments on commit 43f2e31

Please sign in to comment.