Skip to content

Instantly share code, notes, and snippets.

@m42e
Created October 25, 2019 07:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m42e/607e7843ebe81d756c30653b7bcd6327 to your computer and use it in GitHub Desktop.
Save m42e/607e7843ebe81d756c30653b7bcd6327 to your computer and use it in GitHub Desktop.
for line in open('Kontaktliste.txt', 'r').readlines():
fn, s, p, c, t, e = map(str.strip, line.split(','))
a = f"{s}\\n{p} {c}"
v, n = fn.split(' ')
vcf=f"""
BEGIN:VCARD
VERSION:3.0
N;CHARSET=UTF8:{n};{v};;;
FN;CHARSET=UTF8:{v} {n}
TEL;TYPE=mobile,VOICE:{t}
ADR;CHARSET=UTF8;TYPE=HOME:;;{s};{c};;{p};Germany
EMAIL:{e}
REV:20140301T221110Z
NOTE:Coaching Ausbildung 2019
END:VCARD
"""
print(vcf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment