reallysimple 0.4.11 → 0.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/reallysimple.js +9 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reallysimple",
|
|
3
3
|
"description": "A Node package that reads RSS-like feeds and calls back with a simple, consistent JavaScript object. Easy to use, hides the history.",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.14",
|
|
5
5
|
"author": "Dave Winer <dave@scripting.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
package/reallysimple.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var myProductName = "reallysimple", myVersion = "0.4.
|
|
1
|
+
var myProductName = "reallysimple", myVersion = "0.4.14";
|
|
2
2
|
|
|
3
3
|
exports.readFeed = readFeed;
|
|
4
4
|
exports.convertFeedToOpml = convertFeedToOpml;
|
|
@@ -85,8 +85,7 @@ function convertFeedToOpml (theFeed) { //use this if you want to show an RSS fee
|
|
|
85
85
|
});
|
|
86
86
|
return (opml.stringify (theOutline));
|
|
87
87
|
}
|
|
88
|
-
function convertFeed (oldFeed) {
|
|
89
|
-
|
|
88
|
+
function convertFeed (oldFeed, whenstart) {
|
|
90
89
|
var newFeed = new Object ();
|
|
91
90
|
|
|
92
91
|
function convertOutline (jstruct) {
|
|
@@ -175,6 +174,11 @@ function convertFeed (oldFeed) {
|
|
|
175
174
|
}
|
|
176
175
|
}
|
|
177
176
|
|
|
177
|
+
newFeed.reader = { //7/2/22 by DW
|
|
178
|
+
app: myProductName + " v" + myVersion,
|
|
179
|
+
ctSecsToRead: utils.secondsSince (whenstart)
|
|
180
|
+
};
|
|
181
|
+
|
|
178
182
|
newFeed.items = new Array ();
|
|
179
183
|
oldFeed.items.forEach (function (item) {
|
|
180
184
|
var newItem = new Object ();
|
|
@@ -230,12 +234,13 @@ function convertFeed (oldFeed) {
|
|
|
230
234
|
}
|
|
231
235
|
|
|
232
236
|
function readFeed (url, callback) {
|
|
237
|
+
const whenstart = new Date ();
|
|
233
238
|
davefeedread.parseUrl (url, config.timeOutSecs, function (err, theFeed) {
|
|
234
239
|
if (err) {
|
|
235
240
|
callback (err);
|
|
236
241
|
}
|
|
237
242
|
else {
|
|
238
|
-
callback (undefined, convertFeed (theFeed));
|
|
243
|
+
callback (undefined, convertFeed (theFeed, whenstart));
|
|
239
244
|
}
|
|
240
245
|
});
|
|
241
246
|
}
|