Пример #1
0
 def add_vcard(self, handle, name=None, kind=None):
   vcard_dir = self.data_directory('vcards', mode='w', mkdir=True)
   c = SimpleVCard()
   c.filename = os.path.join(vcard_dir, c.random_uid) + '.vcf'
   c.gpg_recipient = lambda: self.get('gpg_recipient')
   if kind == 'individual':
     c.email = handle
   else:
     c['NICKNAME'] = handle
   if name is not None: c.fn = name
   if kind is not None: c.kind = kind
   self.index_vcard(c)
   return c.save()
Пример #2
0
 def add_vcard(self, handle, name=None, kind=None):
     vcard_dir = self.data_directory('vcards', mode='w', mkdir=True)
     c = SimpleVCard()
     c.filename = os.path.join(vcard_dir, c.random_uid) + '.vcf'
     c.gpg_recipient = lambda: self.get('gpg_recipient')
     if kind == 'individual':
         c.email = handle
     else:
         c['NICKNAME'] = handle
     if name is not None: c.fn = name
     if kind is not None: c.kind = kind
     self.index_vcard(c)
     return c.save()
Пример #3
0
 def add_vcard(self, handle, name=None, kind=None):
     vcard_dir = self.data_directory("vcards", mode="w", mkdir=True)
     c = SimpleVCard()
     c.filename = os.path.join(vcard_dir, c.random_uid) + ".vcf"
     c.gpg_recipient = lambda: self.get("gpg_recipient")
     if kind == "individual":
         c.email = handle
     else:
         c["NICKNAME"] = handle
     if name is not None:
         c.fn = name
     if kind is not None:
         c.kind = kind
     self.index_vcard(c)
     return c.save()