diff --git a/bld.cmd b/bld.cmd index b90ca1bce..f215e5c48 100644 --- a/bld.cmd +++ b/bld.cmd @@ -16,18 +16,19 @@ if not exist %TW5_BUILD_OUTPUT%\nul ( echo Using TW5_BUILD_OUTPUT as %TW5_BUILD_OUTPUT% echo. -rem Create the `static` directory if necessary +rem Create the `static` and `dev` directories if necessary setlocal enableextensions mkdir %TW5_BUILD_OUTPUT%\static +mkdir %TW5_BUILD_OUTPUT%\dev +mkdir %TW5_BUILD_OUTPUT%\dev\static setlocal disableextensions rem Delete any existing content del /q /s %TW5_BUILD_OUTPUT%\static -rem First, -rem readme.md: the readme file for GitHub +rem First, the tw5.com wiki rem index.html: the main file, including content rem empty.html: the main file, excluding content rem static.html: the static version of the default tiddlers @@ -35,8 +36,6 @@ rem static.html: the static version of the default tiddlers node .\tiddlywiki.js ^ .\editions\tw5.com ^ --verbose ^ - --rendertiddler ReadMe .\readme.md text/html ^ - --rendertiddler ContributingTemplate .\contributing.md text/html ^ --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\index.html text/plain ^ --rendertiddler $:/editions/tw5.com/save-empty %TW5_BUILD_OUTPUT%\empty.html text/plain ^ --rendertiddler $:/core/templates/static.template.html %TW5_BUILD_OUTPUT%\static.html text/plain ^ @@ -53,7 +52,20 @@ node .\tiddlywiki.js ^ --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\encrypted.html text/plain ^ || exit 1 -rem Third, tahoelafs.html: empty wiki with plugin for Tahoe-LAFS +rem Third, dev.html: developer info wiki + +node .\tiddlywiki.js ^ + .\editions\dev ^ + --verbose ^ + --rendertiddler ReadMe .\readme.md text/html ^ + --rendertiddler ContributingTemplate .\contributing.md text/html ^ + --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\dev\index.html text/plain ^ + --rendertiddler $:/core/templates/static.template.html %TW5_BUILD_OUTPUT%\dev\static.html text/plain ^ + --rendertiddler $:/core/templates/static.template.css %TW5_BUILD_OUTPUT%\dev\static\static.css text/plain ^ + --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html %TW5_BUILD_OUTPUT%\dev\static text/plain ^ + || exit 1 + +rem Fourth, tahoelafs.html: empty wiki with plugin for Tahoe-LAFS node .\tiddlywiki.js ^ .\editions\tahoelafs ^ @@ -61,7 +73,7 @@ node .\tiddlywiki.js ^ --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\tahoelafs.html text/plain ^ || exit 1 -rem Fourth, d3demo.html: wiki to demo d3 plugin +rem Fifth, d3demo.html: wiki to demo d3 plugin node .\tiddlywiki.js ^ .\editions\d3demo ^ @@ -69,7 +81,7 @@ node .\tiddlywiki.js ^ --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\d3demo.html text/plain ^ || exit 1 -rem Fifth, codemirrordemo.html: wiki to demo codemirror plugin +rem Sixth, codemirrordemo.html: wiki to demo codemirror plugin node .\tiddlywiki.js ^ .\editions\codemirrordemo ^ @@ -77,7 +89,7 @@ node .\tiddlywiki.js ^ --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\codemirrordemo.html text/plain ^ || exit 1 -rem Sixth, codemirrordemo.html: wiki to demo codemirror plugin +rem Seventh, codemirrordemo.html: wiki to demo codemirror plugin node .\tiddlywiki.js ^ .\editions\markdowndemo ^ @@ -90,6 +102,6 @@ rem Make the CNAME file that GitHub Pages requires echo five.tiddlywiki.com > %TW5_BUILD_OUTPUT%\CNAME -rem Seventh, run the test edition to run the Node.js tests and to generate test.html for tests in the browser +rem Eighth, run the test edition to run the Node.js tests and to generate test.html for tests in the browser .\test.cmd diff --git a/bld.sh b/bld.sh index f873fba26..42285c7f6 100755 --- a/bld.sh +++ b/bld.sh @@ -19,16 +19,17 @@ echo "Using TW5_BUILD_OUTPUT as [$TW5_BUILD_OUTPUT]" echo "five.tiddlywiki.com" > $TW5_BUILD_OUTPUT/CNAME -# Create the `static` directory if necessary +# Create the `static` and `dev` directories if necessary mkdir -p $TW5_BUILD_OUTPUT/static +mkdir -p $TW5_BUILD_OUTPUT/dev +mkdir -p $TW5_BUILD_OUTPUT/dev/static # Delete any existing content rm $TW5_BUILD_OUTPUT/static/* -# First, -# readme.md: the readme file for GitHub +# First, the tw5.com wiki # index.html: the main file, including content # empty.html: the main file, excluding content # static.html: the static version of the default tiddlers @@ -36,8 +37,6 @@ rm $TW5_BUILD_OUTPUT/static/* node ./tiddlywiki.js \ ./editions/tw5.com \ --verbose \ - --rendertiddler ReadMe ./readme.md text/html \ - --rendertiddler ContributingTemplate ./contributing.md text/html \ --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/index.html text/plain \ --rendertiddler $:/editions/tw5.com/save-empty $TW5_BUILD_OUTPUT/empty.html text/plain \ --rendertiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \ @@ -54,7 +53,20 @@ node ./tiddlywiki.js \ --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/encrypted.html text/plain \ || exit 1 -# Third, tahoelafs.html: empty wiki with plugin for Tahoe-LAFS +# Third, dev.html: developer info wiki + +node ./tiddlywiki.js \ + ./editions/dev \ + --verbose \ + --rendertiddler ReadMe ./readme.md text/html \ + --rendertiddler ContributingTemplate ./contributing.md text/html \ + --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/dev/index.html text/plain \ + --rendertiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/dev/static.html text/plain \ + --rendertiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/dev/static/static.css text/plain \ + --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/dev/static text/plain \ + || exit 1 + +# Fourth, tahoelafs.html: empty wiki with plugin for Tahoe-LAFS node ./tiddlywiki.js \ ./editions/tahoelafs \ @@ -62,7 +74,7 @@ node ./tiddlywiki.js \ --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/tahoelafs.html text/plain \ || exit 1 -# Fourth, d3demo.html: wiki to demo d3 plugin +# Fifth, d3demo.html: wiki to demo d3 plugin node ./tiddlywiki.js \ ./editions/d3demo \ @@ -70,7 +82,7 @@ node ./tiddlywiki.js \ --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/d3demo.html text/plain \ || exit 1 -# Fifth, codemirrordemo.html: wiki to demo codemirror plugin +# Sixth, codemirrordemo.html: wiki to demo codemirror plugin node ./tiddlywiki.js \ ./editions/codemirrordemo \ @@ -78,7 +90,7 @@ node ./tiddlywiki.js \ --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/codemirrordemo.html text/plain \ || exit 1 -# Sixth, codemirrordemo.html: wiki to demo codemirror plugin +# Seventh, codemirrordemo.html: wiki to demo codemirror plugin node ./tiddlywiki.js \ ./editions/markdowndemo \ @@ -86,6 +98,6 @@ node ./tiddlywiki.js \ --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/markdowndemo.html text/plain \ || exit 1 -# Seventh, run the test edition to run the Node.js tests and to generate test.html for tests in the browser +# Eighth, run the test edition to run the Node.js tests and to generate test.html for tests in the browser ./test.sh diff --git a/editions/tw5.com/tiddlers/Building_classic_TiddlyWiki_with_TiddlyWiki.tid b/editions/dev/tiddlers/Building_classic_TiddlyWiki_with_TiddlyWiki.tid similarity index 100% rename from editions/tw5.com/tiddlers/Building_classic_TiddlyWiki_with_TiddlyWiki.tid rename to editions/dev/tiddlers/Building_classic_TiddlyWiki_with_TiddlyWiki.tid diff --git a/editions/tw5.com/tiddlers/Contributing.tid b/editions/dev/tiddlers/Contributing.tid similarity index 100% rename from editions/tw5.com/tiddlers/Contributing.tid rename to editions/dev/tiddlers/Contributing.tid diff --git a/editions/dev/tiddlers/HelloThere.tid b/editions/dev/tiddlers/HelloThere.tid new file mode 100644 index 000000000..c51feb446 --- /dev/null +++ b/editions/dev/tiddlers/HelloThere.tid @@ -0,0 +1,24 @@ +created: 20130822170200000 +creator: JeremyRuston +modified: 20131126220042886 +modifier: JeremyRuston +tags: introduction +title: HelloThere +type: text/vnd.tiddlywiki + +This is the developer documentation hub for TiddlyWiki. For convenience, it also contains all of the end user documentation that appears at http://five.tiddlywiki.com/. + +! Overview + +* TiddlyWikiArchitecture +* [[TiddlyWiki5 Development Environment]] +* [[Building classic TiddlyWiki with TiddlyWiki5]] + +! Developer Cookbooks + +<$list filter="[tag[dev]tag[howto]sort[title]]"/> + +! Internal Objects and Mechanisms + +<$list filter="[tag[mechanism]sort[title]]"/> + diff --git a/editions/tw5.com/tiddlers/TiddlyWiki5 Development Environment.tid b/editions/dev/tiddlers/TiddlyWiki5 Development Environment.tid similarity index 100% rename from editions/tw5.com/tiddlers/TiddlyWiki5 Development Environment.tid rename to editions/dev/tiddlers/TiddlyWiki5 Development Environment.tid diff --git a/editions/tw5.com/tiddlers/TiddlyWikiArchitecture.tid b/editions/dev/tiddlers/TiddlyWikiArchitecture.tid similarity index 100% rename from editions/tw5.com/tiddlers/TiddlyWikiArchitecture.tid rename to editions/dev/tiddlers/TiddlyWikiArchitecture.tid diff --git a/editions/tw5.com/tiddlers/howtos/Using TiddlyWiki for GitHub Pages project documentation.tid b/editions/dev/tiddlers/Using TiddlyWiki for GitHub Pages project documentation.tid similarity index 100% rename from editions/tw5.com/tiddlers/howtos/Using TiddlyWiki for GitHub Pages project documentation.tid rename to editions/dev/tiddlers/Using TiddlyWiki for GitHub Pages project documentation.tid diff --git a/editions/tw5.com/tiddlers/deserializers/TiddlerFiles.tid b/editions/dev/tiddlers/deserializers/TiddlerFiles.tid similarity index 100% rename from editions/tw5.com/tiddlers/deserializers/TiddlerFiles.tid rename to editions/dev/tiddlers/deserializers/TiddlerFiles.tid diff --git a/editions/tw5.com/tiddlers/tags/dev.tid b/editions/dev/tiddlers/dev.tid similarity index 100% rename from editions/tw5.com/tiddlers/tags/dev.tid rename to editions/dev/tiddlers/dev.tid diff --git a/editions/tw5.com/tiddlers/tags/internals.tid b/editions/dev/tiddlers/internals.tid similarity index 100% rename from editions/tw5.com/tiddlers/tags/internals.tid rename to editions/dev/tiddlers/internals.tid diff --git a/editions/tw5.com/tiddlers/tags/mechanism.tid b/editions/dev/tiddlers/mechanism.tid similarity index 100% rename from editions/tw5.com/tiddlers/tags/mechanism.tid rename to editions/dev/tiddlers/mechanism.tid diff --git a/editions/tw5.com/tiddlers/mechanisms/BootMechanism.tid b/editions/dev/tiddlers/mechanisms/BootMechanism.tid similarity index 100% rename from editions/tw5.com/tiddlers/mechanisms/BootMechanism.tid rename to editions/dev/tiddlers/mechanisms/BootMechanism.tid diff --git a/editions/tw5.com/tiddlers/mechanisms/DraftMechanism.tid b/editions/dev/tiddlers/mechanisms/DraftMechanism.tid similarity index 100% rename from editions/tw5.com/tiddlers/mechanisms/DraftMechanism.tid rename to editions/dev/tiddlers/mechanisms/DraftMechanism.tid diff --git a/editions/tw5.com/tiddlers/mechanisms/EncryptionMechanism.tid b/editions/dev/tiddlers/mechanisms/EncryptionMechanism.tid similarity index 100% rename from editions/tw5.com/tiddlers/mechanisms/EncryptionMechanism.tid rename to editions/dev/tiddlers/mechanisms/EncryptionMechanism.tid diff --git a/editions/tw5.com/tiddlers/mechanisms/LazyLoadingMechanism.tid b/editions/dev/tiddlers/mechanisms/LazyLoadingMechanism.tid similarity index 100% rename from editions/tw5.com/tiddlers/mechanisms/LazyLoadingMechanism.tid rename to editions/dev/tiddlers/mechanisms/LazyLoadingMechanism.tid diff --git a/editions/tw5.com/tiddlers/mechanisms/ParsingMechanism.tid b/editions/dev/tiddlers/mechanisms/ParsingMechanism.tid similarity index 100% rename from editions/tw5.com/tiddlers/mechanisms/ParsingMechanism.tid rename to editions/dev/tiddlers/mechanisms/ParsingMechanism.tid diff --git a/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid b/editions/dev/tiddlers/mechanisms/PluginMechanism.tid similarity index 100% rename from editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid rename to editions/dev/tiddlers/mechanisms/PluginMechanism.tid diff --git a/editions/tw5.com/tiddlers/mechanisms/RenderingMechanism.tid b/editions/dev/tiddlers/mechanisms/RenderingMechanism.tid similarity index 100% rename from editions/tw5.com/tiddlers/mechanisms/RenderingMechanism.tid rename to editions/dev/tiddlers/mechanisms/RenderingMechanism.tid diff --git a/editions/tw5.com/tiddlers/mechanisms/TestingMechanism.tid b/editions/dev/tiddlers/mechanisms/TestingMechanism.tid similarity index 100% rename from editions/tw5.com/tiddlers/mechanisms/TestingMechanism.tid rename to editions/dev/tiddlers/mechanisms/TestingMechanism.tid diff --git a/editions/tw5.com/tiddlers/moduletypes/SyncAdaptorModules.tid b/editions/dev/tiddlers/moduletypes/SyncAdaptorModules.tid similarity index 100% rename from editions/tw5.com/tiddlers/moduletypes/SyncAdaptorModules.tid rename to editions/dev/tiddlers/moduletypes/SyncAdaptorModules.tid diff --git a/editions/tw5.com/tiddlers/moduletypes/WidgetModules.tid b/editions/dev/tiddlers/moduletypes/WidgetModules.tid similarity index 100% rename from editions/tw5.com/tiddlers/moduletypes/WidgetModules.tid rename to editions/dev/tiddlers/moduletypes/WidgetModules.tid diff --git a/editions/tw5.com/tiddlers/moduletypes/WikiRuleModules.tid b/editions/dev/tiddlers/moduletypes/WikiRuleModules.tid similarity index 100% rename from editions/tw5.com/tiddlers/moduletypes/WikiRuleModules.tid rename to editions/dev/tiddlers/moduletypes/WikiRuleModules.tid diff --git a/editions/tw5.com/tiddlers/readme/ContributingTemplate.tid b/editions/dev/tiddlers/readme/ContributingTemplate.tid similarity index 100% rename from editions/tw5.com/tiddlers/readme/ContributingTemplate.tid rename to editions/dev/tiddlers/readme/ContributingTemplate.tid diff --git a/editions/tw5.com/tiddlers/readme/ReadMe.tid b/editions/dev/tiddlers/readme/ReadMe.tid similarity index 100% rename from editions/tw5.com/tiddlers/readme/ReadMe.tid rename to editions/dev/tiddlers/readme/ReadMe.tid diff --git a/editions/tw5.com/tiddlers/readme/TiddlyWiki2ReadMe.tid b/editions/dev/tiddlers/readme/TiddlyWiki2ReadMe.tid similarity index 100% rename from editions/tw5.com/tiddlers/readme/TiddlyWiki2ReadMe.tid rename to editions/dev/tiddlers/readme/TiddlyWiki2ReadMe.tid diff --git a/editions/dev/tiddlers/system/DefaultTiddlers.tid b/editions/dev/tiddlers/system/DefaultTiddlers.tid new file mode 100644 index 000000000..0af7cd0c5 --- /dev/null +++ b/editions/dev/tiddlers/system/DefaultTiddlers.tid @@ -0,0 +1,6 @@ +title: $:/DefaultTiddlers + +HelloThere +Resources +ReleaseHistory +RoadMap diff --git a/editions/dev/tiddlers/system/SiteSubtitle.tid b/editions/dev/tiddlers/system/SiteSubtitle.tid new file mode 100644 index 000000000..728f7a560 --- /dev/null +++ b/editions/dev/tiddlers/system/SiteSubtitle.tid @@ -0,0 +1,4 @@ +title: SiteSubtitle +modifier: JeremyRuston + +developer information for ~TiddlyWiki5 \ No newline at end of file diff --git a/editions/dev/tiddlers/system/SiteTitle.tid b/editions/dev/tiddlers/system/SiteTitle.tid new file mode 100644 index 000000000..cf8a286fc --- /dev/null +++ b/editions/dev/tiddlers/system/SiteTitle.tid @@ -0,0 +1,4 @@ +title: SiteTitle +modifier: JeremyRuston + +five.tiddlywiki.com/dev \ No newline at end of file diff --git a/editions/dev/tiddlywiki.info b/editions/dev/tiddlywiki.info new file mode 100644 index 000000000..7ed409b16 --- /dev/null +++ b/editions/dev/tiddlywiki.info @@ -0,0 +1,13 @@ +{ + "plugins": [ + "tiddlywiki/fullscreen", + "tiddlywiki/googleanalytics", + "tiddlywiki/github-fork-ribbon" + ], + "themes": [ + "tiddlywiki/snowwhite" + ], + "includeWikis": [ + "../tw5.com" + ] +} \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/DeveloperDocs.tid b/editions/tw5.com/tiddlers/DeveloperDocs.tid deleted file mode 100644 index 646d6bf17..000000000 --- a/editions/tw5.com/tiddlers/DeveloperDocs.tid +++ /dev/null @@ -1,32 +0,0 @@ -created: 201308251537 -creator: JeremyRuston -modified: 201308260831 -modifier: JeremyRuston -tags: introduction dev -title: DeveloperDocs - -This is the developer documentation hub for TiddlyWiki. - -! Overview - -* TiddlyWikiArchitecture -* [[TiddlyWiki5 Development Environment]] - -! Developer Cookbooks - -<$list filter="[tag[dev]tag[howto]sort[title]]" type="ul"/> - -! Internal Objects and Mechanisms - -<$list filter="[tag[mechanism]sort[title]]" type="ul"/> - -! Module types -!! SyncAdaptorModules - -See SyncAdaptorModules. - -!! DeserializerModules - -Deserializers are modules that load tiddlers from different text formats: - -<$list filter="[tag[deserializers]sort[title]]" type="ul"/> diff --git a/editions/tw5.com/tiddlers/roadmap/Plan for moving from Alpha to Beta.tid b/editions/tw5.com/tiddlers/roadmap/Plan for moving from Alpha to Beta.tid deleted file mode 100644 index 2772866c9..000000000 --- a/editions/tw5.com/tiddlers/roadmap/Plan for moving from Alpha to Beta.tid +++ /dev/null @@ -1,48 +0,0 @@ -created: 201308252217 -creator: JeremyRuston -modified: 201308270750 -modifier: JeremyRuston -tags: dev -title: Plan for moving from Alpha to Beta - -! Goals for moving to Beta - -To move from alpha to beta, TiddlyWiki5 needs a better release and deployment process. At a minimum: - -* Each release should be automatically assigned a unique revision number, with a simple manual process to bump the major or minor version number -* Each release should be available as a zip download on GitHub and tiddlywiki.com -* Releases should be automatically pushed to NPM -* A release note for end users should be automatically generated from the commits -** The process should allow for manual editing of the release note -* A clear distinction between a new release of the TW5 core plugins and revised content for the tw5.com website - -It would also be nice to have: - -* Automatic tweets from @TiddlyWiki announcing each release - -! Tasks for moving to Beta - -!! Update https://github.com/Jermolene/tiddlywiki.com - -This is the repository for the content and build tools for tiddlywiki.com, forked from https://github.com/TiddlyWiki/tiddlywiki.com. It needs updating to include both TW5 and TW classic, with a unified build and deployment process for the website. The content from `TiddlyWiki5/editions/tw5.com` would be moved here. - -The pull request will be merged when we switch into beta. Until then, we'll build to http://jermolene.github.com, meaning that http://five.tiddlywiki.com will be a replica of tiddlywiki.com post-beta switchover. - -The basic build process for tw5.com is: - -Preparation - -* Update the content and commit as needed -* Pull down the correct version of TW5 for the build -* Pull down the content repos -* Fork tiddlywiki.github.com and pull it down - -Build cycle - -* Run the build scripts -* Review pull request for tiddlywiki.github.com - -Deployment - -* Merge pull request on github.com - diff --git a/readme.md b/readme.md index 78ea7fac2..44a038f71 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,4 @@ -

Welcome to TiddlyWiki5

Welcome to TiddlyWiki5, a reboot of TiddlyWiki, the non-linear personal web notebook first released in 2004. It is a complete interactive wiki in JavaScript that can be run from a single HTML file in the browser or as a powerful Node.js application.

The deep internal changes mean that TiddlyWiki5 is not fully compatible with previous versions with different plugins, themes and so on. Content prepared for previous versions of TiddlyWiki will need massaging to work properly in TiddlyWiki5.

The original TiddlyWiki Classic is still available at http://tiddlywiki.com/. -

This is TiddlyWiki5 version 5.0.0-alpha.16-prerelease (see the detailed ReleaseHistory and the RoadMap for getting to the full release). It is a great time to get involved and support the future development of TiddlyWiki5. TiddlyWiki is a free, open source project that depends on your love and support for its survival. -

Getting started with TiddlyWiki under Node.js

TiddlyWiki5 can be used on the command line to perform an extensive set of operations based on tiddlers, TiddlyWikiFolders, TiddlerFiles and TiddlyWikiFiles. For example, the following command loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in HTML:

node tiddlywiki.js --verbose --load mywiki.html --rendertiddler ReadMe ./readme.html

In order to use TiddlyWiki5 on the command line you must first install node.js from http://nodejs.org/

Usage

Running tiddlywiki.js from the command line boots the TiddlyWiki kernel, loads the core plugins and establishes an empty wiki store. It then sequentially processes the command line arguments from left to right. The arguments are separated with spaces.

The first argument is the optional path to the TiddlyWikiFolder to be loaded. If not present, then the current directory is used.

The commands and their individual arguments follow, each command being identified by the prefix --.

node tiddlywiki.js [<wikipath>] [--<command> [<arg>[,<arg>]]]

Script Files

For trying TiddlyWiki5 out under Node.js, several scripts are provided (.sh for *nix and .cmd for Windows):

bld: builds tw5.com

This script builds several variants of TiddlyWiki5 for deployment on tiddlywiki.com.

By default, files are output to a folder called jermolene.github.com, sibling to the TiddlyWiki5 source directory. For example:

/TiddlyWork/ - Directory for working with TiddlyWiki5
+

Welcome to TiddlyWiki5

This is the developer documentation hub for TiddlyWiki. This site contains all of the end user documentation that appears at http://five.tiddlywiki.com/.

Overview

Developer Cookbooks

Using TiddlyWiki for GitHub Pages project documentation

Internal Objects and Mechanisms

BootMechanism
DraftMechanism
EncryptionMechanism
LazyLoadingMechanism
ParsingMechanism
PluginMechanism
RenderingMechanism

Getting started with TiddlyWiki under Node.js

TiddlyWiki5 can be used on the command line to perform an extensive set of operations based on tiddlers, TiddlyWikiFolders, TiddlerFiles and TiddlyWikiFiles. For example, the following command loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in HTML:

node tiddlywiki.js --verbose --load mywiki.html --rendertiddler ReadMe ./readme.html

In order to use TiddlyWiki5 on the command line you must first install node.js from http://nodejs.org/

Usage

Running tiddlywiki.js from the command line boots the TiddlyWiki kernel, loads the core plugins and establishes an empty wiki store. It then sequentially processes the command line arguments from left to right. The arguments are separated with spaces.

The first argument is the optional path to the TiddlyWikiFolder to be loaded. If not present, then the current directory is used.

The commands and their individual arguments follow, each command being identified by the prefix --.

node tiddlywiki.js [<wikipath>] [--<command> [<arg>[,<arg>]]]

Script Files

For trying TiddlyWiki5 out under Node.js, several scripts are provided (.sh for *nix and .cmd for Windows):

bld: builds tw5.com

This script builds several variants of TiddlyWiki5 for deployment on tiddlywiki.com.

By default, files are output to a folder called jermolene.github.com, sibling to the TiddlyWiki5 source directory. For example:

/TiddlyWork/ - Directory for working with TiddlyWiki5
 	/TiddlyWiki5/ - Directory containing the TiddlyWiki5 repo from GitHub
 	/jermolene.github.com/ - Directory for output files

You can override the build output directory by defining the environment variable TW5_BUILD_OUTPUT. The easiest way to do this is to create a personal batch file to invoke TiddlyWiki5 that first sets the environment variable and then invokes bld.

The files output by bld are:

bld also runs the TiddlyWiki5 Node.js-based test suite (see TestingMechanism)

serve.sh <username> or serve.cmd <username>: serves tw5.com

This script starts TiddlyWiki5 running as an HTTP server with the content from the clientserver edition. By default, the Node.js serves on port 8080. If the optional username parameter is provided, it is used for signing edits.

To experiment with this configuration, run the script and then visit http://0.0.0.0:8080 in a browser.

Changes made in the browser propagate to the server over HTTP (use the browser developer console to see these requests). The server then syncs changes to the file system (and logs each change to the screen).

wbld: builds TiddlyWiki5 for TiddlyWeb

This script builds and deploys the code for TiddlyWiki5 in the Sky for TiddlyWeb. If you want to experiment with your own builds of TiddlyWiki5 for TiddlyWeb you could use this batch file as a base.

2bld: builds TiddlyWiki 2.6.5

This script builds TiddlyWiki 2.6.5 from the original source and then displays the differences between them (diff is used for *nix, fc for Windows).

Commands

The following commands are available:

LoadCommand

Load tiddlers from 2.x.x TiddlyWiki files (.html), .tiddler, .tid, .json or other files

--load <filepath>

PasswordCommand

Set a password for subsequent crypto operations

--password <password>

PrintCommand

The print command outputs specified information.

print tiddlers

Output the titles of the tiddlers in the wiki store

--print tiddlers

print tiddler

Print the fields of an individual tiddler

--print tiddler <title>

print system

Print the titles of the system tiddlers in the wiki store

--print system

print config

Print the current core configuration

--print config

RenderTiddlerCommand

Render an individual tiddler as a specified ContentType, defaults to text/html and save it to the specified filename

--rendertiddler <title> <filename> [<type>]

RenderTiddlersCommand

Render a set of tiddlers matching a filter to separate files of a specified ContentType (defaults to text/html) and extension (defaults to .html).

--rendertiddlers <filter> <template> <pathname> [<type>] [<extension>]

For example:

--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain

ServerCommand

The server built in to TiddlyWiki5 is very simple. Although compatible with TiddlyWeb it doesn't support many of the features needed for robust Internet-facing usage - in particular, TiddlyWiki5 is an old-school wiki in the sense that it offers no authentication.

At the root, it serves a rendering of a specified tiddler. Away from the root, it serves individual tiddlers encoded in JSON, and supports the basic HTTP operations for GET, PUT and DELETE.

--server <port> <roottiddler> <rendertype> <servetype> <username>

The parameters are:

For example:

--server 8080 $:/core/tiddlywiki5.template.html text/plain text/html MyUserName

VerboseCommand

Triggers verbose output, useful for debugging

--verbose

VersionCommand

Displays the version number of TiddlyWiki.

--version

This readme file was automatically generated by TiddlyWiki5

\ No newline at end of file