Editing Importing iPhone Contacts

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 8: Line 8:
== contact.py ==
== contact.py ==
-
The following code will take the output csv file and transfer it into one large vcf file which you can import using the Contacts application on your [[Nokia N900|N900]]. One drawback to using the securedContacts seems to be that any location information is lost, but I found this import a million times better than doing it by hand. Just copy the code into a new file "contact.py" and then rename your csv along side it as "contacts.csv".
+
The following code will take the output csv file and transfer it into one large vcf file which you can import using the Contacts application on your n900.
 +
One drawback to using the securedContacts seems to be that any location information is lost, but I found this import a million times better than doing it by hand. Just copy the code into a new file "contact.py" and then rename your csv along side it as "contacts.csv".
-
You can run the code with:
+
You can run the code with  
-
python contact.py > contacts.vcf
+
python contact.py > contacts.vcf
-
<source lang="python">
+
<pre>
#!/usr/bin/env python
#!/usr/bin/env python
import re
import re
Line 69: Line 70:
print "REV:"+str(n.year)+str(n.month).zfill(2)+str(n.day).zfill(2)+"T"+str(n.hour).zfill(2)+str(n.minute).zfill(2)+str(n.second).zfill(2)+"Z"
print "REV:"+str(n.year)+str(n.month).zfill(2)+str(n.day).zfill(2)+"T"+str(n.hour).zfill(2)+str(n.minute).zfill(2)+str(n.second).zfill(2)+"Z"
print "END:VCARD"
print "END:VCARD"
-
</source>
+
</pre>
After your vcf file is generated, you can place it onto your n900, then in the Contacts application, click the title bar >>> "Get contacts" >>> Import Contacts". Browse to your contacts.vcf file and click import!
After your vcf file is generated, you can place it onto your n900, then in the Contacts application, click the title bar >>> "Get contacts" >>> Import Contacts". Browse to your contacts.vcf file and click import!
Hope this helps someone, this code was pretty rushed and got the job done for me. Phone number regexps worked for my Australian phone numbers, you may have to make changes for overseas numbers.
Hope this helps someone, this code was pretty rushed and got the job done for me. Phone number regexps worked for my Australian phone numbers, you may have to make changes for overseas numbers.
-
 
-
[[Category:HowTo]]
 
-
[[Category:Power users]]
 

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)