Sample library.info file: Difference between revisions

From OLPC
Jump to navigation Jump to search
Line 62: Line 62:


==Category Chart==
==Category Chart==

The current category and subcategory options are:
The current category and subcategory options are:

{| border="1px;solid" cellpadding="3px"
{| border="1px;solid" cellpadding="3px"
|-
|-
|'''Icon''' || '''Category''' || '''Category Class''' || '''Category Icon''' || '''Subcategories'''
|'''Icon''' || '''Category''' || '''Icon''' || '''Subcategories'''
|-
|-
|style="background:gray" | [[Image:books.png|40px]] || books & reference || books || books.png|| children's books, encyclopedia, reference, stories
|style="background:gray" | [[Image:activities.png|40px]] || activities || activities.png || games
|-
|-
|style="background:gray" | [[Image:science.png|40px]] || math & science || science || science.png || biology
|style="background:gray" | [[Image:books.png|40px]] || books || books.png|| children's books, encyclopedia, reference, stories
|-
|-
|style="background:gray" | [[Image:images.png|40px]] || images & maps || images || images.png || nature, atlas, history
|style="background:gray" | [[Image:uniwiki.png|40px]] || health || uniwiki.png || water & sanitation
|-
|-
|style="background:gray" | [[Image:music.png|40px]] || music & video || music || music.png || media, music
|style="background:gray" | [[Image:images.png|40px]] || images || images.png || nature, atlas, history
|-
|-
|style="background:gray" | [[Image:activities.png|40px]] || activities & games || activities || activities.png || games
|style="background:gray" | [[Image:music.png|40px]] || media || music.png || media, music
|-
|-
|style="background:gray" | [[Image:links.png|40px]] || web links || links || links.png || search the web
|style="background:gray" | [[Image:science.png|40px]] || science || science.png || biology
|-
|-
|style="background:gray" | [[Image:uniwiki.png|40px]] || uniwiki || uniwiki || uniwiki.png || water & sanitation
|style="background:gray" | [[Image:links.png|40px]] || search || links.png || search the web
|}
|}



Revision as of 17:58, 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

Entries
Entries 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 key is specified as a plural: for example, locales. The multiple values should each be separated by a semicolon. Keys that have multiple values must have a semicolon as the trailing character. Semicolons in these values need to be escaped using \;.

Keys/Values

[Library] (required)
The library.info file must begin with [Library], and only that, on the first line of the file.
name (required)
global_name (required)
long_name (required)
This entry is the name is displayed in the library navigation sidebar that refers to the collection.
library_version (required)
The version is a single positive integer that refers to the version of the collection. Larger numbers are considered "newer". For now, the version is 2.
host_version (required)
The host version is a single positive integer that refers to the version of Sugar which the collection is compatible with. For now, the version is 1.
l10n (required)
This entry indicates whether the bundle is localized or not. The value is either true or false.
Note: What it means to be "officially" localized hasn't been entirely worked out yet, so the value of this entry is always false (for now).
locale (required)
This is the ISO code for the language of the collection, in lowercase, followed by an underscore, and then its localization information (also represented in ISO code). For example, US-localized English is represented as en_US. UK-localized English, for example, would be represented as en_UK.
In the case of collections that are "unofficially" localized and/or contain content in multiple languages, you can indicate multiple locales. An example would be:
locales = en_US;en_UK;es_PE;es_AR;
Note that locales is pluralized in order to indicate multiple values. Note also that values are separated by semi-colons, and that the final value must end with a semi-colon as well.
For a list of ISO 639 language codes, see http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
For a list of ISO country codes, see http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
category (required)
This refers to the category classification in the OLPC Library (visible on navigation sidebar). See the category chart below for current options.
subcategory (optional))
This refers to the subcategory classification within a category (visible on the navigation sidebar). If no subcategory is provided, the collection will be placed in its own subcategory. See category chart for current options. Again, and as always, if you don't like what you see, you can add your own.
icon (optional)
This is the filename of the icon that represents the collection in the library navigation sidebar. The actual image file is stored in the library directory (see configuration files. This entry is only required if you decide to place your collection in a new top-level category in the library navigation sidebar. Otherwise, the pre-defined category icon is used.
activity (optional)
This refers to the Activity used to read the content bundle. Browse is the only supported activity at the moment, and is the default value if no Activity is specified.
activity_start (optional)
This refers to the start page of your content bundle. The default is index.html. You might change the start page of the bundle, for instance, if you were converting a collection of OCW courses to be content bundles. (They name their homepage differently.)

Category Chart

The current category and subcategory options are:

Icon Category Icon Subcategories
Activities.png activities activities.png games
Books.png books books.png children's books, encyclopedia, reference, stories
Uniwiki.png health uniwiki.png water & sanitation
Images.png images images.png nature, atlas, history
Music.png media music.png media, music
Science.png science science.png biology
Links.png search links.png search the web

Visit the OLPC Library to see these categories in action.