[sugar] Journal Object metadata

Benjamin M. Schwartz bmschwar
Wed Mar 5 20:06:17 EST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tomeu Vizoso wrote:
| 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.

Yes, but then I'd have to serialize that dictionary myself in order to
send it over a Tube.

|
|>  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 .

This sounds perfect.  In Activity code, how do a I get a
journal-entry-bundle from a datastore objectid, or datastore file path?

- --Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHz0OJUJT6e6HFtqQRAlY4AJwJ9NFPnW+vGeQrpkTM8RqlnBQOVACePPA+
/wKXl7Vz7hYCs1hB7LIRBqk=
=aORy
-----END PGP SIGNATURE-----



More information about the Sugar-devel mailing list