What is a simple / elegant way in Ruby to tell if a particular variable is a Hash or an Array? - Stack Overflow
The answer is of course: yes, you can.
And: yes, exactly.
XmlSimple treats elements with attributes as Hash, w/o attributes they are simply String.
"googlecl-0.9.12 -> googlecl-0.9.13" brought a change, where a specific element now does not have attributes any longer, and this broke my code, that reads "google contacts list … --fields=xml".
Solved one of my two urgent home software problems.
Showing posts with label GoogleCL. Show all posts
Showing posts with label GoogleCL. Show all posts
Wednesday, August 29, 2012
Friday, August 24, 2012
Thursday, March 3, 2011
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:
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:
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.
$ google contacts list --title='' --fields=xmlOf 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.
Monday, June 21, 2010
Subscribe to:
Posts (Atom)