s365b.modules.exchange.vcf
vCard (.vcf) export of backed-up contacts.
Contacts become vCard 3.0 cards (RFC 2426), the version Outlook, Apple
Contacts, Google Contacts and Thunderbird all import; many cards go in one
file. Not in the export: contact photos (not backed up) and fields with no
vCard property (e.g. spouse, children, Yomi names).
Functions
to_vcf(contacts) → bytes
|
Write contacts as vCards. |
card(c) → list[str]
|
One contact's vCard lines, unfolded. |
Module Contents
-
s365b.modules.exchange.vcf.FOLD_AT = 75[source]
-
s365b.modules.exchange.vcf.ADDRESSES = (('businessAddress', 'WORK'), ('homeAddress', 'HOME'), ('otherAddress', 'OTHER'))[source]
-
s365b.modules.exchange.vcf.to_vcf(contacts: list[dict[str, Any]]) → bytes[source]
Write contacts as vCards.
- Parameters:
contacts – Graph contact objects, as backed up.
- Returns:
The .vcf file, UTF-8 with CRLF line ends.
-
s365b.modules.exchange.vcf.card(c: dict[str, Any]) → list[str][source]
One contact’s vCard lines, unfolded.
- Parameters:
c – A Graph contact object.
- Returns:
The lines from BEGIN:VCARD to END:VCARD.