Fixes to new readme generation

print-window-tiddler
Jeremy Ruston 2012-01-15 11:57:28 +00:00
rodzic 8895787197
commit 58bd8744e9
3 zmienionych plików z 4 dodań i 7 usunięć

Wyświetl plik

@ -1,4 +1,4 @@
<!doctype html><html><head></head><body><h1>Welcome to <a href="TiddlyWiki5" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki5</a></h1><div data-tw-macro='tiddler' data-tw-params='{&quot;target&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;value&quot;:&quot;HelloThere&quot;}}'>Welcome to <a href="TiddlyWiki5" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki5</a>, an interactive wiki <a href="ThisIsAlpha" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves">under development</a> in <a href="JavaScript" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">JavaScript</a> to run in the browser or under node.js. It is a reboot of <a href="TiddlyWiki" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki</a>, the now venerable, reusable non-linear personal web notebook first released in 2004.<br /><br />Over the years, <a href="TiddlyWiki" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki</a> has earned an enduring role as a tool that people <a href="Raves" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">love using</a> for its rich, interactive interface to <a href="TiddlyWikiConcepts" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">manipulate complex data</a> with structure that doesn't easily fit into conventional tools like spreadsheets and wordprocessors. Because people can use it without needing any complicated server infrastructure, and because it is <a href="OpenSourceLicense" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">open source</a>, it has bought unprecedented freedom to people to keep their precious information under their own control. <a href="TiddlyWiki" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki</a> was originally created by <a href="JeremyRuston" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">JeremyRuston</a> and is now a thriving <a href="OpenSourceLicense" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">open source</a> project with a busy <a href="Community" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">Community</a> of independent developers.<br /></div><br /><h1>Usage</h1><div data-tw-macro='tiddler' data-tw-params='{&quot;target&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;value&quot;:&quot;CommandLineInterface&quot;}}'><a href="TiddlyWiki5" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki5</a> can be used on the command line to perform an extensive set of operations based on <a href="RecipeFiles" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves">RecipeFiles</a>, <a href="TiddlerFiles" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves">TiddlerFiles</a> and <a href="TiddlyWikiFiles" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWikiFiles</a>.<br /><br />Usage:<br /><pre>node tiddlywiki.js &lt;options&gt;
<h1>Welcome to <a href="TiddlyWiki5" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki5</a></h1><div data-tw-macro='tiddler' data-tw-params='{&quot;target&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;value&quot;:&quot;HelloThere&quot;}}'>Welcome to <a href="TiddlyWiki5" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki5</a>, an interactive wiki <a href="ThisIsAlpha" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves">under development</a> in <a href="JavaScript" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">JavaScript</a> to run in the browser or under node.js. It is a reboot of <a href="TiddlyWiki" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki</a>, the now venerable, reusable non-linear personal web notebook first released in 2004.<br /><br />Over the years, <a href="TiddlyWiki" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki</a> has earned an enduring role as a tool that people <a href="Raves" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">love using</a> for its rich, interactive interface to <a href="TiddlyWikiConcepts" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">manipulate complex data</a> with structure that doesn't easily fit into conventional tools like spreadsheets and wordprocessors. Because people can use it without needing any complicated server infrastructure, and because it is <a href="OpenSourceLicense" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">open source</a>, it has bought unprecedented freedom to people to keep their precious information under their own control. <a href="TiddlyWiki" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki</a> was originally created by <a href="JeremyRuston" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">JeremyRuston</a> and is now a thriving <a href="OpenSourceLicense" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">open source</a> project with a busy <a href="Community" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">Community</a> of independent developers.<br /></div><br /><h1>Usage</h1><div data-tw-macro='tiddler' data-tw-params='{&quot;target&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;value&quot;:&quot;CommandLineInterface&quot;}}'><a href="TiddlyWiki5" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki5</a> can be used on the command line to perform an extensive set of operations based on <a href="RecipeFiles" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves">RecipeFiles</a>, <a href="TiddlerFiles" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves">TiddlerFiles</a> and <a href="TiddlyWikiFiles" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWikiFiles</a>.<br /><br />Usage:<br /><pre>node tiddlywiki.js &lt;options&gt;
</pre>The command line options are processed sequentially from left to right. Processing pauses during long operations, like loading a <a href="RecipeFiles" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves">recipe file</a> and all the subrecipes and <a href="TiddlerFiles" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves">tiddlers</a> that it references. The following options are available:<br /><br /><table class="twtable"><tbody><tr class="evenRow"><td align="left"><code>--recipe &lt;filepath&gt;</code></td><td align="left">Loads a specfied <code>.recipe</code> file</td></tr><tr class="oddRow"><td align="left"><code>--load &lt;filepath&gt;</code></td><td align="left">Load additional tiddlers from <a href="TiddlyWiki" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki</a> files (<code>.html</code>), <code>.tiddler</code>, <code>.tid</code>, <code>.json</code> or other files</td></tr><tr class="evenRow"><td align="left"><code>--savewiki &lt;dirpath&gt;</code></td><td align="left">Saves all the loaded tiddlers as a single file <a href="TiddlyWiki" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki</a> called <code>index.html</code> and an RSS feed called <code>index.xml</code></td></tr><tr class="oddRow"><td align="left"><code>--savetiddler &lt;title&gt; &lt;filename&gt; [&lt;type&gt;]</code></td><td align="left">Save an individual tiddler as a specified MIME type, defaults to <code>text/html</code></td></tr><tr class="evenRow"><td align="left"><code>--savetiddlers &lt;outdir&gt;</code></td><td align="left">Saves all the loaded tiddlers as <code>.tid</code> files in the specified directory</td></tr><tr class="oddRow"><td align="left"><code>--servewiki &lt;port&gt;</code></td><td align="left">Serve the cooked <a href="TiddlyWiki" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki</a> over HTTP at <code>/</code></td></tr><tr class="evenRow"><td align="left"><code>--servetiddlers &lt;port&gt;</code></td><td align="left">Serve individual tiddlers over HTTP at <code>/tiddlertitle</code></td></tr><tr class="oddRow"><td align="left"><code>--wikitest &lt;dir&gt;</code></td><td align="left">Run wikification tests against the tiddlers in the given directory</td></tr><tr class="evenRow"><td align="left"><code>--dumpstore</code></td><td align="left">Dump the <a href="TiddlyWiki" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki</a> store in JSON format</td></tr><tr class="oddRow"><td align="left"><code>--dumprecipe</code></td><td align="left">Dump the current recipe in JSON format</td></tr><tr class="evenRow"><td align="left"><code>--verbose</code></td><td align="left">verbose output, useful for debugging</td></tr></tbody></table><br /><h2> Examples</h2>This example loads the tiddlers from a <a href="TiddlyWiki" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki</a> HTML file and makes them available over HTTP:<br /><pre>node tiddlywiki.js --load mywiki.html --servewiki 127.0.0.1:8000
</pre>This example cooks a <a href="TiddlyWiki" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki</a> from a recipe:<br /><pre>node tiddlywiki.js --recipe tiddlywiki.com/index.recipe --savewiki tmp/
</pre>This example ginsus a <a href="TiddlyWiki" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki</a> into its constituent tiddlers:<br /><pre>node tiddlywiki.js --load mywiki.html --savetiddlers tmp/tiddlers
@ -11,4 +11,4 @@ A multiline parameter that can go on for as long as it likes
and contain linebreaks.
))
&gt;&gt;
</pre></div><br /><br /><em>This <code>readme</code> file was automatically generated by <a href="TiddlyWiki5" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki5</a></em><br /></body></html>
</pre></div><br /><br /><em>This <code>readme</code> file was automatically generated by <a href="TiddlyWiki5" class="tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing">TiddlyWiki5</a></em><br />

Wyświetl plik

@ -127,10 +127,7 @@ var commandLineSwitches = {
args: {min: 2, max: 3},
handler: function(args,callback) {
var type = args[2] || "text/html";
fs.writeFileSync(args[1],
"<!doctype html><html><head></head><body>" +
app.store.renderTiddler(type,args[0]) +
"</body></html>","utf8");
fs.writeFileSync(args[1],app.store.renderTiddler(type,args[0]),"utf8");
}
},
savetiddlers: {

2
tw5.sh
Wyświetl plik

@ -7,7 +7,7 @@ mkdir -p tmp
mkdir -p tmp/tw5
# cook TiddlyWiki5
node tiddlywiki.js --recipe $PWD/tiddlywiki5/tiddlywiki5.recipe --savewiki tmp/tw5 --savetiddler ReadMe readme.html || exit 1
node tiddlywiki.js --recipe $PWD/tiddlywiki5/tiddlywiki5.recipe --savewiki tmp/tw5 --savetiddler ReadMe readme.md || exit 1
# open the result