Rarian meta-data files are desktop files as defined by the proposed XDG help system spec (a copy of which is distributed with the Rarian source tarball). A copy of specification on which this version of Rarian is based can also be found here.
This section describes how to write the meta-data files and how to ensure they are picked up by the Rarian library.
WARNING: The meta-data format is not currently complete and is liable to change in incompatible ways in future releases. It is strongly recommended to use the scrollkeeper compatibility mode at present.
A sample meta-data file looks like:
# An example meta-data scroll file - beanstalk.document
[document]
Name=The Beanstalk Manual
Name[de]=Das Beanstalk Manual
DocIdentifier=org.freedesktop.beanstalk
Categories=Utility;Finance
DocPath=file:///usr/share/fdo/help/beanstalk/C/beanstalk.html
DocPath[de]=file:///usr/share/fdo/help/beanstalk/de/beanstalk.html
DocType=application/xhtml+xml
Comment=Beanstalk provides access to golden eggs. Climb it and find your destiny
Comment[de]=German language not known. Sorry.
The above file introduces most elements of the meta-data file format.
The [document] section of meta-data files can contain a number of fields, some of which are required. This section gives details of what fields are available and what they do. Fields marked as strong are necessary.
TODO: Describe children element and where they are useful
There are several fields that should not be used except in specific circumstances. These are described here.
x-DocHeritage=org.scrollkeeper.<seriesid>
By default, Rarian will pick up meta-data files found in the "help" subdirectory of the XDG_DATA_DIRS environment variable. If this environment variable is not set, Rarian will default to checking in /usr/share/help and /usr/local/share/help.
In addition, the environment variable XDG_DATA_HOME can also be used to provide user-specific files. Rarian will check $XDG_DATA_HOME/.share/help. If XDG_DATA_HOME is not set, it defaults to $HOME.
To be picked up by Rarian, the meta-data file must be placed in one of these directories (or a sub-directory thereof). The only other requisite for documents is that the meta-data file must have the suffix ".document". For example, the example file presented above would be named "beanstalk.document".
Note: This section is due for heavy revision once several things come together. It is aimed at GNOME documentation currently. Once the XDG help spec is implemented / supported, this will become obsolete
Having written your documentation, copied your meta-data file to the correct location, you now have several options to access your documentation from your application:
Note: libgnome currently uses a different method for determining the location and name of a file to be opened within yelp. This may require some playing around with. We are actively working to make this obsolete and rely more on the DocIdentifier.