reallysimple 0.4.28 → 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 +5 -1
- package/readme.opml +5 -2
- package/reallysimple.js +32 -1
- package/worknotes.md +18 -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# reallysimple
|
|
2
2
|
|
|
3
|
-
A Node package that reads RSS-like feeds and calls back with a simple, consistent JavaScript object. Easy to use, hides the history.
|
|
3
|
+
A <a href="https://www.npmjs.com/package/reallysimple">Node package</a> that reads RSS-like feeds and calls back with a simple, consistent JavaScript object. Easy to use, hides the history.
|
|
4
4
|
|
|
5
5
|
#### Code example
|
|
6
6
|
|
|
@@ -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>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</head>
|
|
13
13
|
<body created="Sat, 05 Mar 2022 16:54:13 GMT" text="readme.md">
|
|
14
14
|
<outline created="Sat, 05 Mar 2022 16:54:15 GMT" text="# reallysimple">
|
|
15
|
-
<outline created="Sat, 11 Jun 2022 15:59:23 GMT" text="A Node package that reads RSS-like feeds and calls back with a simple, consistent JavaScript object. Easy to use, hides the history."></outline>
|
|
15
|
+
<outline created="Sat, 11 Jun 2022 15:59:23 GMT" text="A <a href="https://www.npmjs.com/package/reallysimple">Node package</a> that reads RSS-like feeds and calls back with a simple, consistent JavaScript object. Easy to use, hides the history."></outline>
|
|
16
16
|
</outline>
|
|
17
17
|
<outline created="Sat, 11 Jun 2022 16:24:18 GMT" text="#### Code example">
|
|
18
18
|
<outline created="Sat, 11 Jun 2022 16:20:10 GMT" text="I always like to see the code first..."></outline>
|
|
@@ -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;
|
|
@@ -170,6 +170,23 @@ function convertFeed (oldFeed, whenstart) {
|
|
|
170
170
|
var blogroll = item.meta ["source:blogroll"];
|
|
171
171
|
newFeed.blogroll = blogroll ["#"];
|
|
172
172
|
}
|
|
173
|
+
if (item.meta ["source:self"] !== undefined) { //5/25/24 by DW
|
|
174
|
+
var linkToSelf = item.meta ["source:self"];
|
|
175
|
+
newFeed.linkToSelf = linkToSelf ["#"];
|
|
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
|
+
}
|
|
173
190
|
}
|
|
174
191
|
}
|
|
175
192
|
}
|
|
@@ -257,6 +274,20 @@ function convertFeed (oldFeed, whenstart) {
|
|
|
257
274
|
newItem.markdowntext = markdowntext; //8/25/22 by DW
|
|
258
275
|
}
|
|
259
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
|
+
|
|
260
291
|
newFeed.items.push (newItem);
|
|
261
292
|
});
|
|
262
293
|
|
package/worknotes.md
CHANGED
|
@@ -1,3 +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
|
+
|
|
13
|
+
#### 5/25/24; 1:36:02 PM by DW
|
|
14
|
+
|
|
15
|
+
Added support for <source:self> element, map it to linkToSelf, the same as atom:link, implemented on 6/15/22.
|
|
16
|
+
|
|
17
|
+
Wrote a <a href="http://scripting.com/2024/05/25.html#a174503">blog post</a> about it.
|
|
18
|
+
|
|
1
19
|
#### 3/14/24; 1:40:38 PM by DW
|
|
2
20
|
|
|
3
21
|
Added support for <source:blogroll>.
|