Address_entension.py 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/python3
  2. # coding=utf-8
  3. # Doc
  4. # Script to extract Contacts from Sailfish Contact SQLite DB located at
  5. #
  6. #
  7. # Links
  8. # Projects Page: https://wiki.siningsoft.de/doku.php?id=sailfishos:projects:sailfish_contacts_rescue
  9. # FileFormatdescription: https://docs.fileformat.com/email/vcf/#vcf-30-example
  10. # Pytho vobject: http://eventable.github.io/vobject/
  11. # Version
  12. version=0.4
  13. # ChangeLog
  14. # 2021-08-03 - 0.1 - multiple E-Mails with different types are working correctly
  15. # 2021-08-09 - 0.2 - Phonenumbers with parameters, Addresses with parameters, E-Mail-Addresses with marameters
  16. # 2021-08-10 - 0.3 - load Avatars into VCards
  17. # 2021-08-28 - 0.4 - bugfixing after full exporting my contacts
  18. import vobject
  19. # Klasse Vererben
  20. class Address(Address):
  21. def replace(from,to):
  22. print("replace ".from." to ".to)
  23. # wir erstellen das Objekt
  24. vcf = vobject.vCard()
  25. vcf.add(addADR).value = vobject.vcard.Address(street=ADRstr, city=ADRcit, region=ADRreg, code=ADRcod,country=ADRcou)