Import Contacts

Al Johnson openmoko at mazikeen.demon.co.uk
Thu Jul 10 00:52:48 CEST 2008


On Wednesday 09 July 2008, Al Johnson wrote:
> On Wednesday 09 July 2008, smurfy - phil wrote:
> > Hey,
> >
> > i added a small script and infos at:
> >
> > http://wiki.openmoko.org/wiki/Import_Vcf_Contacts
> >
> > how to import vcf contacts to the default 2007.2 contacts application
> >
> > Phil
>
> Does this work for files containing more than one contact, or just for one
> contact per file?

Thanks Phil. I tweaked it to get it to work with more than one contact per 
file as exported by my K700i. It should work as before if there's just one 
contact per file. Here's the modified bit.

for name in names:
  print name
  vcard = ""
  f=open(name,'r')
  for line in f:
   vcard = vcard + line
   if line[:9] == "END:VCARD":
     getAddressBook().addContact(vcard)
     vcard = ""




More information about the community mailing list