Showing posts with label Google Contacts. Show all posts
Showing posts with label Google Contacts. Show all posts

Friday, July 27, 2012

Google Contacts' "Imported ..." groups

If you happen to select one of those "Imported dd/mm/YYYY" groups, they tell you:

These contacts have been imported, but not yet merged. Find & merge duplicates. …

But you may already have them incorporated properly into your collection. It's just that they want to remind you, that there are imported contacts, and that you should assign proper categories to them.

Sunday, March 27, 2011

RubyForge: XML::Simple (with my experiences as updates)

RubyForge: XmlSimple: Project Info

Rather short after discovering this module, I made use of it with my FRITZ!Box call monitor in order to read my Google Contacts as XML. With this approach, that was a rather easy piece of cake.

Update 2011-03-29:
If an element has not attributes, the (text) content of that element simply gets appended as string to the list at the hash field by the name of that element.
Now if the element has attributes, the (text) content goes together with the attributes to a hash list, that gets appended to that list instead. The (text) content actually goes into a hash field by the name of "content".
Example:
text -> "e"=>[            "text"]text -> "e"=>[{"content"=>"text","a"=>"v"}]
My Ruby code operates like this:
x.instance_of?(Hash) ? x['content'] : x

Wednesday, March 2, 2011

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.