1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-27 02:20:28 +00:00
TiddlyWiki5/archive/tiddlywiki5/store/TiddlerFiles.tid

47 lines
2.0 KiB
Plaintext
Raw Normal View History

2011-12-28 16:10:57 +00:00
title: TiddlerFiles
2012-01-03 11:10:50 +00:00
modifier: JeremyRuston
2011-12-28 16:10:57 +00:00
2012-01-23 18:31:24 +00:00
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:
2012-02-11 17:11:23 +00:00
{{{
2011-12-28 16:10:57 +00:00
title: TheTitle
modifier: someone
2012-02-11 17:11:23 +00:00
}}}
2011-12-28 16:10:57 +00:00
!! ~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:
2012-02-11 17:11:23 +00:00
{{{
2011-12-28 16:10:57 +00:00
title: MyTiddler
modifier: Jeremy
This is the text of my tiddler.
2012-02-11 17:11:23 +00:00
}}}
2012-01-23 18:31:24 +00:00
//The MIME type `application/x-tiddler` is used internally for these files//
!! TiddlyWiki `<DIV>` .tiddler files
2011-12-28 16:10:57 +00:00
2012-01-23 18:31:24 +00:00
Modern `*.tiddler` files look like this:
2012-02-11 17:11:23 +00:00
{{{
2011-12-28 16:10:57 +00:00
<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>
2012-02-11 17:11:23 +00:00
}}}
2012-01-23 18:31:24 +00:00
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.
2011-12-28 16:10:57 +00:00
2012-01-23 18:31:24 +00:00
Older `*.tiddler` files more closely matched the store format used by TiddlyWiki at the time:
2012-02-11 17:11:23 +00:00
{{{
2011-12-28 16:10:57 +00:00
<div tiddler="AnotherExampleStyleSheet" modifier="JeremyRuston" modified="200508181432" created="200508181432" tags="examples">This is an old-school .tiddler file, without an embedded &lt;pre&gt; tag.\nNote how the body is &quot;HTML encoded&quot; and new lines are escaped to \\n</div>
2012-02-11 17:11:23 +00:00
}}}
2012-01-23 18:31:24 +00:00
//The MIME type `application/x-tiddler-html-div` is used internally for these files//
2011-12-28 16:10:57 +00:00
!! ~TiddlyWeb-style JSON files
2012-01-23 18:31:24 +00:00
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`.
2011-12-28 16:10:57 +00:00
2012-01-23 18:31:24 +00:00
//The MIME type `application/json` is used internally for these files//
2011-12-28 16:10:57 +00:00
!! TiddlyWiki HTML files
2012-01-23 18:31:24 +00:00
TiddlyWiki HTML files contain a collection of tiddlers encoded in `<DIV>` format.
2011-12-28 16:10:57 +00:00
2012-01-23 18:31:24 +00:00
//The MIME type `application/x-tiddlywiki` is used internally for these files//