Commit dea7ea61 authored by Sriram Karra's avatar Sriram Karra

Misc improvements to VCF read code

parent 1d7846f7
......@@ -647,8 +647,12 @@ class CDContact(Contact):
def _add_sync_tags_to_vco (self, vco):
conf = self.get_config()
pname_re = conf.get_profile_name_re()
label = conf.make_sync_label(pname_re, self.get_dbid())
if self.debug_vcf:
pname_re = '([0-9a-zA-Z]+)'
label = 'asynk:test:cd'
else:
pname_re = conf.get_profile_name_re()
label = conf.make_sync_label(pname_re, self.get_dbid())
ret = ''
i = 0
......
BEGIN:VCARD
VERSION:3.0
N:Belliçoi ABC;Hollande DEF;belliçois WTF;;;
FN:çrançois Hollande abcd
FN:çrançois efgh Hollande abcd
ORG:allinfo Company;
EMAIL;type=INTERNET;type=WORK;type=pref:allinfomationin@example.com
TEL;type=WORK;type=pref:777-777-7777
......
BEGIN:VCARD
VERSION:3.0
UID:aabd8dd0-29a1-4fe7-abd3-5c831b365b83
FN:Ángel Jesús Varela Vaca
N:Vaca;Ángel;Jesús,Varela;;
EMAIL;TYPE=home:ajvarela@us.es
EMAIL;TYPE=x-internet:angeljesusvarela@gmail.com
EMAIL;TYPE=x-internet:angel-jesus.varela@hpi.uni-potsdam.de
PRODID:DAVdroid/0.7.3 (ez-vcard/0.9.6)
REV:20150429T204335Z
END:VCARD
\ No newline at end of file
......@@ -81,6 +81,7 @@ def main (argv=None):
print unicode(con)
print "Display Name: ", con.get_disp_name()
print "VCO: ", con.init_vco_from_props().serialize()
if __name__ == '__main__':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment