Last 12 months, I introduced you 19 days of recent (to you) productiveness instruments for 2019. This 12 months, I am taking a special strategy: constructing an surroundings that may mean you can be extra productive within the new 12 months, utilizing instruments chances are you’ll or might not already be utilizing.
In earlier articles on this sequence, I defined how you can synchronize your mail and calendars domestically. Hopefully, that has sped up accessing your mail and calendar. Now I will discuss contacts, which you should utilize to ship mail and calendar invitations.
I’ve collected a whole lot of e mail addresses over the course of my, properly, life to date. And managing all that knowledge could be a little bit of a ache. There are web-based companies, however they don’t seem to be as quick as a neighborhood copy.
Just a few days in the past, I talked about vdirsyncer for managing calendars. Vdirsyncer additionally handles contacts utilizing the CardDAV protocol. Vdirsyncer helps google_contacts and carddav to do contact synchronizations along with the filesystem retailer it makes use of for calendars, however the fileext setting will change, so you will not be attempting to retailer contacts in calendar recordsdata.
I added a configuration block to the config file and mirrored my contacts from Google; extra steps are required to set it up. Extra steps are required to set it up. Once the Google setup is full, the configuration is fairly easy:
[pair address_sync]
a = "googlecard"
b = "localcard"
collections = ["from a", "from b"]
conflict_resolution = "a wins"[storage googlecard]
sort = "google_contacts"
token_file = "~/.vdirsyncer/google_token"
client_id = "my_client_id"
client_secret = "my_client_secret"[storage localcard]
sort = "filesystem"
path = "~/.calendars/Addresses/"
fileext = ".vcf"
Now after I run vdirsyncer uncover, it finds my Google contacts, and vdirsyncer sync copies them to my native machine. But once more, that is solely half the story. Now I wish to learn and use the contacts. Enter khard and abook.
Why two purposes? Each has its personal use case, and on this case, extra is healthier. Khard does for addresses what khal does for calendar entries. You’ll in all probability wish to set up the most recent launch through pip in case your distribution ships an older model. Once khard is put in, you must create ~/.config/khard/khard.conf as a result of khard does not have a nifty configuration wizard the best way khal does. Mine seems to be like this:
[addressbooks]
[[addresses]]
path = ~/.calendars/Addresses/default/[general]
debug = no
default_action = checklist
editor = vim, -i, NONE
merge_editor = vimdiff[contact table]
show = first_name
group_by_addressbook = no
reverse = no
show_nicknames = sure
show_uids = no
type = last_name
localize_dates = sure[vcard]
preferred_version = three.zero
search_in_source_files = sure
skip_unparsable = no
This defines the supply tackle e book (and provides it a pleasant title), in addition to what to show and what do use to edit contacts. Running khard checklist will checklist all of the entries, and khard checklist <some@email.adr> will seek for a selected entry. If you wish to add or edit an entry, the add and edit instructions launch the configured editor with the identical fundamental template, the one distinction being that the add template can be clean.
Abook requires you to import and export VCF recordsdata however affords some good options for lookups. To convert your recordsdata to the abook format, first set up abook and create the ~/.abook default listing. Now inform abook to parse all of the recordsdata and put them into the ~/.abook/addresses file:
apt set up abook
ls ~/.calendars/Addresses/default/* | xargs cat | abook --convert --informat vcard --outformat abook > ~/.abook/addresses
Now run abook, and you will have a really good UI to browse, search, and edit the entries. Exporting them again to particular person entries is a little bit of a ache, so I do most of my edits with khard and have a cron job to import them into abook.
Abook may also search on the command line and has a whole lot of documentation about integrating it with mail purchasers. For instance, you should utilize abook for lookups within the Notmuch e mail consumer alot by including some data to the .config/alot/config file:
[accounts]
[[Personal]]
realname = Kevin Sonney
tackle = kevin@sonney.com
alias_regexp = kevin+.+@sonney.com
gpg_key = 7BB612C9
sendmail_command = msmtp --account=Personal -t
# ~ growth works
sent_box = maildir://~/Maildir/Sent
draft_box = maildir://~/Maildir/Drafts
[[[abook]]]
sort = abook
And there you might have it: quick lookup of your contacts to go together with your mail and calendars!