[Chandler-dev] Getting started with a python script for Chandler
Poojan Wagh
poojanwagh at gmail.com
Sat Nov 3 21:24:23 PDT 2007
I am trying to write a simple Python script which dumps out all items in
my Home collection as a text file. (Just the item names as a simple flat
list, 1 line per item.) This attempt is related to my wanting to be able
to print out a simple list of my items (see
http://lists.osafoundation.org/pipermail/chandler-users/2007-October/000822.html).
It is my understanding that since Chandler Desktop is written in Python,
it is possible to run simple scripts to perform repeated (or desirable)
tasks.
I've tried to harness the tools->scripting menu item to do
this--recording a script of a .ics file dump.
However, this seems to record mostly wxWidget calls (including mouse
clicks & keyboard presses). Furthermore, dumping as an .ics file isn't
exactly what I want. (I would have to post-process the result to get
only the item names. I've done this manually before, but there must be
a better way.)
My first step in this endeavor is to figure out how to get hold of my
Home collection's object. Is there a way to get the Python object of a
collection by simply knowing its name--or, really, a list of items in
the repository that belong to a specific collection?
Alternatively, if I'm going about this all wrong, I'd like some help
pointing me in the right direction.
Thanks,
--
Poojan Wagh
More information about the chandler-dev
mailing list