mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12:07:19 +00:00
Docs update
This commit is contained in:
parent
7fdd8985ef
commit
63da7ec980
@ -7,7 +7,7 @@ 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|RecipeFiles]] and all the subrecipes and [[tiddlers|TiddlerFiles]] that it references. The following options are available:
|
||||
The command line options are processed sequentially from left to right. Processing pauses during long operations, like loading a [[recipe file|RecipeFiles]] and all the subrecipes and [[tiddlers|TiddlerFiles]] that it references, and then resumes with the next command line option in sequence. The following options are available:
|
||||
|`--recipe <filepath>` |Loads a specfied `.recipe` file |
|
||||
|`--load <filepath>` |Load additional tiddlers from 2.x.x 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` in a new directory of the specified name |
|
||||
|
@ -1,15 +1,27 @@
|
||||
title: HelloThere
|
||||
modifier: JeremyRuston
|
||||
|
||||
<<view title link>>
|
||||
Welcome to TiddlyWiki5, a reboot of TiddlyWiki, the venerable, reusable non-linear personal web notebook first released in 2004. It is a complete interactive wiki that can run from a single HTML file or as a powerful [[node.js application|What is node.js?]].
|
||||
|
||||
Welcome to TiddlyWiki5, a reboot of the venerable, reusable non-linear personal web notebook first released in 2004. It is a complete interactive wiki that can run from a single HTML file or as a powerful `node.js` application.
|
||||
Some useful tiddlers for feature testing:
|
||||
* ImageTests showing different ways of embedding images
|
||||
* SampleData showing how JSON tiddlers are handled
|
||||
* VideoTests showing how different online video formats can be embedded
|
||||
|
||||
TiddlyWiki is based on the idea of making information more useful by modelling it in the smallest meaningful semantic units, referred to as "tiddlers". Structure comes from links, tags, and stories (sequences of tiddlers). Tiddlers use a wikitext notation that concisely represents a wide range of text formatting and hypertext features.
|
||||
|
||||
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 or 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.
|
||||
Technical documentation includes:
|
||||
* [[Testing]] regimen
|
||||
* Details of the CommandLineInterface
|
||||
* Overview of TiddlyWikiArchitecture
|
||||
** MacroInternals
|
||||
* Information about TiddlerFiles and RecipeFiles
|
||||
* NewWikiTextFeatures
|
||||
|
||||
TiddlyWiki5 is currently in early beta, which is to say that it is useful but incomplete. You can get involved in the development on GitHub and the discussions on Google Groups:
|
||||
|
||||
https://github.com/Jermolene/TiddlyWiki5
|
||||
http://groups.google.com/group/TiddlyWikiDev
|
||||
|
||||
<<<
|
||||
Bug: this link doesn't work:
|
||||
<<view title link>>
|
||||
<<<
|
@ -1,21 +1,29 @@
|
||||
title: MacroInternals
|
||||
|
||||
! Macro Fields
|
||||
|
||||
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) |
|
||||
|`handler` |The macro rendering function (see below) |
|
||||
|`events` |An optional hashmap of event handling functions (see below) |
|
||||
|`render` |The macro rendering function (see below) |
|
||||
|`rerender` |The optional macro rerendering function (see below) |
|
||||
|`dependentAll` |True if the macro needs access to all available tiddlers |
|
||||
|
||||
! Macro Parameters
|
||||
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) |
|
||||
|`byName` |Provided if the parameter should be referenced by name. The value can be `true` or `"default"` to indicate that anonymous parameters are acceptable |
|
||||
|`type` |The type of the parameter, either `text` or `tiddler` (used for dependency tracking) |
|
||||
|`rel` |The relationship for parameters of type tiddler - either "link" or "include" |
|
||||
|`optional` |`true` if the parameter is optional |
|
||||
|
||||
The `code` function is called with the following parameters:
|
||||
! Macro Rendering
|
||||
The `render` function should return the new text representation of the macro output. It is called with the following parameters:
|
||||
|
||||
|!Param Name |!Description |
|
||||
|`type` |The target MIME type for rendering the macro |
|
||||
@ -23,3 +31,28 @@ The `code` function is called with the following parameters:
|
||||
|`store` |The `WikiStore` object to be used |
|
||||
|`params` |The macro parameters as a hashmap |
|
||||
|`content` |The rendered text of the children of the macro |
|
||||
|
||||
!Macro Rerendering
|
||||
The `rerender` function is called with the following parameters:
|
||||
|
||||
|!Param Name |!Description |
|
||||
|`node` |The DOM node containing the existing rendering of the macro |
|
||||
|`changes` |Hashmap of `{title: "created|modified|deleted"}` |
|
||||
|`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 |
|
||||
|`content` |The rendered text of the children of the macro |
|
||||
|
||||
!Macro Event Handlers
|
||||
Event handlers are called with the following parameters:
|
||||
|
||||
|!Param Name |!Description |
|
||||
|`event` |The DOM node containing the existing rendering of the macro |
|
||||
|`node` |Hashmap of `{title: "created|modified|deleted"}` |
|
||||
|`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 |
|
||||
|
||||
Event handlers should return `false` if they handle the event (and generally should also call `event.preventDefault()`), and `true` if they do not.
|
||||
|
||||
|
5
tiddlywiki5/tiddlers/TiddlyWiki.tid
Normal file
5
tiddlywiki5/tiddlers/TiddlyWiki.tid
Normal file
@ -0,0 +1,5 @@
|
||||
title: TiddlyWiki
|
||||
|
||||
TiddlyWiki is based on the idea of making information more useful by modelling it in the smallest meaningful semantic units, referred to as "tiddlers". Structure comes from links, tags, and stories (sequences of tiddlers). Tiddlers use a wikitext notation that concisely represents a wide range of text formatting and hypertext features.
|
||||
|
||||
TiddlyWiki has earned an enduring role as a tool that people [[love using|Raves]] for its rich, interactive interface to manipulate complex data with structure that doesn't easily fit into conventional tools like spreadsheets or wordprocessors. Because people can use it without needing any complicated server infrastructure, and because it is [[open source|What 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|What is open source?]] project with a busy [[Community]] of independent developers.
|
Loading…
Reference in New Issue
Block a user