reallysimple 0.4.29 → 0.5.1

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 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.29",
4
+ "version": "0.5.1",
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>Fri, 24 May 2024 12:26:02 GMT</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 &lt;a href=&quot;http://feeder.scripting.com/returnjson?feedurl=https%3A%2F%2Frss.nytimes.com%2Fservices%2Fxml%2Frss%2Fnyt%2FTheater.xml&quot;&gt;demo app&lt;/a&gt; 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="&lt;a href=&quot;https://github.com/scripting/tinyFeedReader&quot;&gt;tinyFeedReader&lt;/a&gt; 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 &lt;a href=&quot;https://www.npmjs.com/package/feedparser&quot;&gt;feedparser&lt;/a&gt; package."></outline>
33
36
  </outline>
package/reallysimple.js CHANGED
@@ -1,4 +1,4 @@
1
- var myProductName = "reallysimple", myVersion = "0.4.29";
1
+ var myProductName = "reallysimple", myVersion = "0.5.1";
2
2
 
3
3
  exports.readFeed = readFeed;
4
4
  exports.convertFeedToOpml = convertFeedToOpml;
@@ -23,6 +23,8 @@ const allowedEnclosureNames = [
23
23
  "url", "type", "length"
24
24
  ];
25
25
 
26
+ const wpNamespace = "com-wordpress:feed-additions:1"; //8/22/25 by DW
27
+
26
28
  var config = {
27
29
  timeOutSecs: 10
28
30
  }
@@ -174,6 +176,19 @@ function convertFeed (oldFeed, whenstart) {
174
176
  var linkToSelf = item.meta ["source:self"];
175
177
  newFeed.linkToSelf = linkToSelf ["#"];
176
178
  }
179
+ if (item.meta ["rss:site"] !== undefined) { //8/22/25 by DW
180
+ const linkToSite = item.meta ["rss:site"];
181
+ const linkToNamespaces = linkToSite ["@"];
182
+ var flFoundNamespace = false;
183
+ for (var x in linkToNamespaces) {
184
+ if (linkToNamespaces [x] == wpNamespace) {
185
+ flFoundNamespace = true;
186
+ }
187
+ }
188
+ if (flFoundNamespace) {
189
+ newFeed.wpSiteId = linkToSite ["#"];
190
+ }
191
+ }
177
192
  }
178
193
  }
179
194
  }
@@ -261,6 +276,20 @@ function convertFeed (oldFeed, whenstart) {
261
276
  newItem.markdowntext = markdowntext; //8/25/22 by DW
262
277
  }
263
278
 
279
+ if (item ["rss:post-id"] !== undefined) { //8/22/25 by DW
280
+ const linkToPostId = item ["rss:post-id"];
281
+ const linkToNamespaces = linkToPostId ["@"];
282
+ var flFoundNamespace = false;
283
+ for (var x in linkToNamespaces) {
284
+ if (linkToNamespaces [x] == wpNamespace) {
285
+ flFoundNamespace = true;
286
+ }
287
+ }
288
+ if (flFoundNamespace) {
289
+ newItem.wpPostId = linkToPostId ["#"];
290
+ }
291
+ }
292
+
264
293
  newFeed.items.push (newItem);
265
294
  });
266
295
 
package/worknotes.md CHANGED
@@ -1,7 +1,21 @@
1
+ #### 8/22/25; 9:30:06 AM by DW -- v0.5.1
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 id 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>.