[Sugar-devel] Content bundles

S Page skierpage at gmail.com
Mon Sep 27 04:50:07 EDT 2010

On Fri, Sep 24, 2010 at 10:44 PM,  <forster at ozonline.com.au> wrote:

> I have created a Pippy program to map sea surface temperature.
> http://wiki.sugarlabs.org/go/User:Tonyforster#Sea_Surface_Temperature_Mapping
> Because I wanted to distribute two files as one compressed download and also because wiki.sugarlabs does not host *.py files, I decided to try a *.xol content bundle. It also seemed like a good opportunity to learn about bundles.

> I am running OS373pyg
> I created a bundle http://wiki.sugarlabs.org/go/File:Sst.xol
> It turned out to be complex, not simple. Issues that arose were:
> It seems that you can not remove a content bundle once you install it. Even deleting it in Terminal still leaves the menu in Browse.

Depends how you install it.  http://wiki.laptop.org/go/Collections
says 'In the Journal, navigate to the entry for the download of the
.xol bundle, hover over it, and choose Erase. When you view the "OLPC
Library" page in Browse, the content should be gone from the library
navigation.'  Removing from ~/Library certainly won't trigger the
rebuild of the home page library navigation.  There are other ways
removal can fail, e.g. SL bug 2283 "You can't remove Library content
installed from a .xol on USB flash drive".
tells you how to rebuild the library navigation manually.

> Opening the bundle starts a redundant empty write session.
I don't know what you mean, it didn't for me in 10.1.2 on XO-1.

> Both of the files *.asc and *.py needed a right click to save them, left click just opens a viewer, yes I understand why
> *.py files save to the journal as text/plain and Pippy will not open text/plain, they need to be copied from Write to Pippy
In that case, why not left-click to open each file in Browse (it shows
their content as text), and copy from Browse (Ctrl-A, Ctrl-C) into

BTW, the index.html tells me to Keep Link, but there' s no such
command in Browse v.108 , I just see Download link.  That doesn't seem
to create a Journal entry, instead I think it leads to a Browse
Traceback from downloadmanager.save_link().

> The net result is a very complicated user experience. I just wanted to download and uncompress two files as a single download. Am I missing something simple?

http://wiki.laptop.org/go/Creating_a_collection says, "Materials in a
collection that need to be run by an Activity other than Browse will
have to have a mime-type registered with the Browse activity so they
can launch from there."  I have no idea how to do this, that passive
voice is useless!  Pippy v.35 registers for the mime types
text/x-python and pickle/groupthink-pippy , Browse v.108's
activity.info doesn't mention either mime type.

Even if you could get Browse to associate your files with Pippy, I
don't think it would help.  Well over a year ago there was discussion
of directly launching applications by clicking on their files from
Browse, as I recall there were Rainbow security issues and concerns
about displacing the Journal.  I don't think Browse can do this.

If Sugar/the Journal actually associated a file extension with Pippy
the Journal might open your files directly in Pippy.  I can't see a
file extension for pickle/groupthink-pippy.

Collections are very browser-centric.  You could work with the browser
by converting your program from Python to JavaScript and present it in
a local web page that runs a JavaScript developer environment in the

I hope this helps, I'm just a user who has figured out a little about
=S Page

More information about the Sugar-devel mailing list