Scroll to navigation

MCDS(1) General Commands Manual MCDS(1)

NAME

mcdsmutt CardDAV query

SYNOPSIS

mcds [-c config_file] [-hVv] [-q a | e | n | t] [-s a | e | n | t] [-u URL] term

DESCRIPTION

The mcds utility queries a CardDAV server for requested information. It's primary function is to provide an address query command for mutt(1).

The options are as follows:

config_file
Specifies an alternative configuration file. The default file is ~/.mcdsrc.
Print help text to standard output and exit.
a | | |
The term to query against. Known terms are:
Query for the address field.
Query for the email field. This is the default.
Query for the full-name field.
Query for the telephone field.
a | | |
The search term to return. Known terms are:
Query for the address field.
Query for the email field. This is the default.
Query for the full-name field.
Query for the telephone field.
URL
The URL of the CardDAV server.
Print the version number and license information of mcds to standard output and exit.
Enable verbose mode. Forces mcds to print debugging messages about its progress.

FILES

~/.mcdsrc
Configuration file. Used to set default values for mcds, but can be overridden with command-line arguments. Formatted as a list of “key = value” pairs separated by newlines.

The keys are as follows:

= URL
The URL of the CardDAV server.
= [yes | no]
Verify server certificate if connecting over HTTPS. Disabled by default.
= [yes | no]
Enable reading the ~/.netrc file. Disabled by default.
= USERNAME
The username to login to the CardDAV server with. If a username is specified mcds will not use the ~/.netrc file.
= password.gpg
The GPG encrypted file containg the password for the CardDAV server.
~/.netrc
Used to access your username and password when authenticating with the CardDAV server, if you have not specified your username and password file in ~/.mcdsrc.

EXIT STATUS

The mcds utility exits 0 on success, and >0 if an error occurs.

EXAMPLES

Query a CardDAV server for email addresses corresponding to “Ben”:

$ mcds -u https://localhost/caldav.php/username/addressbook/ Ben
ben@example.net        Ben Smith
...

To use mcds with mutt, add the following to your muttrc(5):

set query_command="mcds -u https://localhost/caldav.php/username/addressbook/ '%s'"

This query can be simplified by putting the relevant values in ~/.mcdsrc:

Now the query command can be shortened to:

set query_command="mcds '%s'"

SEE ALSO

curl(1), gpg2(1), mutt(1), muttrc(5), netrc(5)

AUTHORS

The mcds utility is maintained by Timothy Brown <tbrown@freeshell.org>

March 4, 2014 Linux 5.14.21-150500.55.52-default