[sugar] Journal Object metadata

Tomeu Vizoso tomeu
Sat Mar 1 07:51:38 EST 2008


On Sat, Mar 1, 2008 at 6:44 AM, Benjamin M. Schwartz
<bmschwar at fas.harvard.edu> wrote:
>  I have read all the documents I could find, and also the Sugar source, and
>  I am still confused:
>
>  How can an activity get an object representing all the metadata for its
>  current datastore object?

Can you please elaborate? Are you using the python API? If so,
Activity.metadata contains a dictionary with all the properties for
the current object.

>  I ask because I am writing a trivial "Distribute" Activity, whose purpose
>  is to copy journal entries from one XO to another by sharing.  This is
>  working, but since the copy does not have any metadata, like MIME type, it
>  cannot be opened from the Journal interface by any Activity except
>  Distribute, which created it.
>
>  Ideally, I would like to acquire the metadata as a dbus object, so that I
>  may simply shove it over a DBus Tube and then pass it on to the receiver's
>  datastore.

What if you serialize the whole entry (file + metadata) inside a zip
file and distribute that?

http://wiki.laptop.org/go/Journal_entry_bundles

The journal has already support for installing to the DS these
serialized entries:

http://dev.laptop.org/git?p=journal-activity;a=blob;f=journalentrybundle.py

Added because of http://dev.laptop.org/ticket/4380 .

Hope that helps,

Tomeu



More information about the Sugar-devel mailing list