From 95a5b7d35c199f303ab18de914c7742699e911d3 Mon Sep 17 00:00:00 2001 From: diegantobass Date: Wed, 7 May 2025 09:01:40 +0200 Subject: [PATCH] first try --- vcf_cleaner.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 vcf_cleaner.py diff --git a/vcf_cleaner.py b/vcf_cleaner.py new file mode 100644 index 0000000..2164255 --- /dev/null +++ b/vcf_cleaner.py @@ -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)