diff --git a/tiddlywiki5/tiddlers/CommandLineInterface.tid b/tiddlywiki5/tiddlers/CommandLineInterface.tid index 6a3cae84b..4b9932a50 100644 --- a/tiddlywiki5/tiddlers/CommandLineInterface.tid +++ b/tiddlywiki5/tiddlers/CommandLineInterface.tid @@ -12,9 +12,11 @@ The command line options are processed sequentially from left to right. Processi |{{{--recipe }}} |Loads a specfied `.recipe` file | |{{{--load }}} |Load additional tiddlers from TiddlyWiki files ({{{.html}}}), {{{.tiddler}}}, {{{.tid}}}, {{{.json}}} or other files | |{{{--savewiki }}} |Saves all the loaded tiddlers as a single file TiddlyWiki called {{{index.html}}} and an RSS feed called {{{index.xml}}} | +|{{{--savetiddler <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 | |{{{--dumpstore}}} |Dump the TiddlyWiki store in JSON format | |{{{--dumprecipe}}} |Dump the current recipe in JSON format | |{{{--verbose}}} |verbose output, useful for debugging | @@ -34,3 +36,5 @@ node tiddlywiki.js --load mywiki.html --savetiddlers tmp/tiddlers }}} !! Notes {{{--servewiki}}} and {{{--servertiddlers}}} are for different purposes and should not be used together. The former is for TiddlyWiki core developers who want to be able to edit the TiddlyWiki source files in a text editor and view the results in the browser by clicking refresh; it is slow because it reloads all the TiddlyWiki JavaScript files each time the page is loaded. The latter is for experimenting with the new wikification engine. + +`--wikitest` looks for `*.tid` files in the specified folder. It then wikifies the tiddlers to both "text/plain" and "text/html" format and checks the results against the content of the `*.html` and `*.txt` files in the same directory. \ No newline at end of file diff --git a/tiddlywiki5/tiddlers/HelloThere.tid b/tiddlywiki5/tiddlers/HelloThere.tid index 373fabe0a..a6f477abf 100644 --- a/tiddlywiki5/tiddlers/HelloThere.tid +++ b/tiddlywiki5/tiddlers/HelloThere.tid @@ -1,14 +1,6 @@ title: HelloThere modifier: JeremyRuston -Welcome to TiddlyWiki5, an [[in-progress|ThisIsAlpha]] reboot of TiddlyWiki, the reusable non-linear personal web notebook first released in 2004. - -<<tiddler [[Motovun Jack.jpg]]>> +Welcome to TiddlyWiki5, an interactive wiki [[under development|ThisIsAlpha]] 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|Raves]] for its rich, interactive interface to [[manipulate complex data|TiddlyWikiConcepts]] 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|OpenSourceLicense]], 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|OpenSourceLicense]] project with a busy [[Community]] of independent developers. - -TiddlyWiki5 gains new capabilities through a [[completely rebuilt architecture|TiddlyWikiArchitecture]] using the latest features of HTML5 and node.js. It runs natively under node.js, and can also use its own components to construct a version of itself that works entirely within the browser, just as TiddlyWiki has always done. - -TiddlyWiki5 also functions as the build system for earlier versions of TiddlyWiki, replacing the elderly Cook and Ginsu tools (see https://github.com/TiddlyWiki/cooker for details). See the CommandLineInterface for details. - -<<list all>> diff --git a/tiddlywiki5/tiddlers/Introduction.tid b/tiddlywiki5/tiddlers/Introduction.tid new file mode 100644 index 000000000..690e21b66 --- /dev/null +++ b/tiddlywiki5/tiddlers/Introduction.tid @@ -0,0 +1,9 @@ +title: Introduction + +<<tiddler [[Motovun Jack.jpg]]>> + +TiddlyWiki5 gains new capabilities through a [[completely rebuilt architecture|TiddlyWikiArchitecture]] using the latest features of HTML5 and node.js. It runs natively under node.js, and can also use its own components to construct a version of itself that works entirely within the browser, just as TiddlyWiki has always done. + +TiddlyWiki5 also functions as the build system for earlier versions of TiddlyWiki, replacing the elderly Cook and Ginsu tools (see https://github.com/TiddlyWiki/cooker for details). See the CommandLineInterface for details. + +<<list all>> \ No newline at end of file diff --git a/tiddlywiki5/tiddlers/MacroInternals.tid b/tiddlywiki5/tiddlers/MacroInternals.tid new file mode 100644 index 000000000..5faff569a --- /dev/null +++ b/tiddlywiki5/tiddlers/MacroInternals.tid @@ -0,0 +1,24 @@ +title: MacroInternals + +Macros are conventional JavaScript modules that export a single variable called `macro` that contains: + +|!Field Name |!Description | +|`name` |The name of the macro | +|`types` |An array of the MIME types that the macro can render | +|`params` |A hashmap of the parameters accepted by the macro (see below) | +|`code` |The macro rendering function (see below) | + +The `params` hashmap provides the following fields about each parameter: + +|!Param Field Name |!Description | +|`byName` |Provided if the parameter should be referenced by name. The value can be `true` or `"default"` to indicate that the parameter should accept anonymous parameters | +|`type` |The type of the parameter, from `text` or `tiddler` (used for dependency tracking) | +|`optional` |`true` if the parameter is optional | + +The `code` function is called with the following parameters: + +|!Param Name |!Description | +|`type` |The target MIME type for rendering the macro | +|`tiddler` |The tiddler in whose context the macro is being rendered | +|`store` |The `WikiStore` object to be used | +|`params` |The macro parameters as a hashmap | diff --git a/tiddlywiki5/tiddlers/NewWikiTextFeatures.tid b/tiddlywiki5/tiddlers/NewWikiTextFeatures.tid index e4d17c6a4..37be62372 100644 --- a/tiddlywiki5/tiddlers/NewWikiTextFeatures.tid +++ b/tiddlywiki5/tiddlers/NewWikiTextFeatures.tid @@ -21,4 +21,4 @@ A multiline parameter that can go on for as long as it likes and contain linebreaks. )) >> -}}} +}}} \ No newline at end of file diff --git a/tiddlywiki5/tiddlers/ReadMe.tid b/tiddlywiki5/tiddlers/ReadMe.tid new file mode 100644 index 000000000..1eb06a06d --- /dev/null +++ b/tiddlywiki5/tiddlers/ReadMe.tid @@ -0,0 +1,12 @@ +title: ReadMe + +!Welcome to TiddlyWiki5 +<<tiddler HelloThere>> +!Usage +<<tiddler CommandLineInterface>> +!Testing +<<tiddler Testing>> +!Planned WikiText Features +<<tiddler NewWikiTextFeatures>> + +//This `readme` file was automatically generated by TiddlyWiki5// diff --git a/tiddlywiki5/tiddlers/StoryTiddlers.tid b/tiddlywiki5/tiddlers/StoryTiddlers.tid index 90db46d1d..793e0cd3a 100644 --- a/tiddlywiki5/tiddlers/StoryTiddlers.tid +++ b/tiddlywiki5/tiddlers/StoryTiddlers.tid @@ -1,5 +1,6 @@ title: StoryTiddlers HelloThere +Introduction ThisIsAlpha NewWikiTextFeatures diff --git a/tiddlywiki5/tiddlers/Testing.tid b/tiddlywiki5/tiddlers/Testing.tid new file mode 100644 index 000000000..f4fcedd5c --- /dev/null +++ b/tiddlywiki5/tiddlers/Testing.tid @@ -0,0 +1,3 @@ +title: Testing + +`test.sh` contains a simple test script that cooks the main tiddlywiki.com recipe and compares it with the results of the old build process (ie, running cook.rb and then opening the file in a browser and performing a 'save changes' operation). It also runs a series of wikifications tests that work off the data in `test/wikitests/`. \ No newline at end of file diff --git a/tiddlywiki5/tiddlers/split.recipe b/tiddlywiki5/tiddlers/split.recipe index ae225e487..0c3f190f2 100644 --- a/tiddlywiki5/tiddlers/split.recipe +++ b/tiddlywiki5/tiddlers/split.recipe @@ -6,6 +6,10 @@ tiddler: TiddlerFiles.tid tiddler: TiddlyWikiArchitecture.tid tiddler: TiddlyWikiInternals.tid tiddler: NewWikiTextFeatures.tid +tiddler: MacroInternals.tid +tiddler: ReadMe.tid +tiddler: Testing.tid +tiddler: Introduction.tid tiddler: Motovun Jack.jpg