<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sugarlabs.org/index.php?action=history&amp;feed=atom&amp;title=Content_bundles</id>
	<title>Content bundles - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sugarlabs.org/index.php?action=history&amp;feed=atom&amp;title=Content_bundles"/>
	<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Content_bundles&amp;action=history"/>
	<updated>2026-04-17T10:36:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Content_bundles&amp;diff=88601&amp;oldid=prev</id>
		<title>DanielDrake: Created page with &quot;Sugar supports &lt;em&gt;content bundles&lt;/em&gt;, a distributable archive of content to be made available under Sugar.  == Rationale ==  The most popular use for content bundles is to ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Content_bundles&amp;diff=88601&amp;oldid=prev"/>
		<updated>2013-07-03T19:37:55Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Sugar supports &amp;lt;em&amp;gt;content bundles&amp;lt;/em&amp;gt;, a distributable archive of content to be made available under Sugar.  == Rationale ==  The most popular use for content bundles is to ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Sugar supports &amp;lt;em&amp;gt;content bundles&amp;lt;/em&amp;gt;, a distributable archive of content to be made available under Sugar.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
The most popular use for content bundles is to provide an easy way for deployers to pre-install content (e.g. textbooks) on all the Sugar installations in a deployment. The content is either provided as HTML documents and images, or an HTML index to other media is provided.&lt;br /&gt;
&lt;br /&gt;
Another option here would be for deployers to create an activity that provides a browseable index to the content being distributed. However, technically, this is a major step up in complexity. Content bundles have simplicity on their side, and basic HTML is a widespread skill. Python is not.&lt;br /&gt;
&lt;br /&gt;
So, as Sugar does not provide a better answer for the frequently asked deployer question &amp;quot;how can I ship a load of textbooks on all these Sugar installations?&amp;quot;, content bundles have actually become rather popular in the field.&lt;br /&gt;
&lt;br /&gt;
== Creating a content bundle ==&lt;br /&gt;
&lt;br /&gt;
Currently, the &amp;quot;launcher page&amp;quot; for your content bundle must be a HTML document.&lt;br /&gt;
&lt;br /&gt;
In a new directory for the files to be included in the bundle:&lt;br /&gt;
# Create an index.html file that acts as the front page of your content, or that provides an index to the content you wish to make available&lt;br /&gt;
# Add all the content to the directory structure (i.e. the things you link to from index.html and any resources that they require)&lt;br /&gt;
# Create a library subdirectory and place a library.info file there&lt;br /&gt;
&lt;br /&gt;
Now zip up the directory structure from one level up, and rename the zip file to have a .xol extension. Content bundle complete!&lt;br /&gt;
&lt;br /&gt;
If you were to examine the contents of the zip file for a content bundle named Dictionary, you would now see the following directory structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dictionary/                     (directory)&lt;br /&gt;
Dictionary/index.html           (index page)&lt;br /&gt;
Dictionary/page1.html           (content linked from index)&lt;br /&gt;
Dictionary/page2.html           (content linked from index)&lt;br /&gt;
Dictionary/grammar.png          (an image resource shown in page1)&lt;br /&gt;
Dictionary/library/             (directory)&lt;br /&gt;
Dictionary/library/icon.svg     (icon image)&lt;br /&gt;
Dictionary/library/library.info (detailed below)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== library.info specification ==&lt;br /&gt;
&lt;br /&gt;
The most complex part of creating a content bundle is creating a metadata file that gives Sugar some basic information about your content (title, etc). This is done in a .ini style format, in a file that &amp;lt;b&amp;gt;must&amp;lt;/b&amp;gt; be placed at location &amp;lt;tt&amp;gt;library/library.info&amp;lt;/tt&amp;gt; inside your content bundle.&lt;br /&gt;
&lt;br /&gt;
On the first line, place the section name which must be:&lt;br /&gt;
  [Library]&lt;br /&gt;
&lt;br /&gt;
The remaining lines are used as key-value pairs, in the format:&lt;br /&gt;
  key = value&lt;br /&gt;
&lt;br /&gt;
The available keys, some of which are required, are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt; &amp;#039;&amp;#039;(required)&amp;#039;&amp;#039;: The (localized) name of your content bundle.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;global_name&amp;lt;/tt&amp;gt; &amp;#039;&amp;#039;(required)&amp;#039;&amp;#039;&lt;br /&gt;
: This is the unique content bundle identifier. It&amp;#039;s as if you were to write a domain name backwards, perhaps with more specific information at the end. Think of it as something like this:&lt;br /&gt;
&lt;br /&gt;
:* If your email address is &amp;#039;&amp;#039;yourname&amp;#039;&amp;#039;@&amp;#039;&amp;#039;somemailhost&amp;#039;&amp;#039;.com, then you could use &amp;#039;&amp;#039;com.somemailhost.yourname&amp;#039;&amp;#039;.&amp;#039;&amp;#039;YourContent&amp;#039;&amp;#039;.&lt;br /&gt;
:* You could set up a web page on a free hosting service with information about your content, and use a name derived from its URL.  For example, if you create a page at http://www.geocities.com/xotumusica for your content, then com.geocities.www.xotumusica is a reasonable global_name.&lt;br /&gt;
:* If nothing else is available, even org.sugarlabs.wiki.&amp;#039;&amp;#039;Your Activity Page Title&amp;#039;&amp;#039; is probably a reasonable global_name, provided that you create the &amp;#039;Your Activity Page Title&amp;#039; page.  Remember, global_names should be unique, so you should double check that the &amp;#039;Your Activity Page Title&amp;#039; page doesn&amp;#039;t already exist (and then create it) before using this as your global_name.&lt;br /&gt;
&lt;br /&gt;
: Tech talk: The name should conform to the [http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names D-Bus spec] - in particular, hyphens are not allowed. It is recommended that [http://en.wikipedia.org/wiki/Java_package#Package_naming_conventions Java package naming conventions] are used when chosing bundle identifiers, to ensure uniqueness. The reversed domain name part is supposed to be rooted in some actual DNS-rooted namespace.  You don&amp;#039;t need to own this domain; you just need to have a reasonable claim on some &amp;#039;&amp;#039;unique&amp;#039;&amp;#039; name at that domain.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;library_version&amp;lt;/tt&amp;gt; &amp;#039;&amp;#039;(required)&amp;#039;&amp;#039;: The version is a single positive integer that refers to the version of the collection. Larger numbers are considered &amp;quot;newer&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;host_version&amp;lt;/tt&amp;gt; &amp;#039;&amp;#039;(required)&amp;#039;&amp;#039;: 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.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;icon&amp;lt;/tt&amp;gt; &amp;#039;&amp;#039;(required)&amp;#039;&amp;#039;: The filename of the icon within the &amp;#039;library&amp;#039; directory of your content bundle. SVG is the recommended format, but PNG and JPEG will work as well.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;license&amp;lt;/tt&amp;gt;: This field names the license used for the content bundle.  The contents of this field should conform to the same guidelines as the [http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License:_field &amp;lt;code&amp;gt;License:&amp;lt;/code&amp;gt; field] of an RPM package; consult the [http://fedoraproject.org/wiki/Packaging/LicensingGuidelines Fedora Licensing Guidelines] for more information.  A &amp;#039;license&amp;#039; field naming an entry or entries in the &amp;quot;Good Licenses&amp;quot; table for Content Licenses at [http://fedoraproject.org/wiki/Licensing Fedora&amp;#039;s Licensing list] is required for any content distributed by OLPC.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;locale&amp;lt;/tt&amp;gt;: 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.   &lt;br /&gt;
&lt;br /&gt;
:It is possible to indicate language but not localization information. An example would be:&lt;br /&gt;
:&amp;lt;code&amp;gt;locale = es &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:It is also possible to indicate multiple languages and/or locales. An example would be:&lt;br /&gt;
:&amp;lt;code&amp;gt;locale = en_US;en_UK;es_PE;es_AR;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note that values are separated by semi-colons, and that the final value must end with a semi-colon as well.&lt;br /&gt;
&lt;br /&gt;
: 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&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;activity_start&amp;lt;/tt&amp;gt;: This refers to the start page of your content bundle. The default is &amp;lt;tt&amp;gt;index.html&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
&lt;br /&gt;
Collections tend to rely much more heavily on text than code, and the usual way to localize content is to make a separate bundle for each language. Indicate the language of your collection in the locale field of the library.info file.&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
</feed>