Sample library.info file: Difference between revisions
m (→Category Chart) |
m (→Category Chart) |
||
Line 52: | Line 52: | ||
|'''Description''' || '''Category''' || '''Subcategories''' |
|'''Description''' || '''Category''' || '''Subcategories''' |
||
|- |
|- |
||
|Books and reference |
|Books and reference || <tt>books</tt> || <tt>picture books</tt>, <tt>reference</tt>, <tt>stories</tt> |
||
|- |
|- |
||
|Math and science |
|Math and science || <tt>science</tt> || <tt>biology</tt> |
||
|- |
|- |
||
|Images and maps |
|Images and maps || <tt>science</tt> || <tt>nature</tt>, <tt>atlas</tt>, <tt>historical</tt> |
||
|- |
|- |
||
|Music and video |
|Music and video || <tt>music</tt> || <tt>media</tt> |
||
|- |
|- |
||
|Activities |
|Activities || <tt>activities</tt> || <tt>games</tt> |
||
|- |
|- |
||
|Web links |
|Web links || <tt>links</tt> || <tt>search the web</tt> |
||
|- |
|- |
||
|Uniwiki |
|Uniwiki || <tt>uniwiki</tt> || <tt>water & environment</tt> |
||
|} |
|} |
Revision as of 18:05, 16 July 2007
Sample library.info file
Here is an example library.info configuration file:
[Library] name = Dictionary library_version = 1 host_version = 1 service_name = ??? icon = library-dictionary.svg exec = ??? class = ??? mime_types = ??? locale = en_US category = books 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.
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.
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?
icon - This is the name of the icon that represents the collection in the library navigation sidebar. It should have the same name as the icon stored in the library directory.
class - SJ: Is there a library class? Does it matter?
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 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 - This refers to the subject classification in the OLPC Library (visible on left-hand navigation menu). 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).
subcategory (optional) - This refers to the subcategory classification within a category (visible on left-hand navigation menu). If no subcategory is provided, the collection will be placed in its own subcategory. Again, see category chart for current options.
- 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 | 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 |