paru -S aerc
paru -S hydroxide
paru -S khard
paru -S vdirsyncer
paru -S gopass
cd ~/.config
mkdir vdirsyncer
cd vdirsyncer/
wget https://raw.githubusercontent.com/pimutils/vdirsyncer/master/config.example -O config
mkdir status
mkdir contacts
# Move it to ~/.vdirsyncer/config or ~/.config/vdirsyncer/config and edit it.
# Run `vdirsyncer --help` for CLI usage.
#
# http://vdirsyncer.pimutils.org/ for the rest of them.
[general]
# A folder where vdirsyncer can store some metadata about each pair.
status_path = "~/.config/vdirsyncer/status/"
# CARDDAV
[pair protonmail]
# A `[pair <name>]` block defines two storages `a` and `b` that should be
# synchronized. The definition of these storages follows in `[storage <name>]`
# blocks. This is similar to accounts in OfflineIMAP.
a = "protonmail_contacts_local"
b = "protonmail_contacts_remote"
# Synchronize all collections that can be found.
# You need to run `vdirsyncer discover` if new calendars/addressbooks are added
# on the server.
collections = ["from a", "from b"]
# Synchronize the "display name" property into a local file (~/.contacts/displayname).
metadata = ["displayname"]
# To resolve a conflict the following values are possible:
# `null` - abort when collisions occur (default)
# `"a wins"` - assume a's items to be more up-to-date
# `"b wins"` - assume b's items to be more up-to-date
#conflict_resolution = null
[storage protonmail_contacts_local]
# A storage references actual data on a remote server or on the local disk.
# Similar to repositories in OfflineIMAP.
type = "filesystem"
path = "~/.config/vdirsyncer/contacts/"
fileext = ".vcf"
[storage protonmail_contacts_remote]
type = "carddav"
#url = "https://owncloud.example.com/remote.php/carddav/"
url = "http://127.0.0.1:8080/"
username = "rek2@hispagatos.org"
# The password can also be fetched from the system password storage, netrc or a
# custom command. See http://vdirsyncer.pimutils.org/en/stable/keyring.html
password.fetch = ["command", "gopass", "show", "-o", "-f", "email/rek2@hispagatos.org"]
Ojo que el password.fetch no viene en el config de ejemplo, he sido yo que me he RTFM la documentacion para poder usar pass o gopass y asi no tener passwords en lo claro en ningun sitio en mi sistema. no me seais lamers PASSWORDS NUNCA SIN CIFRAR EN NINGUN LADO.
Ahora primero hacemos el discovery para encontrar los address-books remotos
Y seguido hacemos el sync para bajarlos
vdirsyncer discover
Discovering collections for pair protonmail
protonmail_contacts_local:
- "127.0.0.1:8080"
protonmail_contacts_remote:
- "127.0.0.1:8080" ("ProtonMail")
Saved for protonmail: collections = ["127.0.0.1:8080"]
vdirsyncer sync
Syncing protonmail/127.0.0.1:8080
*/180 * * * * vdirsyncer sync
mkdir ~/.config/khard
cd ~/.config/khard
wget https://raw.githubusercontent.com/scheibler/khard/develop/doc/source/examples/khard.conf.example -O khard.conf
# Place it under ~/.config/khard/khard.conf
# This file is parsed by the configobj library. The syntax is described at
# https://configobj.readthedocs.io/en/latest/configobj.html#the-config-file-format
[general]
debug = no
default_action = list
# These are either strings or comma seperated lists
editor = vim, -i, NONE
merge_editor = vimdiff
[addressbooks]
[[Personal]]
path = ~/.config/vdirsyncer/contacts/127.0.0.1:8080
[contact table]
# display names by first or last name: first_name / last_name / formatted_name
display = first_name
# group by address book: yes / no
group_by_addressbook = no
# reverse table ordering: yes / no
reverse = no
# append nicknames to name column: yes / no
show_nicknames = no
# show uid table column: yes / no
show_uids = yes
# sort by first or last name: first_name / last_name / formatted_name
sort = first_name
# localize dates: yes / no
localize_dates = yes
# set a comma separated list of preferred phone number types in descending priority
# or nothing for non-filtered alphabetical order
preferred_phone_number_type = pref, cell, home
# set a comma separated list of preferred email address types in descending priority
# or nothing for non-filtered alphabetical order
preferred_email_address_type = pref, work, home
[vcard]
# extend contacts with your own private objects
# these objects are stored with a leading "X-" before the object name in the vcard files
# every object label may only contain letters, digits and the - character
# example:
# private_objects = Jabber, Skype, Twitter
# default: , (the empty list)
private_objects = Jabber, Mastodon, Matrix, Signal
# preferred vcard version: 3.0 / 4.0
preferred_version = 3.0
# Look into source vcf files to speed up search queries: yes / no
search_in_source_files = no
# skip unparsable vcard files: yes / no
skip_unparsable = no
khard
khard edit rek2
[compose]
...
address-book-cmd=khard email --parsable --remove-first-line %s
commit f332885e5ace0304b004520b125917c224344019 Author: rek2 <rek2@hispagatos.org> Date: 2022-06-26T06:00:13+02:00 xdg-mime default aerc.desktop x-scheme-handler/mailto