Compare commits
No commits in common. "6249decb96d082f25e490d5c912cf7f4ae589238" and "6280f848fe97b6a1fd9e210a32c2ed01b781d104" have entirely different histories.
6249decb96
...
6280f848fe
2 changed files with 4 additions and 18 deletions
|
|
@ -1,18 +1 @@
|
|||
import os
|
||||
import sys
|
||||
import csv
|
||||
import phonenumbers
|
||||
from pythonvCard4.vcard import Contact
|
||||
|
||||
file = csv.reader(open(sys.argv[1], 'r'))
|
||||
headers = next(file)
|
||||
output = open("vcf/groups.vcf",'w')
|
||||
|
||||
for contact in file:
|
||||
number = phonenumbers.parse(contact[0])
|
||||
number = phonenumbers.format_number(number, phonenumbers.PhoneNumberFormat.INTERNATIONAL)
|
||||
number = [{"value": number, "type": []}]
|
||||
name = contact[1]
|
||||
card = Contact(tel=number, fn=name)
|
||||
vcf_text = card.to_vcard()
|
||||
output.write(vcf_text)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
import os
|
||||
from re import escape
|
||||
import sys
|
||||
import quopri
|
||||
import base64
|
||||
import pickle
|
||||
import itertools
|
||||
import phonenumbers
|
||||
import pythonvCard4
|
||||
from pythonvCard4.vcard import Contact
|
||||
|
||||
# input should be a valid .vcf file, output in current dir
|
||||
|
|
|
|||
Loading…
Reference in a new issue