.tid file format

296 views
Skip to first unread message

David Shaw

unread,
Jun 16, 2021, 4:12:56 AM6/16/21
to tiddl...@googlegroups.com
Is the format of a .tid file available anywhere?

I ask because I am using Python to pull information from the Web, which I then want to get into a Tiddlywiki and, for reasons that are far too long, complicated and boring to go into here, I am having to do all this on an Android device and can't get JSON import to work in Tiddloid. 

Many thanks,

David Shaw

Soren Bjornstad

unread,
Jun 16, 2021, 8:29:11 AM6/16/21
to TiddlyWiki
David,

I parse them all the time and there's not really much to it – most of the fields are at the top separated from their values by a colon and a space, and then after the first blank line is the text field.

I imagine this may change slightly in the upcoming version 5.2 since field names are going to be allowed to contain more characters than they currently do (not sure what would happen if you put a colon in a field name in 5.2, for instance).

Soren Bjornstad

unread,
Jun 16, 2021, 8:31:49 AM6/16/21
to TiddlyWiki
To be clear since it sounds like you might be trying to create them from scratch without any reference to look off, you probably want to include at least the fields created, modified, tags, title, and type. Type is text/vnd.tiddlywiki for standard wikitext, and created/modified are YYYYMMDDHHMMSSXXX timestamps (normalized to UTC).

Jeremy Ruston

unread,
Jun 16, 2021, 10:32:37 AM6/16/21
to tiddl...@googlegroups.com
Just to add that the .tid file format really is as simple as it looks, with the constraints implied by that simplicity:

* Field names cannot contain colons
* Field values (apart from the "text" field) cannot contain newlines

The core works around these limitations by saving tiddlers in JSON format if they don't meet the criteria for .tid files.

Best wishes

Jeremy
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c0a69b7a-3d77-479e-af4a-98722feb3d85n%40googlegroups.com.

David Shaw

unread,
Jun 16, 2021, 12:16:47 PM6/16/21
to tiddl...@googlegroups.com
Thanks to all for your replies; that was exactly the information I was looking for. Now to get Pythoning.

David Shaw 

Soren Bjornstad

unread,
Jun 16, 2021, 6:05:05 PM6/16/21
to TiddlyWiki
Aha, you've accidentally solved the mystery of why I have two tiddlers stored as JSON in my Zettelkasten wiki! They have newlines in fields. Thanks. :-)
Reply all
Reply to author
Forward
0 new messages