1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-25 23:03:15 +00:00

Docs updates

This commit is contained in:
Jeremy Ruston 2012-05-20 18:47:11 +01:00
parent 3077f392a1
commit 85f1b33ef2
27 changed files with 85 additions and 65 deletions

View File

@ -5,59 +5,6 @@ module-type: wikimethod
Adds tiddler filtering to the $tw.Wiki object.
TiddlyWiki has a special syntax for expressing filters. They can be used to select tiddlers for an operation, or to filter a set of tiddlers to add or remove members.
The mechanism is easiest to understand by first presenting some example filter strings:
|!Filter |!Results |
|`HelloThere` |The single tiddler titled `HelloThere` (if it exists) |
|`[[A Title With Several Words]]` |The single tiddler titled `A Title With Several Words` (if it exists) |
|`[title[MyTiddler]]` |The single tiddler titled `MyTiddler` (if it exists) |
|`HelloThere Introduction` |The tiddlers titled `HelloThere` and `Introduction` (if they exist) |
|`[tag[important]]` |Any tiddlers with the tag `important` |
|`[!tag[important]]` |Any tiddlers not with the tag `important` |
|`[tag[important]sort[title]]` |Any tiddlers with the tag `important` sorted by title |
|`[tag[important]!sort[title]]` |Any tiddlers with the tag `important` reverse sorted by title |
|`[[one][two][three]tag[tom]]` |Any of the tiddlers called `one`, `two` or `three` that exist and are tagged with `tom` |
|`[[one][two][three]] [tag[tom]]` |Any of the tiddlers called `one`, `two` or `three` that exist, along with all of the source tiddlers that are tagged with `tom` |
|`[tag[tom]] [tag[harry]] -[[one][two][three]]` |All tiddlers tagged either `tom` or `harry`, but excluding `one`, `two` and `three` |
[[one]] [[two]] [tag[three]] -[[four]] +[sort[title]]
[tag[important]] -[[one][two]] -[[three]] +[sort[-modified]limit[20]]
A filter string consists of one or more filter operations, each comprising one or more filter operators with associated operands.
The operators look like `[operator[operand]]`, where `operator` is one of:
* ''title'': selects the tiddler with the title given in the operand
* ''is'': tests whether a tiddler is a member of the system defined set named in the operand (see below)
* ''has'': tests whether a tiddler has a specified field
* ''sort'': sorts the tiddlers by a given field
* ''limit'': limits the number of subresults
* ''tag'': tests whether a given tag is (`[tag[mytag]]`) or is not (`[!tag[mytag]]`) present on the tiddler
* ''<field>'': tests whether a tiddler field has a specified value (`[modifier[Jeremy]]`) or not (`[!modifier[Jeremy]]`)
An operator can be negated with by preceding it with `!`, for example `[!tag[Tommy]]` selects the tiddlers that are not tagged with `Tommy`.
The operator defaults to `title` if omitted, so `[[HelloThere]]` is equivalent to `[title[HelloThere]]`. If there are no spaces in the title, then the double square brackets can also be omitted: `HelloThere`.
The operands available with the `is` operator are:
* ''tiddler'': selects all ordinary (non-shadow) tiddlers
Operators are combined into logically ANDed expressions by bashing them together and merging the square brackets:
{{{
[tag[one]] [tag[two]] ---> [tag[one]tag[two]]
}}}
Operations can be preceded with `-` to negate their action, removing the selected tiddlers from the results. For example, `[tag[Tommy]] -HelloThere -[[Another One]]` selects all tiddlers tagged with `Tommy` except those titled `HelloThere` or `Another One`.
Operations can be preceded with `+` in order to make them apply to all of the current results, rather than the original source. For example, `[tag[Jeremy]] [tag[Tommy]] +[sort[title]]` selects the tiddlers tagged `Tommy` or `Jeremy`, and sorts them by the `title` field.
Filters are processed with the following elements:
* a string of filter operations, each made up of one or more filter operators
* the incoming source tiddlers
* the overall result stack
* the subresult stack of the tiddlers selected by the current operation
\*/
(function(){

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
title: Command Line Sketch.jpg
modifier: JeremyRuston
type: image/jpeg
tags: Picture
tags: picture

View File

@ -1,5 +1,6 @@
title: CommandLineInterface
modifier: JeremyRuston
tags: feature
TiddlyWiki5 can be used on the command line to perform an extensive set of operations based on tiddlers, TiddlerFiles and TiddlyWikiFiles. For example, this loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in HTML:
{{{

View File

@ -1,6 +1,7 @@
title: HelloThere
modifier: JeremyRuston
tags: Introduction
tags: introduction
type: text/x-tiddlywiki-new
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 in the browser or as a powerful [[node.js application|What is node.js?]].

View File

@ -1,4 +1,5 @@
title: ImageTests
tags: demo
This tiddler demonstrates different ways of displaying images
{{{

View File

@ -1,5 +1,5 @@
title: Introduction
tags: Introduction
tags: introduction
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.

View File

@ -1,4 +1,4 @@
title: Main Screen Sketch.jpg
modifier: JeremyRuston
type: image/jpeg
tags: Picture
tags: picture

View File

@ -1,4 +1,4 @@
title: Motovun Jack.jpg
type: image/jpeg
source: http://www.flickr.com/photos/jermy/6292279493/in/photostream
tags: Picture
tags: picture

View File

@ -1,3 +1,3 @@
title: Motovun Jack.svg
type: image/svg+xml
tags: Picture
tags: picture

View File

@ -1,5 +1,6 @@
title: NewWikiTextFeatures
modifier: JeremyRuston
tags: feature
It is proposed to extend the existing TiddlyWiki WikiText syntax with the following extensions

View File

@ -1,8 +1,8 @@
title: PluginMechanism
tags: internals
!Introduction
TiddlyWiki5 is based on a 500 line boot kernel that runs on node.js or in the browser, and everything
else is plugins.
TiddlyWiki5 is based on a 500 line boot kernel that runs on node.js or in the browser, and everything else is plugins.
The kernel boots just enough of the TiddlyWiki environment to allow it to load tiddlers as plugins and execute them (a barebones tiddler class, a barebones wiki store class, some utilities etc.). Plugin modules are written like `node.js` modules; you can use `require()` to invoke sub components and to control load order.

View File

@ -1,4 +1,5 @@
title: ReadMe
tags: introduction
!Welcome to TiddlyWiki5
<<tiddler HelloThere>>

View File

@ -1,5 +1,6 @@
title: SampleData
type: application/json
tags: demo
{
"glossary": {

View File

@ -1,5 +1,6 @@
title: SampleJavaScript
type: application/javascript
tags: demo
/*
This is an example JavaScript file

View File

@ -1,5 +1,6 @@
title: SampleJavaScriptWithError
type: application/javascript
tags: demo
/*
This is an example JavaScript program that contains an error

View File

@ -1,4 +1,5 @@
title: SliderTests
tags: demo
The status of this slider is stored in the tiddler JackSlider:
<<slider JackSlider "Motovun Jack.jpg" "TiddlyWiki Kitten »" "See the kitten">>

View File

@ -1,3 +1,3 @@
title: Tiddler Fishes.svg
type: image/svg+xml
tags: Picture
tags: picture

View File

@ -1,5 +1,6 @@
title: TiddlerFiles
modifier: JeremyRuston
tags: internals
Tiddlers can be stored in text files in several different formats. Files containing single tiddlers can also have an auxiliary `.meta` file formatted as a sequence of name:value pairs:
{{{

View File

@ -0,0 +1,55 @@
title: TiddlerFilters
tags: feature
TiddlyWiki has a special syntax for expressing filters. They can be used to select tiddlers for an operation, or to filter a set of tiddlers to add or remove members.
The mechanism is easiest to understand by first presenting some example filter strings:
|!Filter |!Results |
|`HelloThere` |The single tiddler titled `HelloThere` (if it exists) |
|`[[A Title With Several Words]]` |The single tiddler titled `A Title With Several Words` (if it exists) |
|`[title[MyTiddler]]` |The single tiddler titled `MyTiddler` (if it exists) |
|`HelloThere Introduction` |The tiddlers titled `HelloThere` and `Introduction` (if they exist) |
|`[tag[important]]` |Any tiddlers with the tag `important` |
|`[!tag[important]]` |Any tiddlers not with the tag `important` |
|`[tag[important]sort[title]]` |Any tiddlers with the tag `important` sorted by title |
|`[tag[important]!sort[title]]` |Any tiddlers with the tag `important` reverse sorted by title |
|`[[one][two][three]tag[tom]]` |Any of the tiddlers called `one`, `two` or `three` that exist and are tagged with `tom` |
|`[[one][two][three]] [tag[tom]]` |Any of the tiddlers called `one`, `two` or `three` that exist, along with all of the source tiddlers that are tagged with `tom` |
|`[tag[tom]] [tag[harry]] -[[one][two][three]]` |All tiddlers tagged either `tom` or `harry`, but excluding `one`, `two` and `three` |
[[one]] [[two]] [tag[three]] -[[four]] +[sort[title]]
[tag[important]] -[[one][two]] -[[three]] +[sort[-modified]limit[20]]
A filter string consists of one or more filter operations, each comprising one or more filter operators with associated operands.
The operators look like `[operator[operand]]`, where `operator` is one of:
* ''title'': selects the tiddler with the title given in the operand
* ''is'': tests whether a tiddler is a member of the system defined set named in the operand (see below)
* ''has'': tests whether a tiddler has a specified field
* ''sort'': sorts the tiddlers by a given field
* ''limit'': limits the number of subresults
* ''tag'': tests whether a given tag is (`[tag[mytag]]`) or is not (`[!tag[mytag]]`) present on the tiddler
* ''<field>'': tests whether a tiddler field has a specified value (`[modifier[Jeremy]]`) or not (`[!modifier[Jeremy]]`)
An operator can be negated with by preceding it with `!`, for example `[!tag[Tommy]]` selects the tiddlers that are not tagged with `Tommy`.
The operator defaults to `title` if omitted, so `[[HelloThere]]` is equivalent to `[title[HelloThere]]`. If there are no spaces in the title, then the double square brackets can also be omitted: `HelloThere`.
The operands available with the `is` operator are:
* ''tiddler'': selects all ordinary (non-shadow) tiddlers
Operators are combined into logically ANDed expressions by bashing them together and merging the square brackets:
{{{
[tag[one]] [tag[two]] ---> [tag[one]tag[two]]
}}}
Operations can be preceded with `-` to negate their action, removing the selected tiddlers from the results. For example, `[tag[Tommy]] -HelloThere -[[Another One]]` selects all tiddlers tagged with `Tommy` except those titled `HelloThere` or `Another One`.
Operations can be preceded with `+` in order to make them apply to all of the current results, rather than the original source. For example, `[tag[Jeremy]] [tag[Tommy]] +[sort[title]]` selects the tiddlers tagged `Tommy` or `Jeremy`, and sorts them by the `title` field.
Filters are processed with the following elements:
* a string of filter operations, each made up of one or more filter operators
* the incoming source tiddlers
* the overall result stack
* the subresult stack of the tiddlers selected by the current operation

View File

@ -1,6 +1,7 @@
title: TiddlyWiki
modifier: JeremyRuston
modified: 20120211110622
tag: introduction
TiddlyWiki is a rich, interactive interface for manipulating complex data with structure that doesn't easily fit into conventional tools like spreadsheets or wordprocessors.

View File

@ -1,5 +1,6 @@
title: TiddlyWikiArchitecture
modifier: JeremyRuston
tags: internals
!! Overview

View File

@ -1,4 +1,5 @@
title: TryingOutTiddlyWiki
tags: introduction
For trying TiddlyWiki5 out under node.js, two batch files are provided:

View File

@ -1,4 +1,5 @@
title: TypedBlockTests
tags: demo
WikiText can include blocks of text that are rendered with an explicit MIME type like this:
{{{

View File

@ -1,4 +1,5 @@
title: VideoTests
tags: demo
Here is a collection of embedded videos. Try opening and closing tiddlers while the videos are playing; they should not be affected.

View File

@ -1,4 +1,4 @@
title: View Switcher Sketch.jpg
modifier: JeremyRuston
type: image/jpeg
tags: Picture
tags: picture

View File

@ -1,4 +1,5 @@
title: WaysToUseTiddlyWiki
tags: feature
!Introduction
TiddlyWiki5 will be deployable in a wide variety of different arrangements to suit different needs. The archetypal configurations are listed below along with a measure of how much complexity is involved in setting up each one -- once set up properly, the TiddlyWiki user experience should be consistent regardless of configuration.