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

Method to import contacts from CardMunch to Google Contacts

The script below is my method of importing contacts from CardMunch to Google Contacts.  It could be useful for any address book which imports VCF files.
It automates part of the work, but much still is manual.

CardMunch is an iOS app and service purchased by LinkedIn that digitizes pictures of business cards into an address book, with export (one by one) to iOS contacts, and to e-mail.
Since I am using Google Contacts, I want to automate the transfer as much as possible.  I feel it is still easier than typing cards in by hand, although I am not confident of that.

Method of migrating from old Kapi / Kaddressbook to Google Contacts.

Here is a record of my process of converting, mostly, my old Kaddressbook / Kapi VCard file to Google Contacts.

I have decided to move over to Google contacts as my main address book, at least for a trial stage.

So I needed to get as much of my data from my old address book, Kapi, based on Kabc / Kaddressbook / Kontact.  I used it previously because it was the main one supported by my old organizer, a Sharp Zaurus and on my PC.  I have not had my Zaurus for quite a few years.

So here are my notes from the conversion process, in case anyone else still needs to do this.
It will be of little use to all but a very few.

The majority of the work was done per:
http://kubuntuforums.net/forums/index.php?topic=3113756.0
This was with Debian Python package: python-vobject version 0.8.1c-3

I had to also remove some strings in notes, as Python's replacements in vobject base.py backslashEscape did not like it. 

One issue was a "," in the ORG field.

So trying just "," removal.  Could not do globally, since a VCARD field seperator.
My most common usage was ", Inc.", so replaced that case with "  Inc.".  Would be nice to change only in the ORG rows, but that would require more complexity than I am willing right now.  Instead I did:
in vim, my favorite text editor,
repeatedly:
:/^ORG:.*,/s/,/COMMA/g

I recommend learning the q macro feature of vim, so you can "repeatedly" by just doing "500000@a"

Another issue is "\n" in ADR field
repeatedly:
:/^ADR:.*\\n/s/\\n/ -- /g
:/^ADR;.*\\n/s/\\n/ -- /g
Need to handle " " continued second lines.
Could also remove from all " " continued second lines, even though no issue in NOTE: fields.
:/^ .*\\n/s/\\n/ -- /g
Could instead remove \n from all lines following ADR
/^ADR<CR>s/\\n/ -- /ge<CR>j:s/\\n/ -- /ge
I chose second, as I have many newlines in notes.  Using a q / @ macro made it doable.
The newlines still stayed "\n" in Google though, so not very clean looking.

If it causes problems when split accross lines, that will be harder to catch.
There was one case of it, which the Python errored on.  So I could find it to manually edit.

Also had to clean up leftover bad formatting, most likely from copying and pasting into the addressbook program.
ROLE:Text with extra newline at end\r\n
ROLE:Text with extra newline at end\r\n - More text
ORG:Text with extra newline / return at end\r
TEL;TYPE=home:(###)###-####\r --
N:Family_name\r;Given_name;;;
N:Family_name\n;Given_name;;;
etc.

I just deleted one line of this form, since it did not make sense:
LABEL;TYPE=work:#####\r -- Address Text.

More non-fatal, but data losing issues:
Comma seems also to be an issue in NOTE: ROLE:, TEL, NICKNAME:, and EMAIL:  fields.  It does not error, but it truncates at the comma.

repeatedly:
:/^NOTE:.*,/s/,/COMMA/g
:/^ROLE:.*,/s/,/COMMA/g
:/^TEL.*,/s/,/COMMA/g
:/^NICKNAME.*,/s/,/COMMA/g
:/^ .*,/s/,/COMMA/g
Space may be used in second line of many fields, but few where commas are allowed that I know of.  One that caused problems is CATEGORIES.
So, manually find:
:s/COMMA/,/g
and I hope I caught all of them.

EMAIL is a special case, because used publically.  So instead of "COMMA", change to " ".
repeatedly:
:/^EMAIL:.*,/s/,/ /g

Semicolon seems also to be an issue in NOTE: field, if at end of line, or in the case seen followed be a space at end of line ("; ), that is continued.  It does not error, but it truncates at the semicolon, and adds a \.
Manually edited.

Change X-KADDRESSBOOK-X-IMAddress: to X-JABBER
:/^X-KADDRESSBOOK-X-IMAddress:/s/X-KADDRESSBOOK-X-IMAddress:/X-JABBER:/

Items tried to change, but did not seem to work:

Change X-KADDRESSBOOK-X-Gender: to X-GENDER
:/^X-KADDRESSBOOK-X-Gender:/s/X-KADDRESSBOOK-X-Gender/X-GENDER/

Change X-KADDRESSBOOK-X-Children: to  X-CHILDREN:
:/^X-KADDRESSBOOK-X-Children:/s/X-KADDRESSBOOK-X-Children:/X-CHILDREN:/
Remove commas and semicolons
:/^X-CHILDREN:.*,/s/,/ /g
:/^X-CHILDREN:.*;/s/;/ /g

Here are ones that are not easily converted.  Could add to Note section manually, but too much work for me.
Details: Office
 X-KADDRESSBOOK-X-Office:
Details: Profession
 X-KADDRESSBOOK-X-Profession:
Details: Manager's name
 X-KADDRESSBOOK-X-ManagersName:managers name
Details: Assistant's name
 X-KADDRESSBOOK-X-AssistantsName:assistants name
Misc: Keys: not used by me.
 KEY;TYPE=PGP:
Images: Photo/Logo as URL not tested.
GEO:
 a standard form, seems, but not supported by Google.
Details: Department
 X-KADDRESSBOOK-X-Department:
 often contains commas.
 ORG:organization;department should be used.

Then follow the procedure in
http://kubuntuforums.net/forums/index.php?topic=3113756.0

Once I got an acceptably good vcf file, I deleted all my old Google contacts (from a previous half-hearted import attempt, by going to Google Voice.  There allows deleting all at once, as opposed to contacts.gooogle.com, which only lets one page at a time be deleted.

Then imported the file.
Then lamented how long this took, and that I am still missing data.

Ah, well.  Good enough.

Recommendations for viewing content on BlogSpot

I have decided to start placing some content on blogspot.  It has become clear to me that I will not make the effort to post up items on my personal web site.  Blogspot has disadvantages, but it seems that distributing information via non-optimal means is better than hoarding information due to laziness and unwillingness to spend the time to do it the better way.

I want to discuss some of the disadvantages I see, and ways readers can minimize them.

The company behind blogspot, Google, is one of the original crowd-sourcing companies.  Google does a lot well, both technologically, and in customer relations.  I highly appreciate their Data Liberation Project.  Their option to allow export of data from blogspot is one reason I chose to use their blog site.  However, they also only selectively give back the benefits gained from consumers.  Much of the data collected is restricted in use for the general public. 
To reduce the amount of information given, I recommend opting out of tracking for advertising. 
To reduce the amount of web page popularity (number of hits) info given to Google, and to save overall bandwidth, I recommend using a caching web proxy, such as Squid.  I have not used Squid since about 2002.  I am have not recently to set it up, because much of my personal computer web browsing is done by dial-up modem.  So instead I use .
Frequently logging out of blogspot / Google services would also reduce the information given.  However, I can not recommend going through the effort unless you care strongly about privacy.

I care more about textual and informational content than form.  I do not know if I will ever customize the appearance of blogspot.  However, others may not like the appearance of the color scheme, default or otherwise.  Or perhaps some other aspect of the layout does not match your desire.  Reading blogs in a RSS feed reader allows some choice in this.  It focuses on the content rather than the extra added items.  The online reader I use is Google Reader, mainly out of convenience.  Others, both online services and installable programs, are available.  I recommend installable programs when possible / not significantly more difficult.  Having the program on a hard drive reduces concerns of a service disappearing, or data being used in undesirable ways.  Most mail readers and web browsers have RSS reading functions built in.

Advertising concerns seem to no longer apply to blogspot, but it does to many free hosted pages.  I do not see any advertising on my blogspot site, and I will not purposely put it on.
Advertising should not be supported in my opinion.  I forget if saying this on blogspot violates my terms of agreement or not.  If someone cares to confirm, please let me know.  I feel advertising might have value, but I am not sure of that.  I feel advertising as done in the current culture is taking advantage of those with weak self control or intelligence.  It places temptations in front of people.  It often uses sexually attractive women to attract.  It slows down web browsing on the low-bandwidth dial-up connection I typically use.  It wastes bandwidth on all connections, as it is not content directly related to my request.
To avoid advertising, I use Adblock Plus.  I suspect pointing users to advertising blocking software violates the usage agreement terms.  If so, please let me know.
Another method to reduce advertising is to browse with images turned off.  To quickly toggle this setting in IceWeasel and FireFox, I use Image-Show-Hide Add-on.  Disabling images does not eliminate text advertisements, but I find the most bothersome advertisements are picture based.

Having documented these items, I consider readers of blogspot content fairly warned and somewhat armed.