reallysimple 0.4.29 → 0.5.0
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/readme.md +4 -0
- package/readme.opml +4 -1
- package/reallysimple.js +28 -1
- package/worknotes.md +14 -0
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
|
+
"version": "0.5.0",
|
|
5
5
|
"author": "Dave Winer <dave@scripting.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
package/readme.md
CHANGED
|
@@ -22,6 +22,10 @@ RSS, Atom, and RDF.
|
|
|
22
22
|
|
|
23
23
|
Here's a <a href="http://feeder.scripting.com/returnjson?feedurl=https%3A%2F%2Frss.nytimes.com%2Fservices%2Fxml%2Frss%2Fnyt%2FTheater.xml">demo app</a> that runs a feed through reallySimple.
|
|
24
24
|
|
|
25
|
+
#### tinyFeedReader
|
|
26
|
+
|
|
27
|
+
<a href="https://github.com/scripting/tinyFeedReader">tinyFeedReader</a> is a useful Node app that builds on the reallySimple package.
|
|
28
|
+
|
|
25
29
|
#### What we build on
|
|
26
30
|
|
|
27
31
|
Thanks to Dan MacTough for the <a href="https://www.npmjs.com/package/feedparser">feedparser</a> package.
|
package/readme.opml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<opml version="2.0">
|
|
3
3
|
<head>
|
|
4
4
|
<title>readme.md</title>
|
|
5
|
-
<dateModified>
|
|
5
|
+
<dateModified>Sat, 05 Jul 2025 21:23:25 GMT</dateModified>
|
|
6
6
|
<expansionState></expansionState>
|
|
7
7
|
<vertScrollState>1</vertScrollState>
|
|
8
8
|
<windowTop>300</windowTop>
|
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
<outline created="Thu, 28 Jul 2022 14:15:48 GMT" text="#### Demo">
|
|
29
29
|
<outline created="Thu, 28 Jul 2022 14:15:51 GMT" text="Here's a <a href="http://feeder.scripting.com/returnjson?feedurl=https%3A%2F%2Frss.nytimes.com%2Fservices%2Fxml%2Frss%2Fnyt%2FTheater.xml">demo app</a> that runs a feed through reallySimple. "></outline>
|
|
30
30
|
</outline>
|
|
31
|
+
<outline created="Sat, 05 Jul 2025 21:20:42 GMT" text="#### tinyFeedReader">
|
|
32
|
+
<outline created="Sat, 05 Jul 2025 21:20:48 GMT" text="<a href="https://github.com/scripting/tinyFeedReader">tinyFeedReader</a> is a useful Node app that builds on the reallySimple package."></outline>
|
|
33
|
+
</outline>
|
|
31
34
|
<outline created="Mon, 07 Mar 2022 15:25:06 GMT" text="#### What we build on">
|
|
32
35
|
<outline created="Mon, 07 Mar 2022 15:25:07 GMT" text="Thanks to Dan MacTough for the <a href="https://www.npmjs.com/package/feedparser">feedparser</a> package."></outline>
|
|
33
36
|
</outline>
|
package/reallysimple.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var myProductName = "reallysimple", myVersion = "0.
|
|
1
|
+
var myProductName = "reallysimple", myVersion = "0.5.0";
|
|
2
2
|
|
|
3
3
|
exports.readFeed = readFeed;
|
|
4
4
|
exports.convertFeedToOpml = convertFeedToOpml;
|
|
@@ -174,6 +174,19 @@ function convertFeed (oldFeed, whenstart) {
|
|
|
174
174
|
var linkToSelf = item.meta ["source:self"];
|
|
175
175
|
newFeed.linkToSelf = linkToSelf ["#"];
|
|
176
176
|
}
|
|
177
|
+
if (item.meta ["rss:site"] !== undefined) { //8/22/25 by DW
|
|
178
|
+
const linkToSite = item.meta ["rss:site"];
|
|
179
|
+
const linkToNamespaces = linkToSite ["@"];
|
|
180
|
+
var flFoundNamespace = false;
|
|
181
|
+
for (var x in linkToNamespaces) {
|
|
182
|
+
if (linkToNamespaces [x] == "com-wordpress:feed-additions:1") {
|
|
183
|
+
flFoundNamespace = true;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
if (flFoundNamespace) {
|
|
187
|
+
newFeed.wpSiteId = linkToSite ["#"];
|
|
188
|
+
}
|
|
189
|
+
}
|
|
177
190
|
}
|
|
178
191
|
}
|
|
179
192
|
}
|
|
@@ -261,6 +274,20 @@ function convertFeed (oldFeed, whenstart) {
|
|
|
261
274
|
newItem.markdowntext = markdowntext; //8/25/22 by DW
|
|
262
275
|
}
|
|
263
276
|
|
|
277
|
+
if (item ["rss:post-id"] !== undefined) { //8/22/25 by DW
|
|
278
|
+
const linkToPostId = item ["rss:post-id"];
|
|
279
|
+
const linkToNamespaces = linkToPostId ["@"];
|
|
280
|
+
var flFoundNamespace = false;
|
|
281
|
+
for (var x in linkToNamespaces) {
|
|
282
|
+
if (linkToNamespaces [x] == "com-wordpress:feed-additions:1") {
|
|
283
|
+
flFoundNamespace = true;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
if (flFoundNamespace) {
|
|
287
|
+
newItem.wpPostId = linkToPostId ["#"];
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
264
291
|
newFeed.items.push (newItem);
|
|
265
292
|
});
|
|
266
293
|
|
package/worknotes.md
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
#### 8/22/25; 9:30:06 AM by DW -- v0.5.0
|
|
2
|
+
|
|
3
|
+
We now look for the wordpress site id and post id, if present...
|
|
4
|
+
|
|
5
|
+
* the site id is saved at the top level of the jstruct with the name wpSiteId
|
|
6
|
+
|
|
7
|
+
* the post ide is saved in the item with the name wpPostId
|
|
8
|
+
|
|
9
|
+
This facilitates the Edit This Page function in wordpress editors, such as WordLand.
|
|
10
|
+
|
|
11
|
+
Thought of doing a more general solution, but that'll have to wait until other people are in the loop.
|
|
12
|
+
|
|
1
13
|
#### 5/25/24; 1:36:02 PM by DW
|
|
2
14
|
|
|
3
15
|
Added support for <source:self> element, map it to linkToSelf, the same as atom:link, implemented on 6/15/22.
|
|
4
16
|
|
|
17
|
+
Wrote a <a href="http://scripting.com/2024/05/25.html#a174503">blog post</a> about it.
|
|
18
|
+
|
|
5
19
|
#### 3/14/24; 1:40:38 PM by DW
|
|
6
20
|
|
|
7
21
|
Added support for <source:blogroll>.
|