1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

Rename the savetiddler/savetiddlers commands to rendertiddler/rendertiddlers

'Render' reflects what the commands actually do, and frees up 'save'
for actually saving the raw content of a tiddler.
This commit is contained in:
Jeremy Ruston 2013-08-04 22:26:45 +01:00
parent c54faeecd8
commit 05ac094d2e
10 changed files with 39 additions and 39 deletions

View File

@ -11,7 +11,7 @@ mkdir -p tmp/tw2
node ./tiddlywiki.js \
editions/tw5.com \
--verbose \
--savetiddler TiddlyWiki2ReadMe editions/tw2/readme.md text/html \
--rendertiddler TiddlyWiki2ReadMe editions/tw2/readme.md text/html \
|| exit 1
# cook the TiddlyWiki 2.x.x index file
@ -20,7 +20,7 @@ node ./tiddlywiki.js \
editions/tw2 \
--verbose \
--load editions/tw2/source/tiddlywiki.com/index.html.recipe \
--savetiddler $:/core/templates/tiddlywiki2.template.html ./tmp/tw2/index.html text/plain \
--rendertiddler $:/core/templates/tiddlywiki2.template.html ./tmp/tw2/index.html text/plain \
|| exit 1
opendiff tmp/tw2/index.html editions/tw2/target/index.2.6.5.html

20
bld.sh
View File

@ -35,12 +35,12 @@ rm $TW5_BUILD_OUTPUT/static/*
node ./tiddlywiki.js \
./editions/tw5.com \
--verbose \
--savetiddler ReadMe ./readme.md text/html \
--savetiddler ContributingTemplate ./contributing.md text/html \
--savetiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/index.html text/plain \
--savetiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \
--savetiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \
--savetiddlers [!is[system]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \
--rendertiddler ReadMe ./readme.md text/html \
--rendertiddler ContributingTemplate ./contributing.md text/html \
--rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/index.html text/plain \
--rendertiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \
--rendertiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \
|| exit 1
# Second, encrypted.html: a version of the main file encrypted with the password "password"
@ -49,7 +49,7 @@ node ./tiddlywiki.js \
./editions/tw5.com \
--verbose \
--password password \
--savetiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/encrypted.html text/plain \
--rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/encrypted.html text/plain \
|| exit 1
# Third, empty.html: empty wiki for reuse
@ -57,7 +57,7 @@ node ./tiddlywiki.js \
node ./tiddlywiki.js \
./editions/empty \
--verbose \
--savetiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/empty.html text/plain \
--rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/empty.html text/plain \
|| exit 1
# Fourth, tahoelafs.html: empty wiki with plugin for Tahoe-LAFS
@ -65,7 +65,7 @@ node ./tiddlywiki.js \
node ./tiddlywiki.js \
./editions/tahoelafs \
--verbose \
--savetiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/tahoelafs.html text/plain \
--rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/tahoelafs.html text/plain \
|| exit 1
# Fifth, d3demo.html: wiki to demo d3 plugin
@ -73,7 +73,7 @@ node ./tiddlywiki.js \
node ./tiddlywiki.js \
./editions/d3demo \
--verbose \
--savetiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/d3demo.html text/plain \
--rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/d3demo.html text/plain \
|| exit 1
# Sixth, run the test edition to run the node.js tests and to generate test.html for tests in the browser

View File

@ -1,9 +1,9 @@
/*\
title: $:/core/modules/commands/savetiddler.js
title: $:/core/modules/commands/rendertiddler.js
type: application/javascript
module-type: command
Command to save a tiddler to a file
Command to render a tiddler and save it to a file
\*/
(function(){
@ -13,7 +13,7 @@ Command to save a tiddler to a file
"use strict";
exports.info = {
name: "savetiddler",
name: "rendertiddler",
synchronous: false
};

View File

@ -1,9 +1,9 @@
/*\
title: $:/core/modules/commands/savetiddlers.js
title: $:/core/modules/commands/rendertiddlers.js
type: application/javascript
module-type: command
Command to save several tiddlers to a file
Command to render several tiddlers to a folder of files
\*/
(function(){
@ -13,7 +13,7 @@ Command to save several tiddlers to a file
"use strict";
exports.info = {
name: "savetiddlers",
name: "rendertiddlers",
synchronous: true
};

View File

@ -1,8 +1,8 @@
title: SaveTiddlerCommand
title: RenderTiddlerCommand
tags: docs command
Save an individual tiddler as a specified ContentType, defaults to `text/html`
Render an individual tiddler as a specified ContentType, defaults to `text/html` and save it to the specified filename
```
--savetiddler <title> <filename> [<type>]
--rendertiddler <title> <filename> [<type>]
```

View File

@ -1,14 +1,14 @@
title: SaveTiddlersCommand
title: RenderTiddlersCommand
tags: docs command
Save a set of tiddlers matching a filter as separate files of a specified ContentType (defaults to `text/html`) and extension (defaults to `.html`).
Render a set of tiddlers matching a filter to separate files of a specified ContentType (defaults to `text/html`) and extension (defaults to `.html`).
```
--savetiddlers <filter> <template> <pathname> [<type>] [<extension>]
--rendertiddlers <filter> <template> <pathname> [<type>] [<extension>]
```
For example:
```
--savetiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain
```

View File

@ -9,6 +9,6 @@ node ./tiddlywiki.js \
./editions/empty \
--verbose \
--load $1 \
--savetiddler $:/core/templates/split-recipe tmp/ginsu/split.recipe text/plain \
--savetiddlers [!is[system]] $:/core/templates/tid-tiddler tmp/ginsu text/plain .tid \
--rendertiddler $:/core/templates/split-recipe tmp/ginsu/split.recipe text/plain \
--rendertiddlers [!is[system]] $:/core/templates/tid-tiddler tmp/ginsu text/plain .tid \
|| exit 1

View File

@ -159,28 +159,28 @@ TiddlyWiki</a> files (<code>
<div class='tw-transclude'>
<h3 class=''>
<span class='tw-view-link'>
<a class='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/SaveTiddlerCommand.html'>
SaveTiddlerCommand</a></span></h3><div>
<a class='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/RenderTiddlerCommand.html'>
RenderTiddlerCommand</a></span></h3><div>
<div class='tw-transclude'>
<p>
Save an individual tiddler as a specified <a class='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing' href='http://five.tiddlywiki.com/static/ContentType.html'>
Render an individual tiddler as a specified <a class='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing' href='http://five.tiddlywiki.com/static/ContentType.html'>
ContentType</a>, defaults to <code>
text/html</code> </p><pre>
--savetiddler &lt;title&gt; &lt;filename&gt; [&lt;type&gt;]</pre></div></div></div></div><div class='tw-list-element'>
text/html</code> and save it to the specified filename </p><pre>
--rendertiddler &lt;title&gt; &lt;filename&gt; [&lt;type&gt;]</pre></div></div></div></div><div class='tw-list-element'>
<div class='tw-transclude'>
<h3 class=''>
<span class='tw-view-link'>
<a class='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/SaveTiddlersCommand.html'>
SaveTiddlersCommand</a></span></h3><div>
<a class='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/RenderTiddlersCommand.html'>
RenderTiddlersCommand</a></span></h3><div>
<div class='tw-transclude'>
<p>
Save a set of tiddlers matching a filter as separate files of a specified <a class='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing' href='http://five.tiddlywiki.com/static/ContentType.html'>
Render a set of tiddlers matching a filter to separate files of a specified <a class='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing' href='http://five.tiddlywiki.com/static/ContentType.html'>
ContentType</a> (defaults to <code>
text/html</code>) and extension (defaults to <code>
.html</code>).</p><pre>
--savetiddlers &lt;filter&gt; &lt;template&gt; &lt;pathname&gt; [&lt;type&gt;] [&lt;extension&gt;]</pre><p>
--rendertiddlers &lt;filter&gt; &lt;template&gt; &lt;pathname&gt; [&lt;type&gt;] [&lt;extension&gt;]</pre><p>
For example:</p><pre>
--savetiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain</pre></div></div></div></div><div class='tw-list-element'>
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain</pre></div></div></div></div><div class='tw-list-element'>
<div class='tw-transclude'>
<h3 class=''>
<span class='tw-view-link'>

View File

@ -20,6 +20,6 @@ echo "Using TW5_BUILD_OUTPUT as [$TW5_BUILD_OUTPUT]"
node ./tiddlywiki.js \
./editions/test \
--verbose \
--savetiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/test.html text/plain \
--rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/test.html text/plain \
|| exit 1

View File

@ -15,7 +15,7 @@ mkdir -p tmp
node ./tiddlywiki.js \
editions/tw5tiddlyweb \
--verbose \
--savetiddler $:/core/templates/tiddlywiki5.template.html tmp/tiddlyweb.html text/plain \
--rendertiddler $:/core/templates/tiddlywiki5.template.html tmp/tiddlyweb.html text/plain \
|| exit 1
# Prepend the type information that TiddlyWeb needs to turn the .html file into a .tid file