Technical documentation on the structure of the TreePad file format.
TreePad file format for TreePad 2.7 .hjt files:
The basic file format is text/ascii.
Inside the ascii file, the start of a TreePad file should be the line:
<hj-Treepad version 2.7>
where the version number can vary depending on the TreePad version which had been used to create/write the file.
each node looks like:
(Data type indicator)
<node>
(Node title)
(level indicator, 0 meaning at tree level 0, 1 meaning one level up, etc.)
the following lines are the article text, until you encounter:
<end node> 5P9i0s8y19Z
example for one node:
dt=text
<node>
mail from the President
4
Dear sir,
I would like to invite all computer programmers into the Oval Office
to help me run the country.
Sincerely,
G. Bush,
the White House
Washington
<end node> 5P9i0s8y19Z
The data type indicator 'dt=text' has been introduced by version 2.7 and will be ignored by earlier TreePad versions, so that the file format is backwards compatible.
'dt=text' indicates that the type of data inside the article connected to the next node is 'plain text'. A future RTF-enabled TreePad will be able to have RTF articles, so that dt=RTF or possibly also dt=HTML will be included.
The string 5P9i0s8y19Z is included to make sure that when someone types
<end node> in the article, the program will not get confused into thinking
the node has ended there (in the middle of the article).
The chance that someone types <end node> 5P9i0s8y19Z by accident into the article area
is very much smaller. Not a very beautiful implementation, but it's simple
and it works.
The order in which the nodes are listed in the TreePad file is determined
by the order in which they would appear in a fully expanded tree,
beginning at the top, and ending at the bottom.
E.g. a sequence of levels
(the numbers are indicating the node levels):
1 - 2 - 3 - 3 - 3 - 2
will be corresponding to the tree structure
(the numbers are indicating the node levels):
1 ___2
| |___3
| |___3
| |___3
|
|____2
Warning: if you store this text in TreePad, do not include any
"<end node> 5P9i0s8y19Z" as appearing in this text !!!!!
Future TreePad file formats
Since the current 2.7 file format (and earlier) does not support node marking,
node timestamps, encryption, password protection, etc., changes in the file format will
become necessary. This file format will also be fully public, future
TreePad versions will continue to support the current file format.