home *** CD-ROM | disk | FTP | other *** search
/ Logiciels PC 26 / LogicielsPC_26.iso / Accuses / Nouveau / TreePad / fileformat.txt < prev    next >
Text File  |  2001-07-14  |  3KB  |  87 lines

  1. July 14, 2001
  2.  
  3. Technical documentation on the structure of the TreePad file format.
  4.  
  5. TreePad file format for TreePad 2.8 .hjt files:
  6.  
  7. The basic file format is text/ascii.
  8. Inside the ascii file, the start of a TreePad file should be the line:
  9. <hj-Treepad version 2.7>
  10. where the version number can vary depending on the TreePad version which had been used to create/write the file.
  11.  
  12. each node looks like:
  13.  
  14.   (Data type indicator)
  15.   <node>
  16.   (Node title)
  17.   (level indicator, 0 meaning at tree level 0, 1 meaning one level up, etc.)
  18.   the following lines are part of the article text, until the closing line ('end node'), which is:
  19.   <end node> 5P9i0s8y19Z
  20.  
  21. example for one node:
  22.  
  23.   dt=text
  24.   <node>
  25.   mail from the President
  26.   4
  27.   Dear sir,
  28.  
  29.   I would like to invite all TreePad users into the Oval Office
  30.   to help me learn how to use TreePad.
  31.   Sincerely,
  32.  
  33.   G. Bush,
  34.   the White House
  35.   Washington
  36.   <end node> 5P9i0s8y19Z
  37.  
  38. 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. 
  39. '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. 
  40.  
  41. The string 5P9i0s8y19Z is included to make sure that when someone types
  42. <end node> in the article, the program will not get confused into thinking
  43. the node has ended there (in the middle of the article). 
  44. The chance that someone types <end node> 5P9i0s8y19Z by accident into the article area
  45. is very much smaller. Not a very beautiful implementation, but it's simple
  46. and it works.
  47.  
  48. The order in which the nodes are listed in the TreePad file is determined
  49. by the order in which they would appear in a fully expanded tree,
  50. beginning at the top, and ending at the bottom.
  51.  
  52. E.g. a sequence of levels
  53. (the numbers are indicating the node levels):
  54.  
  55. 1 - 2 - 3 - 3 - 3 - 2
  56.  
  57. will be corresponding to the tree structure
  58. (the numbers are indicating the node levels):
  59.  
  60. 1 ___2
  61. |    |___3
  62. |    |___3
  63. |    |___3
  64. |
  65. |____2
  66.  
  67.  
  68. Warning: if you store this text in TreePad, do not include any 
  69. "<end node> 5P9i0s8y19Z" as appearing in this text !!!!!
  70.  
  71.  
  72. Future TreePad file formats
  73.  
  74. Since the current 2.7 file format (and earlier) does not support node marking, 
  75. node timestamps, encryption, password protection, etc., changes in the file format will 
  76. become necessary. This file format will also be fully public, future
  77. TreePad versions will continue to support the current file format.
  78.  
  79.  
  80. Henk Hagedoorn
  81. Web1: http://www.treepad.com
  82. Web2: http://www.freebyte.com
  83. email: software@freebyte.com
  84. Freebyte
  85. Almere, the Netherlands
  86.  
  87.