mcds(1)

NAME
mcds - mutt carddav query

SYNOPSIS
mcds [-h] [-q -n|t|e] [-s -a|t|e] [-u URL] [-V] [-v] term

DESCRIPTION
The mcds utility queries a carddav server for the requested information. It's primary function is to provide a query command for mutt against a carddav server.

The following options are available:

-h  Display a short help message and exit.

-q n|t|e
    The term to query against. Known terms are:
    1.  n Query for the full-name field. This is the default.
    2.  t Query for the telephone field.
    3.  e Query for the email field.

-s a|t|e
    The search term to return. Known terms are:
    1.  a Query for the address field.
    2.  t Query for the telephone field.
    3.  e Query for the email field. This is the default.

-u URL
    The carddav URL.

-V  Display the version number and exit.

-v  Verbose mode. Causes mcds to print debugging messages about its progress.

By default if you are connecting over SSL mcds will not verify the certificates and will use Basic Authentication using the username and password provided in your ~/.netrc file.

The configuration file ~/.mcdsrc will be read if it exists, however command line arguments will override any values in the configuration file. The configuration file is of the key, value pairs form on a line separated by an equals sign. The only known keys are url, verify, netrc. An example ~/.mcdsrc is provided in the EXAMPLES section.

EXIT STATUS

EXAMPLES
To query a DAViCal carddav server at the URL https://localhost/caldav.php/username/addressbook/ for the email addresses corresponding to Ben:
    mcds -u https://localhost/caldav.php/username/addressbook/ Ben
Which could return a list of people and email addresses as

    ben@example.net        Ben Smith

One can therefore use mcds as a mutt query program by specifying the following in your ~/.muttrc file.

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

To make this query more succinct one can specify in ~/.mcdsrc the following:

    url = https://localhost/caldav.php/username/addressbook/
    verify = no
    netrc = yes

So making the mutt query command simply

    set query_command="mcds '%s'"

SEE ALSO
curl(1), mutt(1), muttrc(5), netrc(5).

STANDARDS
The mcds command is expected to be p1003.2 compatible.

AUTHOR
Written by Timothy Brown.

REPORTING BUGS
Report bugs to <tbrown@freeshell.org>