January 04, 2000 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: 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 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: 5P9i0s8y19Z example for one node: dt=text 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 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 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 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 " 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. Henk Hagedoorn Web1: http://www.treepad.com Web2: http://www.freebyte.com email: software@freebyte.com Freebyte Almere, the Netherlands