first try
This commit is contained in:
commit
95a5b7d35c
1 changed files with 19 additions and 0 deletions
19
vcf_cleaner.py
Normal file
19
vcf_cleaner.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import pickle
|
||||
from pythonvCard4.vcard import Contact
|
||||
|
||||
input = open("contacts.vcf", 'r').readlines()
|
||||
output = open("processed.vcf", 'w')
|
||||
|
||||
for line in input:
|
||||
|
||||
if "TEL" in line:
|
||||
line = line.replace('-', '')
|
||||
if ":06" in line: line = line.replace(":06", ":+336")
|
||||
if ":07" in line: line = line.replace(":07", ":+337")
|
||||
if ":00" in line: line = line.replace(":00", ":+")
|
||||
if ":09" in line: line = line.replace(":09", ":+339")
|
||||
if ":01" in line: line = line.replace(":01", ":+331")
|
||||
|
||||
print(line)
|
||||
|
||||
output.write(line)
|
||||
Loading…
Reference in a new issue