diff --git a/readme.md b/readme.md index bd3d41bfc..b2a46e461 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -

Welcome to TiddlyWiki5

Welcome to TiddlyWiki5, an interactive wiki under development in JavaScript to run in the browser or under node.js. It is a reboot of TiddlyWiki, the now venerable, reusable non-linear personal web notebook first released in 2004.

Over the years, TiddlyWiki has earned an enduring role as a tool that people love using for its rich, interactive interface to manipulate complex data 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 open source, it has bought unprecedented freedom to people to keep their precious information under their own control. TiddlyWiki was originally created by JeremyRuston and is now a thriving open source project with a busy Community of independent developers.

Usage

TiddlyWiki5 can be used on the command line to perform an extensive set of operations based on RecipeFiles, TiddlerFiles and TiddlyWikiFiles.

Usage:
node tiddlywiki.js <options>
+

Welcome to TiddlyWiki5

Welcome to TiddlyWiki5, an interactive wiki under development in JavaScript to run in the browser or under node.js. It is a reboot of TiddlyWiki, the now venerable, reusable non-linear personal web notebook first released in 2004.

Over the years, TiddlyWiki has earned an enduring role as a tool that people love using for its rich, interactive interface to manipulate complex data 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 open source, it has bought unprecedented freedom to people to keep their precious information under their own control. TiddlyWiki was originally created by JeremyRuston and is now a thriving open source project with a busy Community of independent developers.

Usage

TiddlyWiki5 can be used on the command line to perform an extensive set of operations based on RecipeFiles, TiddlerFiles and TiddlyWikiFiles.

Usage:
node tiddlywiki.js <options>
 
The command line options are processed sequentially from left to right. Processing pauses during long operations, like loading a recipe file and all the subrecipes and tiddlers that it references. The following options are available:

--recipe <filepath>Loads a specfied .recipe file
--load <filepath>Load additional tiddlers from TiddlyWiki files (.html), .tiddler, .tid, .json or other files
--savewiki <dirpath>Saves all the loaded tiddlers as a single file TiddlyWiki called index.html and an RSS feed called index.xml
--savetiddler <title> <filename> [<type>]Save an individual tiddler as a specified MIME type, defaults to text/html
--savetiddlers <outdir>Saves all the loaded tiddlers as .tid files in the specified directory
--servewiki <port>Serve the cooked TiddlyWiki over HTTP at /
--servetiddlers <port>Serve individual tiddlers over HTTP at /tiddlertitle
--wikitest <dir>Run wikification tests against the tiddlers in the given directory
--dumpstoreDump the TiddlyWiki store in JSON format
--dumprecipeDump the current recipe in JSON format
--verboseverbose output, useful for debugging

Examples

This example loads the tiddlers from a TiddlyWiki HTML file and makes them available over HTTP:
node tiddlywiki.js --load mywiki.html --servewiki 127.0.0.1:8000
 
This example cooks a TiddlyWiki from a recipe:
node tiddlywiki.js --recipe tiddlywiki.com/index.recipe --savewiki tmp/
 
This example ginsus a TiddlyWiki into its constituent tiddlers:
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.
 ))
 >>
-


This readme file was automatically generated by TiddlyWiki5
\ No newline at end of file +


This readme file was automatically generated by TiddlyWiki5
\ No newline at end of file diff --git a/tiddlywiki.js b/tiddlywiki.js index 57aa0d523..e166f138b 100644 --- a/tiddlywiki.js +++ b/tiddlywiki.js @@ -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], - "" + - app.store.renderTiddler(type,args[0]) + - "","utf8"); + fs.writeFileSync(args[1],app.store.renderTiddler(type,args[0]),"utf8"); } }, savetiddlers: { diff --git a/tw5.sh b/tw5.sh index 803e0742a..8fdf95242 100755 --- a/tw5.sh +++ b/tw5.sh @@ -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