88 lines
2.6 KiB
Org Mode
88 lines
2.6 KiB
Org Mode
:PROPERTIES:
|
|
:ID: 20220506T143312.832024
|
|
:END:
|
|
#+title: Contact Management in Emacs
|
|
|
|
For quite a while I used [[https://github.com/skarra/ASynK/][ASynK]] to sync [[id:BBDB][BBDB]] and [[id:20220101T180015.306163][Nextcloud]], but that was a python 2 thing which hasn't been ported to py3, and that's not gonna be my problem, i think... It can't even be installed now since the =requirements.txt= doesn't pin the versions a bunch of dependencies are py3-only now...
|
|
|
|
So here's a new rube-goldberg machine.
|
|
|
|
* vdirsyncer
|
|
:PROPERTIES:
|
|
:ID: 20220506T143722.675507
|
|
:ROAM_REFS: https://vdirsyncer.pimutils.org/en/stable/
|
|
:END:
|
|
=vdirsyncer= puts a bunch of vcf files on your computer and syncs them to a vcard server or vcal server. I use it only for =vcard=, calendar stuff is done with [[id:e118bfda-4bb3-4e8d-a8de-83b4860df565][org-caldav]].
|
|
|
|
Configuration is simple enough:
|
|
|
|
#+begin_src ini :tangle ~/arroyo-nix/files/vdirsyncer-config.txt :comments none
|
|
[general]
|
|
status_path = "~/.cache/vdirsyncer/status/"
|
|
|
|
[pair nextcloud_filesytem]
|
|
a = "nextcloud_remote"
|
|
b = "nextcloud_local"
|
|
collections = ["Contacts"]
|
|
|
|
[storage nextcloud_remote]
|
|
type = "carddav"
|
|
url = "https://files.fontkeming.fail/remote.php/carddav/"
|
|
username.fetch = ["command", "pass", "fk_carddav_username"]
|
|
password.fetch = ["command", "pass", "fk_carddav_password"]
|
|
|
|
[storage nextcloud_local]
|
|
type = "filesystem"
|
|
path = "~/contacts"
|
|
fileext = ".vcf"
|
|
#+end_src
|
|
|
|
That's put in to my home-manager below.
|
|
|
|
#+begin_src nix :noweb-ref extras
|
|
home.file.".config/vdirsyncer/config".source = ../files/vdirsyncer-config.txt;
|
|
#+end_src
|
|
|
|
With this I can run on occasion [[shell:vdirsyncer sync]] to get the latest changes propagated.
|
|
|
|
* Viewing/Searching/etc contacts with =khard= and =khard.el=
|
|
:PROPERTIES:
|
|
:ID: 20220506T144230.193997
|
|
:ROAM_ALIASES: khard.el khard
|
|
:ROAM_REFS: https://github.com/DamienCassou/khardel/ https://github.com/scheibler/khard
|
|
:END:
|
|
|
|
#+ARROYO_EMACS_MODULE: khard
|
|
#+begin_src emacs-lisp :tangle ~/org/cce/khard.el
|
|
(use-package khardel)
|
|
#+end_src
|
|
|
|
#+begin_src ini :tangle ~/arroyo-nix/files/khard.conf :comments none
|
|
[addressbooks]
|
|
[[contacts]]
|
|
path = ~/contacts/Contacts
|
|
|
|
[general]
|
|
debug = no
|
|
default_action = list
|
|
editor = emacsclient, -c, -f
|
|
#+end_src
|
|
|
|
#+begin_src nix :noweb-ref extras
|
|
home.file.".config/khard/khard.conf".source = ../files/khard.conf;
|
|
#+end_src
|
|
|
|
* installing modules in [[id:cce/home-manager][home-manager]]
|
|
|
|
#+ARROYO_HOME_MODULE: hm/contacts.nix
|
|
#+begin_src nix :tangle ~/arroyo-nix/hm/contacts.nix :noweb yes
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
home.packages = with pkgs; [ khard vdirsyncer ];
|
|
<<extras>>
|
|
}
|
|
#+end_src
|
|
|