contacts: support multiple address book collections

Migadu exposes "family" and "business" address books via CardDAV.
The contacts script now searches all subdirs under contacts/ and
adds new contacts to the "family" collection by default.
This commit is contained in:
Yanxin Lu
2026-03-31 13:33:04 -07:00
parent 3825f3dcdb
commit 0910bd5d5c
4 changed files with 20 additions and 15 deletions

View File

@@ -18,7 +18,7 @@ LLMs can hallucinate email addresses — inventing plausible-looking addresses f
- Python 3 (no external dependencies)
- `vdirsyncer` configured with a CardDAV pair for contacts sync
- Contacts directory: `~/.openclaw/workspace/contacts/default/`
- Contacts directory: `~/.openclaw/workspace/contacts/` (subdirs per address book, e.g. `family/`, `business/`)
## Usage
@@ -64,4 +64,4 @@ Unknown addresses are **rejected** with the available contacts list shown.
## Data
Contacts are stored as vCard 3.0 `.vcf` files in `~/.openclaw/workspace/contacts/default/`, synced to Migadu CardDAV via vdirsyncer. Filenames are `{uid}.vcf`.
Contacts are stored as vCard 3.0 `.vcf` files in `~/.openclaw/workspace/contacts/<collection>/`, synced to Migadu CardDAV via vdirsyncer. Collections match Migadu address books (e.g. `family/`, `business/`). New contacts are added to `family/` by default. The resolve command searches all collections.