Wiki on a Stick Interchange Format is the preferred format for exporting full WoaS data into a single file and share it with whoever you like.

Format description

WSIF format is similar to MIME email attachments format; each line comes like an email header definition, as in following example: header-value

All WSIF content must be ASCII, so header-value must be ECMA-escaped when necessary; this corresponds to escaping slashes "\" to "\\" and any UTF-8 sequence to the corresponding "\u0000" string, where 0000 is the lowercase hexadecimal value of the UTF-8 character (like in ECMAScript).

WSIF files can contain custom headers, given that the following namespaces are currently reserved for official WSIF format support:For example you could define a new namespace for header definitions called custom:
custom.x: 100 custom.y: 200 custom.content: Hello world!

It is up to you then to parse such header-value couples and give them proper representation.

Inline boundaries

A line starting with two dashes (--) introduces an inline boundary, which is a properly encoded snippet.

Example boundary:
--my-random-id this is the inline snippet --my-random-id

my-random-id must be a (usually random) string unique inside the boundary content, but it does not need to be unique inside the whole WSIF file, which must be read sequentially (like in a state machine).

wsif namespace

The wsif. namespace currently defines only an information header:
Version 1.1.0 and above are currently supported.

woas namespace

The woas. namespace defines general WoaS content properties and specific WoaS pages; the following headers are defined for general context:
The following are header definitions specific for WoaS pages:
All headers are mandatory (under their specific state definition branch), except last_modified and original_length.


The header can contain one of the following values:
Pages or header values are encoded in ecma/plain format when UTF-8 sequences are found inside the value string, otherwise 8bit/plain is used; 8bit/base64 is instead used for binary files or encrypted pages.

Usage notes

WSIF format is pretty straightforward to produce or interpret, however please consider the following facts:
WoaS project offers an official PHP library (libwsif) for reading/writing WSIF files, as well as a documented example.