Browse Source

switch contact integration to khard/vdirsyncer

mxmehl 2 years ago
parent
commit
a53ded5d70
3 changed files with 92 additions and 1 deletions
  1. 41
    0
      khard/khard.conf
  2. 50
    0
      vdirsyncer/config
  3. 1
    1
      vim/.vim/astroid.vim

+ 41
- 0
khard/khard.conf View File

@@ -0,0 +1,41 @@
1
+# example configuration file for khard version >= 0.11.0
2
+# place it under $HOME/.config/khard/khard.conf
3
+
4
+[addressbooks]
5
+[[fsfe]]
6
+path = ~/.contacts/fsfe
7
+
8
+[general]
9
+debug = no
10
+default_action = list
11
+editor = vim
12
+merge_editor = vimdiff
13
+
14
+[contact table]
15
+# display names by first or last name: first_name / last_name
16
+display = first_name
17
+# group by address book: yes / no
18
+group_by_addressbook = yes
19
+# reverse table ordering: yes / no
20
+reverse = no
21
+# append nicknames to name column: yes / no
22
+show_nicknames = yes
23
+# show uid table column: yes / no
24
+show_uids = no
25
+# sort by first or last name: first_name / last_name
26
+sort = last_name
27
+
28
+[vcard]
29
+# extend contacts with your own private objects
30
+# these objects are stored with a leading "X-" before the object name in the vcard files
31
+# every object label may only contain letters, digits and the - character
32
+# example:
33
+#   private_objects = Jabber, Skype, Twitter
34
+private_objects = Jabber, Skype, Twitter
35
+# preferred vcard version: 3.0 / 4.0
36
+preferred_version = 3.0
37
+# Look into source vcf files to speed up search queries: yes / no
38
+search_in_source_files = no
39
+# skip unparsable vcard files: yes / no
40
+skip_unparsable = no
41
+

+ 50
- 0
vdirsyncer/config View File

@@ -0,0 +1,50 @@
1
+# An example configuration for vdirsyncer.
2
+#
3
+# Move it to ~/.vdirsyncer/config or ~/.config/vdirsyncer/config and edit it.
4
+# Run `vdirsyncer --help` for CLI usage.
5
+#
6
+# Optional parameters are commented out.
7
+# This file doesn't document all available parameters, see
8
+# http://vdirsyncer.pimutils.org/ for the rest of them.
9
+
10
+[general]
11
+# A folder where vdirsyncer can store some metadata about each pair.
12
+status_path = "~/.vdirsyncer/status/"
13
+
14
+# CARDDAV
15
+[pair fsfe]
16
+# A `[pair <name>]` block defines two storages `a` and `b` that should be
17
+# synchronized. The definition of these storages follows in `[storage <name>]`
18
+# blocks. This is similar to accounts in OfflineIMAP.
19
+a = "fsfe_local"
20
+b = "fsfe_remote"
21
+
22
+# Synchronize all collections that can be found.
23
+# You need to run `vdirsyncer discover` if new calendars/addressbooks are added
24
+# on the server.
25
+
26
+collections = ["from a", "fsfe"]
27
+
28
+# Synchronize the "display name" property into a local file (~/.contacts/displayname).
29
+metadata = ["displayname"]
30
+
31
+# To resolve a conflict the following values are possible:
32
+#   `null` - abort when collisions occur (default)
33
+#   `"a wins"` - assume a's items to be more up-to-date
34
+#   `"b wins"` - assume b's items to be more up-to-date
35
+#conflict_resolution = null
36
+
37
+[storage fsfe_local]
38
+# A storage references actual data on a remote server or on the local disk.
39
+# Similar to repositories in OfflineIMAP.
40
+type = "filesystem"
41
+path = "~/.contacts/"
42
+fileext = ".vcf"
43
+
44
+[storage fsfe_remote]
45
+type = "carddav"
46
+url = "https://d.mehl.mx/baikal/html/dav.php/addressbooks"
47
+username = "mxmehl"
48
+# The password can also be fetched from the system password storage, netrc or a
49
+# custom command. See http://vdirsyncer.pimutils.org/en/stable/keyring.html
50
+password.fetch = ["command", "pass", "DAV/Baikal-mxmehl"]

+ 1
- 1
vim/.vim/astroid.vim View File

@@ -19,7 +19,7 @@ execute "call append(line('.')-1, '')"
19 19
 execute "call append(line('.')-1, '')"
20 20
 
21 21
 " Email auto completion for headers
22
-let g:qcc_query_command='abook --datafile ~/DAV/CardDAV/mxmehl-fsfe.abook --mutt-query'
22
+let g:qcc_query_command='khard email --parsable --search-in-source-files'
23 23
 setlocal omnifunc=QueryCommandComplete
24 24
 
25 25
 " Functions

Loading…
Cancel
Save