Sample library.info file: Difference between revisions

From OLPC
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
Here is an example <code>library.info</code> configuration file for a collection called <code>Dictionary</code>.
Here is an example <code>library.info</code> configuration file for a collection called <code>Dictionary</code>.

To create a configuration file for your own collection, follow the instructions below or use the web-based [http://crank.laptop.org/~lauren/library-info.py library.info file generator].


[Library]
[Library]
Line 17: Line 15:
activity_start = index.html
activity_start = index.html



To create a configuration file for your own collection, follow the instructions below or use the web-based [http://crank.laptop.org/~lauren/library-info.py library.info file generator].
== General Notes ==
== General Notes ==


Line 24: Line 24:


: Space before and after the equals sign is ignored; the <tt>=</tt> sign is the actual delimiter.
: Space before and after the equals sign is ignored; the <tt>=</tt> sign is the actual delimiter.

; Value Types : The value types recognized are '''string''', '''boolean''', and '''numeric'''.

:Values of type '''string''' may contain all ASCII characters except for control characters (space, newline, tab, carriage return, etc.). To include any of these characters, use the appropriate escape sequence. Strings should be delimited by double quotation marks, e.g. <tt>"This is a string"</tt>.

:Values of type '''boolean''' must either be <tt>true</tt> or <tt>false</tt>.

:Values of type '''numeric''' must be a valid floating point number, e.g. <tt>13</tt> or <tt>-2.5</tt>.


; Multiple Values : Some keys can have multiple values. In such a case, the value of the key is specified as a plural: for example, <tt>locales</tt>. The multiple values should each be separated by a semicolon. Those keys which have several values should have a semicolon as the trailing character. Semicolons in these values need to be escaped using \;.
; Multiple Values : Some keys can have multiple values. In such a case, the value of the key is specified as a plural: for example, <tt>locales</tt>. The multiple values should each be separated by a semicolon. Those keys which have several values should have a semicolon as the trailing character. Semicolons in these values need to be escaped using \;.

Revision as of 17:34, 18 December 2007

Here is an example library.info configuration file for a collection called Dictionary.

[Library]
name = Dictionary
global_name = org.logos.dictionary
long_name = children's dictionary
library_version = 1
host_version = 1
l10n = false
locale = en
category =  books
subcategory = reference
icon = library-dictionary.jpg
activity = Browse
activity_start = index.html


To create a configuration file for your own collection, follow the instructions below or use the web-based library.info file generator.

General Notes

.info files follow a key/value pair format, similar to the fd.o desktop entry spec

Entries
Entries in the file are {key,value} pairs in the format: Key = Value
Space before and after the equals sign is ignored; the = sign is the actual delimiter.
Multiple Values
Some keys can have multiple values. In such a case, the value of the key is specified as a plural: for example, locales. The multiple values should each be separated by a semicolon. Those keys which have several values should have a semicolon as the trailing character. Semicolons in these values need to be escaped using \;.

Keys and Values

The core categories are : activities, books, health, images, media, science, search

See library.info for a description of keys and values. Other optional keys include:

activity = Browse
activity_start = index.html

Browse is the only supported activity at the moment; you could change your start page, however, for instance if you were converting a collection of OCW courses to be content bundles (they name their homepage differently).