[Sugar-devel] exporting metadata from the journal

2010-09-29 Thread Sameer Verma
Is there a documented way (or a script) to process all available
metadata from the Journal? I am looking for timestamps, type of data
stored, collaborated with, etc. and not the actual content of the
activity.

cheers,
Sameer
-- 
Dr. Sameer Verma, Ph.D.
Associate Professor, Information Systems
Director, Campus Business Solutions
San Francisco State University
http://verma.sfsu.edu/
http://opensource.sfsu.edu/
http://cbs.sfsu.edu/
http://is.sfsu.edu/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] exporting metadata from the journal

2010-09-29 Thread Sascha Silbe
Excerpts from Sameer Verma's message of Wed Sep 29 20:39:05 +0200 2010:

> Is there a documented way (or a script) to process all available
> metadata from the Journal? I am looking for timestamps, type of data
> stored, collaborated with, etc. and not the actual content of the
> activity.

Depends on your definition of "documented way" and "process all available
metadata". ;)

sugar.datastore.datastore.find({}) will return DSObject instances for
all entries in the data store (unless you have enough entries to hit
the DBus timeout [1]). Full metadata is available as ds_object.metadata
(or ds_object.metadata.get_dictionary() if the interface of DSMetadata
isn't dict-like enough for your use).

See the Backup [2] activity for how to access the data store directly
via DBus and handling different versions (0.82 - 0.90).

Sascha

[1] https://bugs.sugarlabs.org/ticket/1936
[2] http://git.sugarlabs.org/projects/backup/repos/mainline/trees/master
--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] exporting metadata from the journal

2010-09-29 Thread Sameer Verma
On Wed, Sep 29, 2010 at 12:51 PM, Sascha Silbe
 wrote:
> Excerpts from Sameer Verma's message of Wed Sep 29 20:39:05 +0200 2010:
>
>> Is there a documented way (or a script) to process all available
>> metadata from the Journal? I am looking for timestamps, type of data
>> stored, collaborated with, etc. and not the actual content of the
>> activity.
>
> Depends on your definition of "documented way" and "process all available
> metadata". ;)
>
> sugar.datastore.datastore.find({}) will return DSObject instances for
> all entries in the data store (unless you have enough entries to hit
> the DBus timeout [1]). Full metadata is available as ds_object.metadata
> (or ds_object.metadata.get_dictionary() if the interface of DSMetadata
> isn't dict-like enough for your use).
>
> See the Backup [2] activity for how to access the data store directly
> via DBus and handling different versions (0.82 - 0.90).
>
> Sascha
>
> [1] https://bugs.sugarlabs.org/ticket/1936
> [2] http://git.sugarlabs.org/projects/backup/repos/mainline/trees/master
> --
> http://sascha.silbe.org/
> http://www.infra-silbe.de/
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>

Thanks, Sascha. I'll start looking into backup.py

cheers,
Sameer
-- 
Dr. Sameer Verma, Ph.D.
Associate Professor, Information Systems
Director, Campus Business Solutions
San Francisco State University
http://verma.sfsu.edu/
http://opensource.sfsu.edu/
http://cbs.sfsu.edu/
http://is.sfsu.edu/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel