[Sugar-devel] content bundles and the "OLPC Library" Browse home page
skierpage at gmail.com
Thu Mar 19 03:07:21 EDT 2009
In SoaS2 I downloaded a .XOL and was able to run it from the Journal
and it unpacked into ~/Library.
But Browse doesn't show it on a library page.
User "cwhii" noticed this a while back and complained about it, Sugar
bug #1 (!), http://dev.sugarlabs.org/ticket/1 :
I expected "OLPC Library" with a list of libraries to pick from.
That bug somehow turned into "Add support to Browse for
distro-customised start page" and was upstreamed to Ubuntu.
But Ubuntu providing a home page isn't going to bring the OLPC Library
feature back. I filed bug 574, http://dev.sugarlabs.org/ticket/574
"Sugar lacks OLPC's dynamic content library". The code to rebuild a
page whenever you install a collection is in is package
olpc-library-common, it's also the same code to build the OLPC home
page from a template (more details in
http://wiki.laptop.org/go/Library#Developers:_How_it_works ). Sugar
0.84 still expects this code: sugar-toolkit's contentbundle.py tries
to invoke /usr/share/library-common/make_index.py when you install a
.xol content bundle.
I think the existing package would do the right thing in latest Sugar
to recreate a library page. The only wrinkle is that Browse hardcodes
_LIBRARY_PATH = '/usr/share/library-common/index.html'
as its home page, but make_index.py doesn't build this, it builds index.html in
output_path = '/home/olpc/.library_pages' # old but kept around for upgrades
The latter page is hardcoded to refresh to the former, and so the user
in Browse sees the newly-generated library page that links to her
newly downloaded content.
Although .xol collection handling is in sugar-toolkit, I think the
format and the nifty updating library page could be a general design
for content downloaded from the web, separate from Sugar. But what
are the plans for collections and "the library" in the future? Are
people thinking they'll be replaced by packages, or some library
metadata format? The elusive Sj wrote
http://wiki.laptop.org/go/Dynamic_library back in 2008...
More information about the Sugar-devel