Skip to content

Commit

Permalink
v0.4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
scripting committed Oct 18, 2021
1 parent f7f63a7 commit 231bb89
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 51 deletions.
5 changes: 4 additions & 1 deletion drummercms.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var myVersion = "0.4.7", myProductName = "drummerCms";
var myVersion = "0.4.8", myProductName = "drummerCms";

const fs = require ("fs");
const request = require ("request");
Expand Down Expand Up @@ -70,6 +70,7 @@ function initBlogConfig (blogName, urlOpml, basePath, baseUrl, theOutline, callb
var urlTemplate = getValueFromOpmlHead ("urlTemplate", config.defaultTemplate);
var urlHomePageTemplate = getValueFromOpmlHead ("urlHomePageTemplate", undefined);
var urlGlossary = getValueFromOpmlHead ("urlGlossary", undefined);
var urlAboutOpml = getValueFromOpmlHead ("urlAboutOpml", undefined); //10/18/21 by DW
var timeZoneOffset = getValueFromOpmlHead ("timeZoneOffset", undefined); //10/13/21 by DW

baseUrl = getValueFromOpmlHead ("urlBlogWebsite", baseUrl); //10/13/21 by DW
Expand Down Expand Up @@ -110,6 +111,7 @@ function initBlogConfig (blogName, urlOpml, basePath, baseUrl, theOutline, callb
flUploadItemsToS3: true,
flIncludeImageInMetadata: true,
urlGlossaryOpml: urlGlossary,
urlAboutOpml, //10/18/21 by DW
flGoogleAnalytics: false,
flAlwaysBuildHomePage: true, //8/23/21 by DW
flOldSchoolUseCache, //8/30/21 by DW
Expand All @@ -129,6 +131,7 @@ function initBlogConfig (blogName, urlOpml, basePath, baseUrl, theOutline, callb
theConfig.urlHeaderImage = urlHeaderImage;
theConfig.copyright = copyright;
theConfig.urlGlossaryOpml = urlGlossary;
theConfig.urlAboutOpml = urlAboutOpml; //10/18/21 by DW
copyAllHeadElements ();
callback (theConfig);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "drummercms",
"version": "0.4.7",
"version": "0.4.8",
"author": "Dave Winer <dave@scripting.com>",
"license": "MIT",
"repository": {
Expand Down
84 changes: 53 additions & 31 deletions source.opml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- OPML generated by OPML Editor v10.1b19 on Thu, 14 Oct 2021 14:06:16 GMT -->
<!-- OPML generated by OPML Editor v10.1b19 on Mon, 18 Oct 2021 16:19:29 GMT -->
<opml version="2.0">
<head>
<title>nodeEditor: drummerCms</title>
<dateCreated>Tue, 10 Aug 2021 15:43:25 GMT</dateCreated>
<dateModified>Thu, 14 Oct 2021 14:06:15 GMT</dateModified>
<dateModified>Mon, 18 Oct 2021 16:19:29 GMT</dateModified>
<ownerName>Dave Winer</ownerName>
<ownerId>http://davewiner.com/</ownerId>
<expansionState>1, 2, 3, 6, 22, 23, 26, 63, 65, 72, 73, 75, 77, 83, 84, 85, 87, 95, 96, 103</expansionState>
<vertScrollState>43</vertScrollState>
<windowTop>137</windowTop>
<windowLeft>912</windowLeft>
<windowBottom>1226</windowBottom>
<windowRight>2138</windowRight>
<expansionState>1, 3, 4, 14, 30, 50, 54, 106, 113, 114, 117, 118, 134, 135, 136, 139, 144, 155, 159, 196, 219, 221</expansionState>
<vertScrollState>110</vertScrollState>
<windowTop>55</windowTop>
<windowLeft>640</windowLeft>
<windowBottom>1144</windowBottom>
<windowRight>1866</windowRight>
</head>
<body>
<outline text="/scripting.com/code/drummercms/">
Expand All @@ -24,7 +24,7 @@
<outline text="package.json" created="Mon, 09 Aug 2021 15:13:53 GMT">
<outline text="{">
<outline text="&quot;name&quot;: &quot;drummercms&quot;,"/>
<outline text="&quot;version&quot;: &quot;0.4.7&quot;,"/>
<outline text="&quot;version&quot;: &quot;0.4.8&quot;,"/>
<outline text="&quot;author&quot;: &quot;Dave Winer &lt;dave@scripting.com&gt;&quot;,"/>
<outline text="&quot;license&quot;: &quot;MIT&quot;,"/>
<outline text="&quot;repository&quot;: {">
Expand All @@ -49,7 +49,7 @@
</outline>
</outline>
<outline text="drummercms.js">
<outline text="var myVersion = &quot;0.4.7&quot;, myProductName = &quot;drummerCms&quot;; " created="Mon, 03 Feb 2014 03:21:03 GMT" pgfnum="36831"/>
<outline text="var myVersion = &quot;0.4.8&quot;, myProductName = &quot;drummerCms&quot;; " created="Mon, 03 Feb 2014 03:21:03 GMT" pgfnum="36831"/>
<outline text="" created="Tue, 10 Aug 2021 14:57:54 GMT"/>
<outline text="const fs = require (&quot;fs&quot;); "/>
<outline text="const request = require (&quot;request&quot;); "/>
Expand Down Expand Up @@ -160,6 +160,7 @@
<outline text="var urlTemplate = getValueFromOpmlHead (&quot;urlTemplate&quot;, config.defaultTemplate);" created="Tue, 10 Aug 2021 14:53:40 GMT"/>
<outline text="var urlHomePageTemplate = getValueFromOpmlHead (&quot;urlHomePageTemplate&quot;, undefined);" created="Tue, 10 Aug 2021 14:53:40 GMT"/>
<outline text="var urlGlossary = getValueFromOpmlHead (&quot;urlGlossary&quot;, undefined);" created="Tue, 10 Aug 2021 14:53:40 GMT"/>
<outline text="var urlAboutOpml = getValueFromOpmlHead (&quot;urlAboutOpml&quot;, undefined); //10/18/21 by DW" created="Tue, 10 Aug 2021 14:53:40 GMT"/>
<outline text="var timeZoneOffset = getValueFromOpmlHead (&quot;timeZoneOffset&quot;, undefined); //10/13/21 by DW" created="Tue, 10 Aug 2021 14:53:40 GMT"/>
<outline text="" created="Wed, 13 Oct 2021 14:50:49 GMT"/>
<outline text="baseUrl = getValueFromOpmlHead (&quot;urlBlogWebsite&quot;, baseUrl); //10/13/21 by DW" created="Wed, 13 Oct 2021 14:50:50 GMT"/>
Expand Down Expand Up @@ -205,6 +206,7 @@
<outline text="flUploadItemsToS3: true,"/>
<outline text="flIncludeImageInMetadata: true,"/>
<outline text="urlGlossaryOpml: urlGlossary,"/>
<outline text="urlAboutOpml, //10/18/21 by DW" created="Mon, 18 Oct 2021 14:44:40 GMT"/>
<outline text="flGoogleAnalytics: false,"/>
<outline text="flAlwaysBuildHomePage: true, //8/23/21 by DW" created="Mon, 23 Aug 2021 16:10:48 GMT"/>
<outline text="flOldSchoolUseCache, //8/30/21 by DW" created="Mon, 30 Aug 2021 17:15:30 GMT"/>
Expand All @@ -227,6 +229,7 @@
<outline text="theConfig.urlHeaderImage = urlHeaderImage;" created="Tue, 10 Aug 2021 19:58:55 GMT"/>
<outline text="theConfig.copyright = copyright;" created="Tue, 10 Aug 2021 19:58:55 GMT"/>
<outline text="theConfig.urlGlossaryOpml = urlGlossary;" created="Tue, 10 Aug 2021 19:58:55 GMT"/>
<outline text="theConfig.urlAboutOpml = urlAboutOpml; //10/18/21 by DW" created="Tue, 10 Aug 2021 19:58:55 GMT"/>
<outline text="copyAllHeadElements ();" created="Wed, 11 Aug 2021 19:23:13 GMT"/>
<outline text="callback (theConfig);" created="Tue, 10 Aug 2021 15:27:39 GMT"/>
<outline text="}" created="Tue, 10 Aug 2021 15:27:52 GMT"/>
Expand Down Expand Up @@ -1726,6 +1729,27 @@
<outline text="}" created="Wed, 01 Sep 2021 20:21:45 GMT"/>
</outline>
<outline text="function viewAboutTab (callback) {" created="Wed, 01 Sep 2021 20:21:34 GMT">
<outline text="Changes" isComment="true" created="Mon, 18 Oct 2021 15:53:06 GMT">
<outline text="10/18/21; 11:53:10 AM by DW" created="Mon, 18 Oct 2021 15:53:09 GMT">
<outline text="If a global aboutOutline is defined, use that instead of reading the outline over HTTP." created="Mon, 18 Oct 2021 15:53:11 GMT"/>
</outline>
</outline>
<outline text="" created="Mon, 18 Oct 2021 15:53:06 GMT"/>
<outline text="function processOutlineStruct (theOutline) {" created="Mon, 18 Oct 2021 15:53:52 GMT">
<outline text="var outlineBody = theOutline.opml.body;" created="Thu, 02 Sep 2021 14:05:54 GMT"/>
<outline text="outlineBody.text = opmlHead.title;" isComment="true" created="Thu, 02 Sep 2021 14:06:08 GMT"/>
<outline text="var htmltext = renderOutlineBrowser (outlineBody, false, undefined, undefined, true);"/>
<outline text="" created="Thu, 02 Sep 2021 14:05:54 GMT"/>
<outline text="readGlossary (opmlHead.urlGlossary, function (theGlossary) {" created="Fri, 10 Sep 2021 13:43:42 GMT">
<outline text="htmltext = multipleReplaceAll (htmltext, theGlossary);"/>
<outline text="htmltext = safeEmojiProcess (htmltext);"/>
<outline text="setTabContent (htmltext);" created="Wed, 01 Sep 2021 20:21:52 GMT"/>
<outline text="callback (true);" created="Thu, 02 Sep 2021 13:41:28 GMT"/>
<outline text="});" created="Fri, 10 Sep 2021 13:44:04 GMT"/>
</outline>
<outline text="}" created="Mon, 18 Oct 2021 15:54:05 GMT"/>
</outline>
<outline text="" created="Mon, 18 Oct 2021 15:53:52 GMT"/>
<outline text="function safeEmojiProcess (s) {" created="Sat, 11 Sep 2021 13:19:33 GMT">
<outline text="Changes" isComment="true" created="Sat, 11 Sep 2021 13:19:45 GMT">
<outline text="9/11/21; 9:21:17 AM by DW" created="Sat, 11 Sep 2021 13:21:16 GMT">
Expand All @@ -1744,28 +1768,26 @@
<outline text="}" created="Sat, 11 Sep 2021 13:19:44 GMT"/>
</outline>
<outline text="setTabContent (&quot;&quot;); //wipe out the blog html before user sees it" created="Wed, 01 Sep 2021 20:21:52 GMT"/>
<outline text="readHttpFileThruProxy (opmlHead.urlAboutOpml, undefined, function (opmltext) {">
<outline text="if (opmltext !== undefined) {" created="Fri, 02 Jul 2021 20:57:28 GMT">
<outline text="var theOutline = opml.parse (opmltext);" created="Fri, 02 Jul 2021 20:57:53 GMT"/>
<outline text="" created="Thu, 02 Sep 2021 14:05:54 GMT"/>
<outline text="var outlineBody = theOutline.opml.body;" created="Thu, 02 Sep 2021 14:05:54 GMT"/>
<outline text="outlineBody.text = opmlHead.title;" isComment="true" created="Thu, 02 Sep 2021 14:06:08 GMT"/>
<outline text="var htmltext = renderOutlineBrowser (outlineBody, false, undefined, undefined, true);"/>
<outline text="" created="Thu, 02 Sep 2021 14:05:54 GMT"/>
<outline text="readGlossary (opmlHead.urlGlossary, function (theGlossary) {" created="Fri, 10 Sep 2021 13:43:42 GMT">
<outline text="htmltext = multipleReplaceAll (htmltext, theGlossary);"/>
<outline text="htmltext = safeEmojiProcess (htmltext);"/>
<outline text="setTabContent (htmltext);" created="Wed, 01 Sep 2021 20:21:52 GMT"/>
<outline text="callback (true);" created="Thu, 02 Sep 2021 13:41:28 GMT"/>
<outline text="});" created="Fri, 10 Sep 2021 13:44:04 GMT"/>
<outline text="" created="Mon, 18 Oct 2021 15:55:54 GMT"/>
<outline text="if (aboutOutline !== undefined) { //10/18/21 by DW" created="Mon, 18 Oct 2021 15:55:54 GMT">
<outline text="console.log (&quot;viewAboutTab: using the pre-built aboutOutline.&quot;);" created="Mon, 18 Oct 2021 15:59:38 GMT"/>
<outline text="processOutlineStruct (aboutOutline)" created="Mon, 18 Oct 2021 15:56:35 GMT"/>
<outline text="}" created="Mon, 18 Oct 2021 15:55:59 GMT"/>
</outline>
<outline text="else {" created="Mon, 18 Oct 2021 15:56:00 GMT">
<outline text="readHttpFileThruProxy (opmlHead.urlAboutOpml, undefined, function (opmltext) {">
<outline text="if (opmltext !== undefined) {" created="Fri, 02 Jul 2021 20:57:28 GMT">
<outline text="var theOutline = opml.parse (opmltext);" created="Fri, 02 Jul 2021 20:57:53 GMT"/>
<outline text="processOutlineStruct (theOutline);" created="Thu, 02 Sep 2021 14:05:54 GMT"/>
<outline text="}" created="Fri, 02 Jul 2021 20:57:39 GMT"/>
</outline>
<outline text="}" created="Fri, 02 Jul 2021 20:57:39 GMT"/>
</outline>
<outline text="else {" created="Thu, 02 Sep 2021 13:41:39 GMT">
<outline text="callback (false);" created="Thu, 02 Sep 2021 13:41:42 GMT"/>
<outline text="}" created="Thu, 02 Sep 2021 13:41:46 GMT"/>
<outline text="else {" created="Thu, 02 Sep 2021 13:41:39 GMT">
<outline text="callback (false);" created="Thu, 02 Sep 2021 13:41:42 GMT"/>
<outline text="}" created="Thu, 02 Sep 2021 13:41:46 GMT"/>
</outline>
<outline text="});"/>
</outline>
<outline text="});"/>
<outline text="}" created="Mon, 18 Oct 2021 15:56:02 GMT"/>
</outline>
<outline text="}" created="Wed, 01 Sep 2021 20:21:45 GMT"/>
</outline>
Expand Down Expand Up @@ -3592,6 +3614,7 @@
<outline text="&lt;script&gt;" created="Thu, 12 Dec 2013 17:06:51 GMT" pgfnum="33502">
<outline text="var config = [%configJson%];"/>
<outline text="var opmlHead = [%opmlHead%];"/>
<outline text="var aboutOutline = [%aboutOutline%]; //10/18/21 by DW" created="Mon, 18 Oct 2021 15:47:31 GMT"/>
<outline text="&lt;/script&gt;" created="Thu, 12 Dec 2013 17:07:17 GMT" pgfnum="33504"/>
</outline>
<outline text="&lt;/head&gt;"/>
Expand Down Expand Up @@ -3701,7 +3724,6 @@
<outline text="/oldschool.scripting.com/" created="Tue, 10 Aug 2021 14:26:37 GMT">
<outline text="index.html" created="Tue, 10 Aug 2021 14:26:46 GMT">
<outline text="&lt;html&gt;">
<outline text="oldschool.scripting.com.s3-website-us-east-1.amazonaws.com" isComment="true" created="Tue, 10 Aug 2021 14:27:53 GMT"/>
<outline text="&lt;head&gt;">
<outline text="&lt;title&gt;oldschool.scripting.com&lt;/title&gt; "/>
<outline text="&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;"/>
Expand Down
47 changes: 29 additions & 18 deletions templates/minimal/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,19 @@ var urlTwitterServer = "http://electricserver.scripting.com/";
}
}
function viewAboutTab (callback) {

function processOutlineStruct (theOutline) {
var outlineBody = theOutline.opml.body;
var htmltext = renderOutlineBrowser (outlineBody, false, undefined, undefined, true);

readGlossary (opmlHead.urlGlossary, function (theGlossary) {
htmltext = multipleReplaceAll (htmltext, theGlossary);
htmltext = safeEmojiProcess (htmltext);
setTabContent (htmltext);
callback (true);
});
}

function safeEmojiProcess (s) {
try {
return (emojiProcess (s));
Expand All @@ -89,24 +102,22 @@ var urlTwitterServer = "http://electricserver.scripting.com/";
}
}
setTabContent (""); //wipe out the blog html before user sees it
readHttpFileThruProxy (opmlHead.urlAboutOpml, undefined, function (opmltext) {
if (opmltext !== undefined) {
var theOutline = opml.parse (opmltext);

var outlineBody = theOutline.opml.body;
var htmltext = renderOutlineBrowser (outlineBody, false, undefined, undefined, true);

readGlossary (opmlHead.urlGlossary, function (theGlossary) {
htmltext = multipleReplaceAll (htmltext, theGlossary);
htmltext = safeEmojiProcess (htmltext);
setTabContent (htmltext);
callback (true);
});
}
else {
callback (false);
}
});

if (aboutOutline !== undefined) { //10/18/21 by DW
console.log ("viewAboutTab: using the pre-built aboutOutline.");
processOutlineStruct (aboutOutline)
}
else {
readHttpFileThruProxy (opmlHead.urlAboutOpml, undefined, function (opmltext) {
if (opmltext !== undefined) {
var theOutline = opml.parse (opmltext);
processOutlineStruct (theOutline);
}
else {
callback (false);
}
});
}
}

function startTabsIfHomePage (activeTabName, callback) {
Expand Down
1 change: 1 addition & 0 deletions templates/minimal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<script>
var config = [%configJson%];
var opmlHead = [%opmlHead%];
var aboutOutline = [%aboutOutline%]; //10/18/21 by DW
</script>
</head>
<body>
Expand Down

0 comments on commit 231bb89

Please sign in to comment.