Import Contacts

Andreas Dalsgaard andreas.dalsgaard at gmail.com
Mon Jul 14 14:01:07 CEST 2008


2008/7/12 Al Johnson <openmoko at mazikeen.demon.co.uk>:
> On Friday 11 July 2008, Kalle Happonen wrote:
>> Hi,
>>
>> Brian C wrote:
>> > Brian C wrote:
>> > [a long error message because he didn't run the script from the OM
>> > terminal]
>> >
>> > Ok, so the script runs now that I realize it must be run from the OM
>> > terminal.
>
> It might work from an ssh session if you run:
>        dbus-launch scriptname
> I haven't tried this though - just guessing based on similar behaviour from
> gconftool-2
>
>> > However, it appears to have entered all "null" contacts and
>> > so far none of them appear to have any actual contact info in them

If you do not want to delete all the "null" contacts by hand I've made
a script(attached as remove_all_contacts.py) based on Wurps script
which removes all contacts in your addressbook. It should be pretty
easy to modify so that it only deletes "null" contacts.

>>
>> I ran into the same problem, but I did get them in now with the script.
>> I had two issues actually. The easiest to try
>>  is to remove the empty lines between the entries in the vCard file, and
>> have them all in a long jumble. That solved my last problem.
>
> Blank line removal should be a one-liner - if only I were more familiar with
> python ;-)

Take a quick look at the attached import_contacts.py script, it is
based on Al Johnson modification to Wurps script.

>
>> I did have another problem when I played around with the contacts in
>> Evolution on the desktop. I started by exporting the contacts as vCard
>> from Wammu. Evolution refused to read those  v2.1 vCards. I then
>> exported it as ldif from wammu, and had to make a small change in the
>> entries so that evolution read them correctly (adding a cn or smth).
>> AFAIK the openmoko contacts is also based on evolution so there might be
>> similar problems.
>>
>> When I tried to import Wammu vCards,  they showed up as null entries on
>> openmoko. When I exported the contacts as vCard (3.0) from evolution,
>> and removed the empty lines in the vCard file, I could import them to
>> openmoko with the script. I'm not sure if the new vCard format helped any.
>
> Interesting...I remember having similar problems with OpenXchange a couple of
> years ago. It assumed v3 and didn't check the version in the vCard itself.
> You had to pick which interface to use depending on the vCard version. i
> wonder if Evolution Data Server is doing something similar?
>
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: import_contacts.py
Type: text/x-python
Size: 2587 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/community/attachments/20080714/5253bef6/attachment.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove_all_contacts.py
Type: text/x-python
Size: 857 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/community/attachments/20080714/5253bef6/attachment-0001.py 


More information about the community mailing list