your Google Contacts address book as XML

Today I came across a rather interesting thread on the googlecl-discuss mailing list, it’s subject was “Backing up contacts“, and it thrilled me instantly. With this command line, you get your address book dumped as completely, as it currently can get:

$ google contacts list –title=” –fields=xml

Of course you must have an up-to-date gdata-python-client and googlecl installation. But you do have that anyway, don’t you? I updated mine today.

Yes, the XML misses an enclosing top-level element – but you can add that easily.

I would also love to see the groupMembershipInfo in a rather “accessible” way, but I guess, that will also come sooner or later.

This lists alls groups (and not in XML for currently trivial reasons), but I am not able to relate the groups to the (group) URIs mentioned in the contacts XML:

$ google contacts list-groups –title=” –fields=xml –verbose “.*”

My FRITZ!Box call monitor software will make use of the XML Google Contacts rather soon. That way I can skip all the current JRuby CSV and m17n problems. Its also more comfortable to download, because I can do that on the command line. And if it’s more comfortable, you do it more often. Backing up your address book frequently isn’t a bad idea either, right?!

Update 2011-03-28:
Task accomplished for my FRITZ!Box call monitor software, also if executed through jruby-1.6.0.


Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.