Sample library.info file: Difference between revisions

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


: For a list of ISO country codes, see http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
: For a list of ISO country codes, see http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements

: ''Note: At some point, the <tt>locale</tt> line should be expanded to match the [[Activity_bundle#Activity_Name_Localization.2FTranslation|localization scheme for activity bundles]]. For now, this spec only supports single-language bundles.''


; <tt>category</tt> : This refers to the subject classification in the OLPC Library (visible on navigation sidebar). The "category" value also corresponds to that category's class in the default CSS settings. See category chart below for current options. As always, if you don't like what you see, you can add your own.
; <tt>category</tt> : This refers to the subject classification in the OLPC Library (visible on navigation sidebar). The "category" value also corresponds to that category's class in the default CSS settings. See category chart below for current options. As always, if you don't like what you see, you can add your own.
Line 40: Line 42:
; <tt>category_icon</tt> ''(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 <tt>library</tt> directory (see [[Creating_a_content_bundle#Configuration_Files|configuration files]]. This line is only required if you decide to place your collection in its own top-level category in the navigation sidebar.
; <tt>category_icon</tt> ''(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 <tt>library</tt> directory (see [[Creating_a_content_bundle#Configuration_Files|configuration files]]. This line is only required if you decide to place your collection in its own top-level category in the navigation sidebar.


; <tt>subcategory</tt> ''(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. Aagain, as alwys, if you don't like what you see, you can add your own.
; <tt>subcategory</tt> ''(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, as always, if you don't like what you see, you can add your own.


:''Note:Subcategory placement is not yet automated. Syntax/whitespace/case sensitivity/etc will depend on how pattern matching is implemented.
:''Note:Subcategory placement is not yet automated. Syntax/whitespace/case sensitivity/etc will depend on how pattern matching is implemented.

Revision as of 15:41, 19 July 2007

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

[Library]
name = Dictionary
library_version = 1
host_version = 1
service_name = ???
exec = ???
class = dictionary
mime_types = ???
locale = en_US
category = books
category_icon = library-dictionary.jpg
subcategory = reference

Keys/Values

[Library]
The library.info file must begin with [Library], and only that, on the first line of the file.
name
This is the name is displayed in the library navigation sidebar referring to the collection. The library.info file must have this line. (Visit the online versino of the OLPC Library to view the current navigation sidebar and categories.
library_version
The version is a single positive integer that refers to the version of the collection. Larger numbers are considered "newer". The library.info file must have this line. For now, this is 1.
host_version
The host version is a single positive integer that refers to the version of Sugar which the collection is compatible with. For now, this is 1.
service_name
SJ: Don't think this is relevant here. Is it?
class (optional)
This field is required if the collection is using a customized library.css file. The class value should be the same name as the collection's .xol file, except in lower case (and without the ".xol"). No whitespace or special characters are allowed.
mime_types
SJ: Also not relevant, unless we want to keep track of what file formats each collection contains.
locale
This is the ISO code for the primary language of the collection, in lowercase, followed by an underscore, and then its localization information (also represented in ISO code). In this case, US-localized English is represented as en_US. UK-localized English, for example, would be represented as en_UK.
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
Note: At some point, the locale line should be expanded to match the localization scheme for activity bundles. For now, this spec only supports single-language bundles.
category
This refers to the subject classification in the OLPC Library (visible on navigation sidebar). The "category" value also corresponds to that category's class in the default CSS settings. See category chart below for current options. As always, if you don't like what you see, you can add your own.
category_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 line is only required if you decide to place your collection in its own top-level category in the navigation sidebar.
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, as always, if you don't like what you see, you can add your own.
Note:Subcategory placement is not yet automated. Syntax/whitespace/case sensitivity/etc will depend on how pattern matching is implemented.

Category Chart

The current category and subcategory options are:

Description Category Current Subcategories
Books and reference books picture books, reference, stories
Math and science science biology
Images and maps science nature, atlas, historical
Music and video music media
Activities activities games
Web links links search the web
Uniwiki uniwiki water & environment

Visit the OLPC Library to see these categories in action.