| 1 |
CARDDAV-QUERY(1) |
| 2 |
|
| 3 |
# NAME |
| 4 |
|
| 5 |
carddav-query - Query a CardDAV server for contact names and emails. |
| 6 |
|
| 7 |
# SYNOPSIS |
| 8 |
|
| 9 |
*carddav-query* [*-h*] [*-l* _<limit>_] [*-v*] [*-c* _<file>_] |
| 10 |
\[*-s* _<section>_] [*-k* _<key\_source>_] [*-C* _<key\_cred\_cmd>_] |
| 11 |
\[*-s* _<server\_url>_] [*-u* _<username>_] [*-p* _<password>_] _<term>_ [_<term>_ ...] |
| 12 |
|
| 13 |
This tool has been tailored for use as *address-book-cmd* in *aerc-config*(5). |
| 14 |
|
| 15 |
# OPTIONS |
| 16 |
|
| 17 |
*-h*, *--help* |
| 18 |
show this help message and exit |
| 19 |
|
| 20 |
*-v*, *--verbose* |
| 21 |
Print debug info on stderr. |
| 22 |
|
| 23 |
*-l* _<limit>_, *--limit* _<limit>_ |
| 24 |
Maximum number of results returned by the server. If the server does not |
| 25 |
support limiting, this option will be disregarded. |
| 26 |
|
| 27 |
Default: _10_ |
| 28 |
|
| 29 |
*-c* _<file>_, *--config-file* _<file>_ |
| 30 |
INI configuration file from which to read the CardDAV URL endpoint. |
| 31 |
|
| 32 |
Default: _~/.config/aerc/accounts.conf_ |
| 33 |
|
| 34 |
*-S* _<section>_, *--config-section* _<section>_ |
| 35 |
INI configuration section where to find _<key\_source>_ and |
| 36 |
_<key\_cred\_cmd>_. By default the first section where _<key\_source>_ |
| 37 |
is found will be used. |
| 38 |
|
| 39 |
*-k* _<key\_source>_, *--config-key-source* _<key\_source>_ |
| 40 |
INI configuration key to lookup in _<section>_ from _<file>_. The value |
| 41 |
must respect the following format: |
| 42 |
|
| 43 |
https?://_<username>_[:_<password>_]@_<hostname>_/_<path/to/addressbook>_ |
| 44 |
|
| 45 |
Both _<username>_ and _<password>_ must be percent encoded. If |
| 46 |
_<password>_ is omitted, it can be provided via *--config-key-cred-cmd* |
| 47 |
or *--password*. |
| 48 |
|
| 49 |
Default: _carddav-source_ |
| 50 |
|
| 51 |
*-C* _<key\_cred\_cmd>_, *--config-key-cred-cmd* _<key\_cred\_cmd>_ |
| 52 |
INI configuration key to lookup in _<section>_ from _<file>_. The value |
| 53 |
is a command that will be executed with *sh -c* to determine |
| 54 |
_<password>_ if it is not present in _<key\_source>_. |
| 55 |
|
| 56 |
Default: _carddav-source-cred-cmd_ |
| 57 |
|
| 58 |
*-s* _<server_url>_, *--server-url* _<server_url>_ |
| 59 |
CardDAV server URL endpoint. Overrides configuration file. |
| 60 |
|
| 61 |
*-u* _<username>_, *--username* _<username>_ |
| 62 |
Username to authenticate on the server. Overrides configuration file. |
| 63 |
|
| 64 |
*-p* _<password>_, *--password* _<password>_ |
| 65 |
Password for the specified user. Overrides configuration file. |
| 66 |
|
| 67 |
# POSITIONAL ARGUMENTS |
| 68 |
|
| 69 |
_<term>_ |
| 70 |
Search term. Will be used to search contacts from their FN (formatted |
| 71 |
name), EMAIL, NICKNAME, ORG (company) and TITLE fields. |
| 72 |
|
| 73 |
# EXAMPLES |
| 74 |
|
| 75 |
These are excerpts of _~/.config/aerc/accounts.conf_. |
| 76 |
|
| 77 |
## Fastmail |
| 78 |
|
| 79 |
``` |
| 80 |
[fastmail] |
| 81 |
carddav-source = https://janedoe%[email protected]/dav/addressbooks/user/[email protected]/Default |
| 82 |
carddav-source-cred-cmd = pass fastmail.com/janedoe |
| 83 |
address-book-cmd = carddav-query -S fastmail %s |
| 84 |
``` |
| 85 |
|
| 86 |
## Gmail |
| 87 |
|
| 88 |
``` |
| 89 |
[gmail] |
| 90 |
carddav-source = https://johndoe%[email protected]/carddav/v1/principals/[email protected]/lists/default |
| 91 |
carddav-source-cred-cmd = pass gmail.com/johndoe |
| 92 |
address-book-cmd = carddav-query -S gmail %s |
| 93 |
``` |
| 94 |
|
| 95 |
# SEE ALSO |
| 96 |
|
| 97 |
*aerc-config*(5) |
| 98 |
|
| 99 |
# AUTHORS |
| 100 |
|
| 101 |
Originally created by Drew DeVault and maintained by Robin Jarry who is assisted |
| 102 |
by other open source contributors. For more information about aerc development, |
| 103 |
see _https://sr.ht/~rjarry/aerc/_. |