Created
February 10, 2014 15:39
-
-
Save mcskrzypczak/8918063 to your computer and use it in GitHub Desktop.
Skrypt do tworzenia kopii zapasowej kontaktów na urządzeniach pod kontrolą iOS (wymagana instalacja aplikacji Pythonista)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import contacts | |
import webbrowser, urllib | |
DRAFTS_ACTION = "Kontakty" | |
VCARD = "" | |
people = contacts.get_all_people() | |
for person in people: | |
VCARD = VCARD + person.vcard | |
#print VCARD | |
base = "drafts://x-callback-url/create?text=" | |
text = urllib.quote(VCARD, safe='') | |
action = "&action=" + urllib.quote(DRAFTS_ACTION, safe='') | |
success = "&x-success=" | |
#print base + text + action + success | |
webbrowser.open(base + text + action + success) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment