khal: fix contact integration (#4836)
* khal: fix contact integration - Add tests for contact+khal - Make options `color`/`priority` available for contact accounts * khal: add separate calendar for each contact collection A contact account may have multiple VCARD collections, but Khal doesn't search recursively. Collection folder names must be hardcoded, and each has its own calendar. - Add khal.collections option for contact accounts - Default to previous setup for accounts with a single collection - Add tests * khal: specify how priority is defined by Khal See https://khal.readthedocs.io/en/latest/configure.html
This commit is contained in:
parent
4de84265d7
commit
d579633ff9
7 changed files with 120 additions and 38 deletions
|
|
@ -32,6 +32,36 @@
|
|||
};
|
||||
};
|
||||
|
||||
accounts.contact = {
|
||||
basePath = "$XDG_CONFIG_HOME/card";
|
||||
accounts = {
|
||||
testcontacts = {
|
||||
khal = {
|
||||
enable = true;
|
||||
collections = [ "default" "automaticallyCollected" ];
|
||||
};
|
||||
local.type = "filesystem";
|
||||
local.fileExt = ".vcf";
|
||||
name = "testcontacts";
|
||||
remote = {
|
||||
type = "http";
|
||||
url = "https://example.com/contacts.vcf";
|
||||
};
|
||||
};
|
||||
|
||||
testcontactsNoCollections = {
|
||||
khal.enable = true;
|
||||
local.type = "filesystem";
|
||||
local.fileExt = ".vcf";
|
||||
name = "testcontactsNoCollections";
|
||||
remote = {
|
||||
type = "http";
|
||||
url = "https://example.com/contacts.vcf";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs = { khal = { }; };
|
||||
|
||||
nmt.script = ''
|
||||
|
|
|
|||
|
|
@ -7,6 +7,27 @@ type=calendar
|
|||
|
||||
|
||||
|
||||
[[testcontacts-automaticallyCollected]]
|
||||
path = /home/hm-user/$XDG_CONFIG_HOME/card/testcontacts/automaticallyCollected
|
||||
priority=10
|
||||
type=birthdays
|
||||
|
||||
|
||||
|
||||
[[testcontacts-default]]
|
||||
path = /home/hm-user/$XDG_CONFIG_HOME/card/testcontacts/default
|
||||
priority=10
|
||||
type=birthdays
|
||||
|
||||
|
||||
|
||||
[[testcontactsNoCollections]]
|
||||
path = /home/hm-user/$XDG_CONFIG_HOME/card/testcontactsNoCollections/
|
||||
priority=10
|
||||
type=birthdays
|
||||
|
||||
|
||||
|
||||
[default]
|
||||
default_calendar=test
|
||||
highlight_event_days=true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue