Updated 2011-05-17 13:54:01 by torsten

This is the format of the data that the wubwikit returns when page names are terminated with the ".str" suffix in the browser, e.g. http://wiki.tcl.tk/19885.str

Wiki data is stored in the wikit database in a stream format. It has no particular significance beyond that which jcw attributed to it in format.tcl (a component of wikit) as an intermediate form for storing partially decoded wikit text, and there was no real utility in providing it as an output format beyond (perhaps) some hypothetical future wikit-to-wikit transfer facility. (CMcC)

The format of this stream and the meaning of the elements is only documented in the source code within the file WFormat.tcl:
  # Ad "Stream") This is the first time that the stream format is documented.
  #
  #     The base format is that of a list of pairs {cmd arg cmd arg ...}
  #     The available commands fall into three categories [x]:
  #
  #     1. Data carriers
  #     2. Visual markers
  #     3. Structural markers
  #
  #     [x] In the previous incarnation of this stream format the categories
  #         were essentially all mixed up and jumbled together. For example
  #         the command 'T' crossed category 1 and 3, introducing a new para-
  #         graph and also carrying the first fragment of text of said para-
  #         graph. That made for difficult creation and difficult interpreta-
  #         tion. It is the separation of the categories which makes the re-
  #         organized format much easier to generate and convert (<=> simpler
  #         code, which is even faster). (Not to mention the eviction of
  #         treating [, ], {, }, and \ as special characters. They are not).
  #
  #     Ad 1)   The empty string and 'g', 'u' and 'x'. The first is for text,
  #             the others specify the various possible links.
  #
  #             Cmd        Argument
  #             ------------------------------------------------------
  #             {}        The text to display
  #             g        Name/Title of referenced wiki page
  #             u        external URL, was unbracket'ed in sources
  #             x        external URL, bracket'ed in sources
  #             ------------------------------------------------------
  #
  #     Ad 2)   Currently only two: 'b' and 'i' for bold and italic emphasis.
  #             The argument specifies if the emphasis is switched on or off.
  #             The permitted values are 0 (off) and 1 (on).
  #
  #     Ad 3)   These are the markers for the various distinctive sections
  #             in wiki markup.
  #
  #             Cmd        'Begin'                         Argument
  #             ------------------------------------------------------
  #             T        Paragraph                                Nesting level
  #             Q        Quoted line                                Nesting level
  #             U        List item (unordered)        Nesting level
  #             O        List item (enumerated)        Nesting level
  #             I        List item (term)                Nesting level
  #             D        List item (term def)        Nesting level
  #             H        Horizontal rule                        Line-width
  #                          C code lines
  #             ------------------------------------------------------
  #
  #             Note: The current frontend renderer provides only nesting
  #                   level 0 and a line-width 1. The current backend
  #                   renderers ignore this information.
  #

Category Wikit