Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Fix broken Address Book email addresses after import' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Fix broken Address Book email addresses after import
Authored by: tedlandis on Apr 05, '07 06:43:44PM
I didn't test this out, but here is the same logic in python:

import sys
new = open('vcards_fixed.vcf', 'w')
for line in open(sys.argv[1], 'r'):
    if 'item1.TEL;type=pref:' in line and '@' in line:
        new.write(line.replace('EMAIL;type=INTERNET;type=WORK;type=pref:', 'item1.TEL;type=pref:'))
    else:
        new.write(line)


[ Reply to This | # ]