mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 21:39:57 +00:00
55397e0ab1
Thanks @xcazin
80 lines
2.9 KiB
Plaintext
80 lines
2.9 KiB
Plaintext
created: 20130825150000000
|
|
modified: 20140912141751154
|
|
tags: [[TiddlyWiki on Node.js]]
|
|
title: TiddlerFiles
|
|
type: text/vnd.tiddlywiki
|
|
|
|
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:
|
|
|
|
```
|
|
title: TheTitle
|
|
modifier: someone
|
|
```
|
|
|
|
!! ~TiddlyWeb-style .tid files
|
|
|
|
These files consist of a sequence of lines containing name:value pairs, a blank line and then the text of the tiddler. For example:
|
|
|
|
```
|
|
title: MyTiddler
|
|
modifier: Jeremy
|
|
|
|
This is the text of my tiddler.
|
|
```
|
|
|
|
Note that many text editors require that files include a terminating newline. If you want to avoid including the terminating newline in the text of the tiddler you can use this alternative syntax:
|
|
|
|
```
|
|
title: MyTiddler
|
|
modifier: Jeremy
|
|
text: This is the text of my tiddler.
|
|
```
|
|
|
|
//The ContentType `application/x-tiddler` is used internally for these files//
|
|
|
|
!! TiddlyWiki `<DIV>` .tiddler files
|
|
|
|
Modern `*.tiddler` files look like this:
|
|
|
|
```
|
|
<div title="AnotherExampleStyleSheet" modifier="blaine" created="201102111106" modified="201102111310" tags="examples" creator="psd">
|
|
<pre>Note that there is an embedded <pre> tag, and line feeds are not escaped.
|
|
|
|
And, weirdly, there is no HTML encoding of the body.</pre>
|
|
</div>
|
|
```
|
|
|
|
These `*.tiddler` files are therefore not quite the same as the tiddlers found inside a TiddlyWiki HTML file, where the body is HTML encoded in the expected way.
|
|
|
|
Older `*.tiddler` files more closely matched the store format used by TiddlyWiki at the time:
|
|
|
|
```
|
|
<div tiddler="AnotherExampleStyleSheet" modifier="JeremyRuston" modified="200508181432" created="200508181432" tags="examples">This is an old-school .tiddler file, without an embedded <pre> tag.\nNote how the body is "HTML encoded" and new lines are escaped to \\n</div>
|
|
```
|
|
|
|
//The ContentType `application/x-tiddler-html-div` is used internally for these files//
|
|
|
|
!! ~TiddlyWeb-style JSON files
|
|
|
|
These files are a straightforward array of hashmaps of name:value fields. Currently only these known fields are processed: `title`, `text`, `created`, `creator`, `modified`, `modifier`, `type` and `tags`.
|
|
|
|
//The ContentType `application/json` is used internally for these files//
|
|
|
|
!! TiddlyWiki HTML files
|
|
|
|
TiddlyWiki HTML files contain a collection of tiddlers encoded in `<DIV>` format.
|
|
|
|
The minimal requirement for an HTML file to be importable as an unencrypted TW file is that it has a `<div id="storeArea">` immediately preceding the tiddler DIVs, which must be followed by a `</div>`. For example:
|
|
|
|
```
|
|
<div id="storeArea">
|
|
<div created="20130302085406905" modified="20130302084548184" tags="Examples" title="A tiddler title">
|
|
<pre>HTML encoded text of tiddler
|
|
</pre>
|
|
</div>
|
|
<div created="20140315085406905" modified="20140321084548184" tags="One Two [[Three with Space]]" title="Another title" customfield="field value">
|
|
<pre>Text of this tiddler
|
|
</pre>
|
|
</div>
|
|
```
|