Sample library.info file: Difference between revisions
Jump to navigation
Jump to search
(Document the license field in library.info.) |
DanielDrake (talk | contribs) No edit summary |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
Here is an example < |
To [[Creating a collection|create a collection]] you need a <tt>library.info</tt> file specifying information for it. Here is an example <tt>library.info</tt> configuration file for a collection called <code>Dictionary</code>, whose starting page is <tt>bundle_index.html</tt> in its root directory. |
||
[Library] |
[Library] |
||
Line 16: | Line 16: | ||
activity_start = bundle_index.html |
activity_start = bundle_index.html |
||
To create a configuration file for your own collection, use the web-based [http:// |
To create a configuration file for your own collection, use the web-based [http://bantha.org/~kraken/olpc/bundler/makeLibraryInfo.html library.info file generator] or follow the instructions below. |
||
== General Notes == |
== General Notes == |
||
Line 38: | Line 38: | ||
; <tt>library_version</tt> ''(required)'': The version is a single positive integer that refers to the version of the collection. Larger numbers are considered "newer". In this example, the version is 2. |
; <tt>library_version</tt> ''(required)'': The version is a single positive integer that refers to the version of the collection. Larger numbers are considered "newer". In this example, the version is 2. |
||
; <tt>host_version</tt> ''(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. |
; <tt>host_version</tt> ''(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. Do not use a different value. |
||
<span id="l10n"><!-- anchor for library.info generator. pls do not remove! --></span> |
<span id="l10n"><!-- anchor for library.info generator. pls do not remove! --></span> |
||
Line 64: | Line 64: | ||
:Note: It's OK to place your content in a new category, but if your category isn't on the list of global categories, it will be placed into "other" for the time being. |
:Note: It's OK to place your content in a new category, but if your category isn't on the list of global categories, it will be placed into "other" for the time being. |
||
; <tt>subcategory</tt> ''( |
; <tt>subcategory</tt> ''(currently unused)'': This refers to the subcategory classification within a category (visible on the navigation sidebar). |
||
<span id="optional"><!-- anchor for library.info generator. pls do not remove! --></span> |
<span id="optional"><!-- anchor for library.info generator. pls do not remove! --></span> |
||
; <tt>activity</tt> ''( |
; <tt>activity</tt> ''(currently unused)'': This refers to the [[Activity]] used to read the content bundle, but Browse is the only supported activity at this time. |
||
; <tt>activity_start</tt> ''(optional)'': This refers to the start page of your content bundle. The default is <tt>index.html</tt>. 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.) |
; <tt>activity_start</tt> ''(optional)'': This refers to the start page of your content bundle. The default is <tt>index.html</tt>. 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.) |
||
Line 93: | Line 93: | ||
|} |
|} |
||
Browse the OLPC Library on your XO to see these categories in action. |
|||
[[Category:File formats]] |
[[Category:File formats]] |
||
[[Category:HowTo]] |
[[Category:HowTo]] |
||
[[Category:Bundles]] |
Latest revision as of 13:24, 21 April 2010
To create a collection you need a library.info file specifying information for it. Here is an example library.info configuration file for a collection called Dictionary
, whose starting page is bundle_index.html in its root directory.
[Library] name = Dictionary global_name = org.logos.dictionary long_name = children's dictionary license = CC-BY-SA library_version = 2 host_version = 1 l10n = false locale = en category = books subcategory = reference icon = library-dictionary.jpg activity = Browse activity_start = bundle_index.html
To create a configuration file for your own collection, use the web-based library.info file generator or follow the instructions below.
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.
- license (required)
- This field names the license used for the content bundle. The contents of this field should conform to the same guidelines as the
License:
field of an RPM package; consult the Fedora Licensing Guidelines for more information. A 'license' field naming an entry or entries in the "Good Licenses" table for Content Licenses at Fedora's Licensing list is required for any content distributed by OLPC.
- library_version (required)
- The version is a single positive integer that refers to the version of the collection. Larger numbers are considered "newer". In this example, 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. Do not use a different value.
- 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.
- It is possible to indicate language but not localization information. An example would be:
locale = es
- It is also possible to indicate multiple languages and/or 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.
- Note: It's OK to place your content in a new category, but if your category isn't on the list of global categories, it will be placed into "other" for the time being.
- subcategory (currently unused)
- This refers to the subcategory classification within a category (visible on the navigation sidebar).
- activity (currently unused)
- This refers to the Activity used to read the content bundle, but Browse is the only supported activity at this time.
- 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:
Browse the OLPC Library on your XO to see these categories in action.