jowave / vcard2to3

Convert vcards from version 2.1 to version 3.0
MIT License
186 stars 15 forks source link

x-mobile field #9

Closed tflidd closed 3 years ago

tflidd commented 3 years ago

Thanks for this nice script, it helped me to convert a few contacts from an old address book in Android.

In this address book, there were a few contacts with a field type x-mobil. Not really sure where it originates, perhaps at some time the German ISP T-Mobile used this for numbers in their network? I found a few references in German forums. I just removed this custom field and converted it to a normal cell phone number. I don't know if you want to have it in the sources or not, I added a replace filter in vcard2to3.py after line 95:

self.replace_filters.append( (re.compile('^TEL;TYPE=x-mobil:(.*)'), 'TEL;TYPE=cell:\\1') )

jowave commented 3 years ago

My original 2.1 vcards did not contain any TYPE=, but I have added your replacement, since it is specific enough to not cause any issues. Thank you.