Author Topic: import contacts with vCard / VCF  (Read 1974 times)

raboof

  • Newbie
  • *
  • Posts: 27
    • View Profile
import contacts with vCard / VCF
« on: June 22, 2009, 07:22:09 PM »
Hello,

I'm happy to volunteer support for importing contacts from standard vCard files. The vCard / VCF format is human readable and easily convertible to CSV too (it's entry-as-block instead of entry-as-line, and key-value instead of positional).

I can either implement an import_from_vcard_file() function for ContactController.class.php . Alternatively, the cleanest would be that you define a standard "raw" internal representation (say, a PHP Map), and frontend functions read the submitted content and repeatedly pass each contact in that intermediate format to a callback function, which finally commits to the database.

What do you think?

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: import contacts with vCard / VCF
« Reply #1 on: June 23, 2009, 10:29:23 AM »
Hi raboof,

It would be great if you could help us with the vCard import! We (the core dev team) are now working hard on version 1.5 so that we can release the first beta next week so we can't be of much help right now. So even though I agree with you that your second suggestion is the cleanest I ask you if you can implement the import_from_vcard_file function. You can work on the lates code by checking out from the CVS repository, with this command:
Code: [Select]
cvs -d :pserver:anonymous@opengoo.cvs.sourceforge.net:/cvsroot/opengoo checkout opengoo
You can ask me any questions you have about the code and I will try to answer ASAP.

Many thanks!

raboof

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: import contacts with vCard / VCF
« Reply #2 on: June 30, 2009, 09:18:57 PM »
ok. Do not expect me to be superfast with this, I'll take some weeks.

raboof

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: import contacts with vCard / VCF
« Reply #3 on: July 12, 2009, 09:07:27 PM »
Shalom,

I wrote a read_vcard_file() function instead, that mimics read_cvs_file(), $only_first_record included. It returns an array of CSV strings in the proper order. I concluded this is the least intrusive and most code-reusing way. I tested it with a bunch of VCards of up to 150 entries and it seems to be good.

How shall I submit it to you?

NolanDavis

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: import contacts with vCard / VCF
« Reply #4 on: January 29, 2019, 05:52:49 AM »
You should use the manual method to import contacts with vCard  format. If you have no idea about manual conversion process then copy and past the placed short link in the end on your search bar. You can use osttopstapp.com/vcard-export-import.html vCard Export Import tool,It's allows you to import a VCF file instantly. I hope this tool proved a fully workable solution for you.

 

anything
anything