reallysimple 0.4.5 → 0.4.6

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": "Reads an RSS-like feed and calls back with a JavaScript structure, hiding all the history. It really is simple. ;-)",
4
- "version": "0.4.5",
4
+ "version": "0.4.6",
5
5
  "author": "Dave Winer <dave@scripting.com>",
6
6
  "license": "MIT",
7
7
  "files": [
package/readme.md CHANGED
@@ -22,21 +22,9 @@ There probably is a small tradeoff in performance, you can probably write faster
22
22
 
23
23
  Here's how you call the package.
24
24
 
25
- const reallysimple = require ("reallysimple");
25
+ ```javascript
26
26
 
27
- const url = "http://scripting.com/rss.xml";
28
-
29
- reallysimple.readFeed (url, function (err, theFeed) {
30
-
31
- if (!err) {
32
-
33
- console.log ("theFeed == " + JSON.stringify (theFeed));
34
-
35
- }
36
-
37
- }):
38
-
39
- Here's what shows up in the console when you run that code.
27
+ Here's <a href="https://github.com/scripting/reallysimple/blob/main/example/test.json">the file</a> that's created when you run that code.
40
28
 
41
29
  #### What we build on
42
30
 
@@ -48,6 +36,10 @@ This package further simplifies the struct returned by <a href="https://www.npmj
48
36
 
49
37
  #### Work notes
50
38
 
39
+ 4/7/22; 11:37:16 AM by DW
40
+
41
+ Clean up the readme file. Simplify the example app. Review docs. Start to invite collaborators to the repo, still private.
42
+
51
43
  3/21/22; 10:19:22 AM by DW
52
44
 
53
45
  Reviewing the way we represent links in items in the API.
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>Sun, 27 Mar 2022 16:05:47 GMT</dateModified>
5
+ <dateModified>Thu, 07 Apr 2022 15:38:10 GMT</dateModified>
6
6
  <expansionState></expansionState>
7
7
  <vertScrollState>1</vertScrollState>
8
8
  <windowTop>300</windowTop>
@@ -26,16 +26,8 @@
26
26
  </outline>
27
27
  <outline created="Mon, 07 Mar 2022 15:11:02 GMT" text="#### A coding example">
28
28
  <outline created="Mon, 07 Mar 2022 15:11:09 GMT" text="Here's how you call the package."></outline>
29
- <outline created="Mon, 07 Mar 2022 15:12:02 GMT" text="const reallysimple = require (&quot;reallysimple&quot;);"></outline>
30
- <outline created="Mon, 07 Mar 2022 15:12:17 GMT" text="const url = &quot;http://scripting.com/rss.xml&quot;;"></outline>
31
- <outline created="Mon, 07 Mar 2022 15:11:18 GMT" text="reallysimple.readFeed (url, function (err, theFeed) {">
32
- <outline created="Mon, 07 Mar 2022 15:12:40 GMT" text="if (!err) {">
33
- <outline created="Mon, 07 Mar 2022 15:12:44 GMT" text="console.log (&quot;theFeed == &quot; + JSON.stringify (theFeed));"></outline>
34
- <outline created="Mon, 07 Mar 2022 15:13:04 GMT" text="}"></outline>
35
- </outline>
36
- <outline created="Mon, 07 Mar 2022 15:11:54 GMT" text="}):"></outline>
37
- </outline>
38
- <outline created="Mon, 07 Mar 2022 15:10:30 GMT" text="Here's what shows up in the console when you run that code. "></outline>
29
+ <outline text="&lt;%includeExample (&quot;example1&quot;)%&gt;"></outline>
30
+ <outline created="Mon, 07 Mar 2022 15:10:30 GMT" text="Here's &lt;a href=&quot;https://github.com/scripting/reallysimple/blob/main/example/test.json&quot;&gt;the file&lt;/a&gt; that's created when you run that code. "></outline>
39
31
  </outline>
40
32
  <outline created="Mon, 07 Mar 2022 15:25:06 GMT" text="#### What we build on">
41
33
  <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>
@@ -43,6 +35,9 @@
43
35
  <outline created="Thu, 17 Mar 2022 15:46:06 GMT" text="This package further simplifies the struct returned by &lt;a href=&quot;https://www.npmjs.com/package/davefeedread&quot;&gt;davefeedread&lt;/a&gt;."></outline>
44
36
  </outline>
45
37
  <outline created="Sat, 05 Mar 2022 17:30:26 GMT" text="#### Work notes">
38
+ <outline created="Thu, 07 Apr 2022 15:37:15 GMT" text="4/7/22; 11:37:16 AM by DW">
39
+ <outline created="Thu, 07 Apr 2022 15:37:17 GMT" text="Clean up the readme file. Simplify the example app. Review docs. Start to invite collaborators to the repo, still private."></outline>
40
+ </outline>
46
41
  <outline created="Mon, 21 Mar 2022 14:19:22 GMT" text="3/21/22; 10:19:22 AM by DW">
47
42
  <outline created="Mon, 21 Mar 2022 14:19:22 GMT" text="Reviewing the way we represent links in items in the API. "></outline>
48
43
  <outline created="Mon, 21 Mar 2022 14:27:17 GMT" text="The question is this -- how can we get a link to the item from the item. "></outline>
package/reallysimple.js CHANGED
@@ -1,4 +1,4 @@
1
- var myProductName = "reallysimple"; myVersion = "0.4.5";
1
+ var myProductName = "reallysimple"; myVersion = "0.4.6";
2
2
 
3
3
  exports.readFeed = readFeed;
4
4
  exports.convertFeedToOpml = convertFeedToOpml;
@@ -150,8 +150,10 @@ function convertFeed (oldFeed) {
150
150
 
151
151
  getHeadValuesFromFirstItem (); //3/6/22 by DW
152
152
 
153
- if (isEmptyObject (newFeed.image)) {
154
- delete newFeed.image;
153
+ if (newFeed.image !== undefined) { //5/17/22 by DW
154
+ if (isEmptyObject (newFeed.image)) {
155
+ delete newFeed.image;
156
+ }
155
157
  }
156
158
 
157
159
  newFeed.items = new Array ();
@@ -182,8 +184,10 @@ function convertFeed (oldFeed) {
182
184
  }
183
185
  }
184
186
  newItem.guid = getItemPermalink (item);
185
- if (isEmptyObject (newItem.source)) {
186
- delete newItem.source;
187
+ if (newItem.source !== undefined) { //5/17/22 by DW
188
+ if (isEmptyObject (newItem.source)) {
189
+ delete newItem.source;
190
+ }
187
191
  }
188
192
  newFeed.items.push (newItem);
189
193
  });