Migrating PocketPC contacts to OPIE

Paul Sokolovsky <[email protected]> Wed, 17 Jan 2007 19:44:20 +0200
Newsgroups gmane.comp.handhelds.linux.familiar,gmane.comp.handhelds.opie
Message-ID <[email protected]>
Hello familiar,

  Recently, in the move to setup a Linux handheld suitable for
production use, I worked on migrating PocketPC PIM Contacts to OPIE. I
started with OPIE because that's what I work with recently, revamping
its state in OE, and because it offers XML format for contacts
database (being inadequate solution for storage, it offers a bit of
ease for migration experiments).

  I didn't have chance to see some doc/howto on this topic. On my
memory, there were few question about that on MLs, but without
definitive answers, nothing suitable on wiki, or immediate on Google
(I tried to search with migrate/convert as headword).

  So, I bother to outline approaches I considered, before proceeding
to describing what I actually did.

1. Use generic sync framework, like OpenSync.
2. Try to find existing adhoc convertor.
3. Try to write own adhoc convertor.

  Here's results for each of them:

1. I'm interested in supporting Windows machines for migration, so I
tried to build libopensync with mingw32. I couldn't do that in couple
of hours I invested into that. I decided not to go further with it, as
there're known issues with plugins for OPIE/GPE anyway, no plugins for
MS Office, and at that time it wasn't clear if there're plugins for
PocketPC. Also, it's always of concern whether such software should be
written in C, or more exactly, who's going to do that (I'm afraid I'm
out).

2. I actually started to hack my own WinCE contacts DB to OPIE
contacts XML converter in Python, based on module to access WinCE DBs
I wrote few years ago. Well, while looking for IDs of contacts fields,
I found that SynCE project already has something like that. My
concerns were: 1) Again, portability to Windows; I have no idea if
sunce's librapi API is compatible with native RAPI. Common sense and
function names suggest that yes, but I couldn't find formal
affirmation, and don't want to figure out myself. 2) Same C concerns.

3. So, what I did is to hacked a simple (as the task itself) convertor
in Python which reads Contacts DB directly from the device, and
outputs OPIE XML contacts files. I made it to the level that it works
the way I want on my 200+ contacts. That's important reason why
conversion/syncing software must be written in HLL - for such
software, tweaking it is the normal part of its usage (sic), and what
can be easier to tweak than the most readable/writable language,
Python.

  So, I've put what I have as the project at SourceForge:
http://sourceforge.net/projects/pywincedb/ . At this time, code is
available from SVN only. It is also required to compile with mingw32
module to access WinCE DB in device using RAPI.

  There're number of ways how this effort can be continued/elaborated:

1. After I looked more closely at OPIE Contacts' import capabilities, I
confirmed that it handles VCard format pretty well, and the way to
generalize the conversion util is to add VCard support to it. This
will work (somehow) for GPE too.

2. Rewrite WinCE DB access module in Python with native FFI (ctypes),
so user don't have to bother to compile it for different versions of
Python.



  Feel free to join in with this effort if you're interested!


-- 
Best regards,
 Paul                          mailto:[email protected]

_______________________________________________
The Familiar Linux Distribution
Familiar mailing list
[email protected]
https://handhelds.org/mailman/listinfo/familiar
irc://irc.freenode.net #familiar