Tinderbox content can be exported in OPML using appropriate templates, taking care to encode for XML standards and to encode paragraph breaks in $Text. The following operators are provided to assist with OPML export:
- attributeEncode()
- ^opmlEncode()^ (now deprecated in favour of the above)
The OPML standard is still quote loose but the following is a list of TB attributes to standard and common non-standard OPML attributes (non-standard tags in italics):
- $Name --> text
- $Text --> _note
- $Checked --> _status
Note that the OPML <expansionState>
element is not supported. Tinderbox's outline branch expand/collapse state is not accessible as an attribute to populate the tag. However, for data validation's sake, do include the empty tag (<expansionState></expansionState>
) in any export templates.
From v5.10.0, a pair of wrapper/item templates - similar to those below - were added to the built-in templates. Scrivener users get similar (OPML-based) template for export for ingest Scrivener
Below are specimen templates for OPML export. Use the 'OPML-wrapper' template with a container note containing all the top level note(s) forming the actual OPML items. The 'OPML-wrapper' calls the 'OPML-item' template which then recursively calls itself to build out the OPML outline:
Dates in OPML. If the user wishes to use the optional 'created
' OPML attribute, then RFC 822 format should be used. For example:
created="^value($Created.format("*"))^"
outputs (on aTbRef's author's system)
created="Thu, 14 Jan 2010 09:58:00 +0000"