OLOLFILES

NAME
DESCRIPTION
EXAMPLE
AUTHOR
SEE ALSO

NAME

olol − Format for Outliner Lighto outline files

DESCRIPTION

This manual page describes the file format used by Outliner Lighto for outline files. The file format is implemented in the tree.pas and nodes.pas units of the Outline Lighto program and in the conversion programs that come with the Outline Lighto distribution, like the hnb2olol.pas program.

Overview
An olol file (which usually has the .olol suffix/extension) is an ASCII text file with commands to the tree builder in each line of the text. Each command is made up of exactly four characters and an optional argument separated by a space. The tree builder reads these commands and builds the tree at the same time.

The most important commands are the NODE and DONE commands which start and end a node. Any other command between them is used to modify that node. A call to NODE inside another NODE is used to create a child for the first NODE and any other command affects the new NODE, until the appropriate DONE is called. NODE/DONEs can be nested, thus making the definition of a tree structure possible.

Known Commands
Outliner Lighto currently understands the following commands. Any unknown command will be silently ignored, which can be taken advantage for future expansion of the format.

NODE

Creates a new node under the current node. There will always be a single call to NODE in an olol file which is used to create the root node. In Outliner Lighto this root node is not visible, but it exists in all olol files. The definition of a node ends with the next call to DONE. The argument to NODE is the node’s own text.

DONE

Ends a node’s definition. After that, any other node modification command affects the parent node.

TYPE

Sets the node’s type. The type by default is NORMAL, but it can be set to TICKABLE. Both NORMAL and TICKABLE are valid values. Any other value is silently ignored with the node being set to NORMAL. Note that saving an olol file which uses an unknown node type will also reset it to normal.

OPEN

Set the node’s open/closed state to open. By default the state is closed, so this is only needed if the node is supposed to appear as opened.

TICK

Ticks the node. By default a node is unticked, so this is only needed if the node is supposed to be ticked.

NOTE

Ignored. Used to add comments to the olol file.

STOP

Stops command reading. This must be outside of any node definition.

EXAMPLE

NODE
NODE Video
TYPE TICKABLE
NODE Color
TYPE TICKABLE
TICK
DONE
MODE HiRes
TYPE TICKABLE
TICK
DONE
DONE
NODE Load
NODE Video
DONE
NODE Sound
DONE
NODE Data
DONE
DONE
DONE
STOP

This will create the following hierarchy

Video

Color

HiRes

Load

Video

Sound
Data

With the first Video and its children being tickable nodes and both the children being ticked.

AUTHOR

Kostas "Bad Sector" Michalopoulos <badsector@runtimelegend.com>

SEE ALSO

ol(1), hnb2olol(1), https://github.com/badsector/ol