Import Vcf Contacts

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(emphasized use of openmoko terminal)
(additional notes from my experience and organizing the page)
Line 1: Line 1:
 
If you want to import your old Contacts to your Neo you could use this simple script:
 
If you want to import your old Contacts to your Neo you could use this simple script:
  
[http://www.smurfy.de/files/neo/ac simple vcf import script]
+
[http://www.smurfy.de/files/neo/ac Simple vcf import script] (could the script be licensed under BSD or GPL?)
 +
 
 +
== Modification to the script ==
  
 
Al Johnson posted an extension to this script to handle vcf files wihl multiple contacts. It should work as before if there's just one contact per file. Here's the modified bit:
 
Al Johnson posted an extension to this script to handle vcf files wihl multiple contacts. It should work as before if there's just one contact per file. Here's the modified bit:
Line 15: Line 17:
 
       vcard = ""
 
       vcard = ""
  
This Script is for the 2007.2 Version (default install on Neo FreeRunner) not for Qtopia
+
== Exporting old contacts to VCard format ==
  
You need python to use this script do a
+
Next step is to export your old contacts as vcf. I know its possible with Nokia phones and i used a Winmobile->activesync->Outlook export plugin to get my Contacts from my old Cell. In LG phones the backup function to memory card creates one file with multiple VCards. Etc.
 +
 
 +
== Usage ==
 +
 
 +
The script is for the 2007.2 Version (default install on Neo FreeRunner), not for Qtopia
 +
 
 +
You need Python to use this script so do a
  
 
  opkg install python-dbus
 
  opkg install python-dbus
  
 
to install python and the python dbus module
 
to install python and the python dbus module
 
Next step is to export your old contacts as vcf.
 
I know its possible with Nokia phones and i used a Winmobile->activesync->Outlook export plugin to get my Contacts from my old
 
Cell.
 
  
 
The script does a listdir and imports ALL files it found in that dir. (i'm a bad python programmer)
 
The script does a listdir and imports ALL files it found in that dir. (i'm a bad python programmer)
  
so this is what i have done.
+
# Copy all vcf files to a separate directory on my freerunner
 
+
# Copy the ac script to the parent directory also on my freerunner
* copied all vcf files to a separate directory on my freerunner
+
# Have the contacts program running (so you have eds running too)
* copied the ac script to the parent directory also on my freerunner
+
# Go to the terminal on the freerunner and type in the vcf directory: "python ../ac" (root@om-gta02:~/vcf# python ../ac)
* go to the terminal on the freerunner and "typed" in the vcf directory: "python ../ac" (root@om-gta02:~/vcf# python ../ac)
+
## Note: '''You must call the script in the OM terminal''' not via Bluetooth or USB or you get a dbus error.
* done :D (NOTE: '''You must call the script in the OM terminal''' not via Bluetooth or USB or you get a dbus error.)
+
# Done :D
  
Troubleshooting:
+
=== Troubleshooting ===
* make sure you have python and python-dbus installed
+
* Make sure you have python and python-dbus installed
* make sure you have no illegal chars (utf) in the filename and inside the vcf files. (I had problems with Ü,Ä etc)
+
* Make sure you have no illegal chars (utf) in the filename and inside the vcf files. (I had problems with Ü,Ä etc)
* only vcf files should be in you current directory so do a ../ac.
+
** The characters seem to work if you convert them from =C3=A4 type of format to proper UTF-8, and the vcards also specify UTF-8 charset. you cannot use other charsets besides UTF-8 since they are delivered via DBus which does not allow others.
 +
* Only vcf files should be in your current directory so do a ../ac.
 
* You must call the script in the OM terminal not via Bluetooth or USB. If you do so a dbus error occur
 
* You must call the script in the OM terminal not via Bluetooth or USB. If you do so a dbus error occur
  

Revision as of 11:06, 12 July 2008

If you want to import your old Contacts to your Neo you could use this simple script:

Simple vcf import script (could the script be licensed under BSD or GPL?)

Contents

Modification to the script

Al Johnson posted an extension to this script to handle vcf files wihl multiple contacts. 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 = ""

Exporting old contacts to VCard format

Next step is to export your old contacts as vcf. I know its possible with Nokia phones and i used a Winmobile->activesync->Outlook export plugin to get my Contacts from my old Cell. In LG phones the backup function to memory card creates one file with multiple VCards. Etc.

Usage

The script is for the 2007.2 Version (default install on Neo FreeRunner), not for Qtopia

You need Python to use this script so do a

opkg install python-dbus

to install python and the python dbus module

The script does a listdir and imports ALL files it found in that dir. (i'm a bad python programmer)

  1. Copy all vcf files to a separate directory on my freerunner
  2. Copy the ac script to the parent directory also on my freerunner
  3. Have the contacts program running (so you have eds running too)
  4. Go to the terminal on the freerunner and type in the vcf directory: "python ../ac" (root@om-gta02:~/vcf# python ../ac)
    1. Note: You must call the script in the OM terminal not via Bluetooth or USB or you get a dbus error.
  5. Done :D

Troubleshooting

  • Make sure you have python and python-dbus installed
  • Make sure you have no illegal chars (utf) in the filename and inside the vcf files. (I had problems with Ü,Ä etc)
    • The characters seem to work if you convert them from =C3=A4 type of format to proper UTF-8, and the vcards also specify UTF-8 charset. you cannot use other charsets besides UTF-8 since they are delivered via DBus which does not allow others.
  • Only vcf files should be in your current directory so do a ../ac.
  • You must call the script in the OM terminal not via Bluetooth or USB. If you do so a dbus error occur


Thanks to Import_Sim_Contacts for the original Python Script.

Personal tools

If you want to import your old Contacts to your Neo you could use this simple script:

Simple vcf import script (could the script be licensed under BSD or GPL?)

Modification to the script

Al Johnson posted an extension to this script to handle vcf files wihl multiple contacts. 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 = ""

Exporting old contacts to VCard format

Next step is to export your old contacts as vcf. I know its possible with Nokia phones and i used a Winmobile->activesync->Outlook export plugin to get my Contacts from my old Cell. In LG phones the backup function to memory card creates one file with multiple VCards. Etc.

Usage

The script is for the 2007.2 Version (default install on Neo FreeRunner), not for Qtopia

You need Python to use this script so do a

opkg install python-dbus

to install python and the python dbus module

The script does a listdir and imports ALL files it found in that dir. (i'm a bad python programmer)

  1. Copy all vcf files to a separate directory on my freerunner
  2. Copy the ac script to the parent directory also on my freerunner
  3. Have the contacts program running (so you have eds running too)
  4. Go to the terminal on the freerunner and type in the vcf directory: "python ../ac" (root@om-gta02:~/vcf# python ../ac)
    1. Note: You must call the script in the OM terminal not via Bluetooth or USB or you get a dbus error.
  5. Done :D

Troubleshooting

  • Make sure you have python and python-dbus installed
  • Make sure you have no illegal chars (utf) in the filename and inside the vcf files. (I had problems with Ü,Ä etc)
    • The characters seem to work if you convert them from =C3=A4 type of format to proper UTF-8, and the vcards also specify UTF-8 charset. you cannot use other charsets besides UTF-8 since they are delivered via DBus which does not allow others.
  • Only vcf files should be in your current directory so do a ../ac.
  • You must call the script in the OM terminal not via Bluetooth or USB. If you do so a dbus error occur


Thanks to Import_Sim_Contacts for the original Python Script.