Experiences with adding content

From OLPC
Jump to: navigation, search

I had issues with trying to create content bundles for my OLPC (a stock G1G1 laptop). To assist others who may be having similar problems I'm putting the list here for reference. I was following instructions found in this wiki: Creating a content bundle and Library grid.

Web server mime types

The first problem I had was that it didn't seem like when I downloaded the .xol file (or .xo files for that matter) from my web-server that the content (or activity) would be installed. This was because my web server didn't know about the OLPC mime types. You need to add the following to your web-server configuration (/etc/apache/mime.types or just /etc/mime.types on Ubuntu systems)

  application/vnd.olpc-sugar      xo
  application/vnd.olpc-content    xol

If you can't change the web-server configuration, you'll have to manually create a Library directory and unzip your content there

  mkdir /home/olpc/Library
  cd /home/olpc/Library
  unzip <path-to-xol-bundle>
  /usr/share/library-common/make_index.py

indexing content

I tried using the library/library.xml method to generate an index for the content. This did not work. I ended up sticking to just writing my own index.html file

relative paths

It seemed from the various instructions that you could use relative paths to your content data files (in my case pdfs). However, when the index.html gets installed, it gets installed to /home/olpc/.library/<content-name>/bundle_index.html, but the rest of your content stays in /home/olpc/Library -- so relative paths don't work. I just changed the relative paths to prefix /home/olpc/Library/<bundle-name> and things seemed to work fine.