Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Documentation for Twee?

Where would I find documentation for the Twee file format?

I've got some branching process flows already in another program and I'm wondering what it would look like if we used Twine to build a story to visualize it.  As twine imports Twee it could be usable as an interchange format (certainly easier than retyping everything, and probably a lot simpler than the HTML format).

Comments

  • I am assuming that your asking about the files with the extension of 'twee' (also 'tw' and 'txt')

    From what I understand the file is basically made up of two types of lines:

    1. Passage Header - those that start with two colons '::'
    2. Passage Text - all the other lines

    A Passage consists of a single Passage Header line followed by one or more Passage Text lines until either another Passage Header is encounter or the end of the file is reached, whichever comes first.

    :: Header of Passage 1
    Some text belonging to Passage 1

    It can cover one or more lines and also include blank lines like the ones directly above and below this one.

    :: Header of Passage 2
    The Passage Header itself is made up of two parts:

    1. The Passage Name
    2. The Associated Tags - these are surrounded by square brackets and are optional.

    :: Passage Name [associated tags]
    As to where this is documented (besides in the source code) I don't know
  • Ah. Ok. An experiment with export to Twee shows it seems to use the same markup as the text passages in the twine editor do (or at least that the export dumped the passage text verbatim into the twee passages).  Should make it fairly easy to build twee files with links and the like.
Sign In or Register to comment.