reallysimple 0.4.12 → 0.4.15
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 +7 -5
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.15",
|
|
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.15";
|
|
2
2
|
|
|
3
3
|
exports.readFeed = readFeed;
|
|
4
4
|
exports.convertFeedToOpml = convertFeedToOpml;
|
|
@@ -6,6 +6,7 @@ exports.setConfig = setConfig; //6/23/22 by DW
|
|
|
6
6
|
|
|
7
7
|
const utils = require ("daveutils");
|
|
8
8
|
const request = require ("request");
|
|
9
|
+
const process = require ("process");
|
|
9
10
|
const opml = require ("opml");
|
|
10
11
|
const davefeedread = require ("davefeedread");
|
|
11
12
|
|
|
@@ -174,9 +175,9 @@ function convertFeed (oldFeed, whenstart) {
|
|
|
174
175
|
}
|
|
175
176
|
}
|
|
176
177
|
|
|
177
|
-
newFeed.
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
newFeed.reader = { //7/2/22 by DW
|
|
179
|
+
app: myProductName + " v" + myVersion + " (" + process.platform + ")",
|
|
180
|
+
ctSecsToRead: utils.secondsSince (whenstart)
|
|
180
181
|
};
|
|
181
182
|
|
|
182
183
|
newFeed.items = new Array ();
|
|
@@ -234,12 +235,13 @@ function convertFeed (oldFeed, whenstart) {
|
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
function readFeed (url, callback) {
|
|
238
|
+
const whenstart = new Date ();
|
|
237
239
|
davefeedread.parseUrl (url, config.timeOutSecs, function (err, theFeed) {
|
|
238
240
|
if (err) {
|
|
239
241
|
callback (err);
|
|
240
242
|
}
|
|
241
243
|
else {
|
|
242
|
-
callback (undefined, convertFeed (theFeed));
|
|
244
|
+
callback (undefined, convertFeed (theFeed, whenstart));
|
|
243
245
|
}
|
|
244
246
|
});
|
|
245
247
|
}
|