[Gpe-list] help - batch import / export
g+gpe at cobb.uk.net
Thu Aug 16 15:11:43 CEST 2007
On Thursday 16 August 2007 13:19, geneonlbk wrote:
> Is there some means of batch import / export of contacts for the Maemo
> implementation of the PIM apps using vcard or some other format?
You may be able to use gpesyncd.
Gpesyncd is a text mode (non-GUI) program which can import and export GPE
objects in the V-standard formats. It is designed to be used with Opensync
but it can be used by itself.
To experiment with it, just run gpesyncd from an Xterm (as the user account,
not as root). You can type "help" to get a command listing.
The program works with three object types: vcard (contact), vevent (calendar)
and vtodo (todo). The commands for each object are similar:
UIDLIST <type> -- lists the ID number for every object of that type in the
database. Only pay attention to the number before the colon (the rest is no
GET <type> <id> -- fetches the particular object and displays it in the
standard way for that object type.
ADD <type> <data> -- creates a new object of a particular type. Note that the
BEGIN:... text must be on the same line as the ADD command (so, for example,
to add an event the command will be ADD VEVENT BEGIN:VCALENDAR). The program
will read lines until it reads the corresponding END:... line. This will
only add one object of the specified type. If you supply multiple objects
(for example a VCALENDAR containing multiple VEVENTs) only the first one will
Note that gpesyncd does not have any commands to select objects -- if you want
to export all the events for next week (say) you will have to use UIDLIST to
get all the IDs, then fetch each one using GET and then parse the output to
see if it fits your criteria. It would be useful to add some sort of SELECT
feature, but I don't have any plans to do it in the near future. Any
Instead of using gpesyncd directly, you might want to consider using Opensync
to keep GPE synchronised with a set of files, one for each object. These may
be easier to manipulate.
More information about the Gpe-list