Add a program to convert google exported contacts to an agnostic format.
Presents a basic architecture for storing Contacts in ZPUI
Implementation
python package vobject is used to parse vcard format (may be compatible with more than just google, untested)
Contact class contains all data for a contact. All attributes are lists to stay compatible with vcard standard and allow future exports. Contact,merge(self, other) and Contact.match(other) are worth noting. They allow repectively to merge two contacts into one and to compare how similar they are.
AddressBook is a python Singleton that loads, saves and organizes contacts. AddressBook.search and AddressBook.find_duplicates may be used in external applications
DiscussionThe storage format is a pickle.dump of the list of contacts
the save file is stored in $XDG_DATA_HOME. If not available ~/.zpui/ is chosen (Thanks to @bjoernfan on irc for the suggestion). Do we keep it that way ?
The save file is unencrypted and dead-easy to read, what should we do about it ?
Purpose
Implementation
vobject
is used to parse vcard format (may be compatible with more than just google, untested)Contact
class contains all data for a contact. All attributes are lists to stay compatible with vcard standard and allow future exports.Contact,merge(self, other)
andContact.match(other)
are worth noting. They allow repectively to merge two contacts into one and to compare how similar they are.AddressBook
is a pythonSingleton
that loads, saves and organizes contacts.AddressBook.search
andAddressBook.find_duplicates
may be used in external applicationsDiscussion The storage format is a
pickle.dump
of the list of contacts$XDG_DATA_HOME
. If not available~/.zpui/
is chosen (Thanks to @bjoernfan on irc for the suggestion). Do we keep it that way ?