MCDS(1)

πŸ“¦
version 1.10 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu stonking

πŸ’– MCDS(1) β€” the mutt CardDAV query bestie πŸ’–

okay so this is a page from the General Commands Manual, and it's all about a lil utility called mcds. Grab a snack, we're doing this. πŸ“


✨ NAME ✨

mcds β€” mutt CardDAV query πŸ¦‹


🌸 SYNOPSIS 🌸

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

πŸ’… DESCRIPTION πŸ’…

The mcds utility queries a CardDAV server for whatever info you're asking for. Its main character job is being the address query command for mutt(1). That's the whole vibe. πŸ‘‘

The options are as follows:

  • -c config_file β€” tells it to use a different config file. The default one is ~/.mcdsrc. (Like, the og one. ✨)
  • -h β€” prints help text to standard output and then exits. bye bestie 🫢
  • -p β€” prompts you for a password. yes, like that.
  • -q a | e | n | t β€” the term you're querying against. The known terms are:
    • a β€” query for the address field.
    • e β€” query for the email field. This is the default. ⭐
    • n β€” query for the full-name field.
    • t β€” query for the telephone field.
  • -S β€” saves the password. πŸ’Ύ
  • -s a | e | n | t β€” the search term you want returned. The known terms are:
    • a β€” query for the address field.
    • e β€” query for the email field. This is the default. ⭐
    • n β€” query for the full-name field.
    • t β€” query for the telephone field.
  • -u URL β€” the URL of the CardDAV server. πŸ”—
  • -V β€” prints the version number and license info of mcds to standard output, then exits. πŸ’œ
  • -v β€” turns on verbose mode. This forces mcds to print debugging messages about its progress. so chatty, love that for it πŸ—£οΈ

πŸŽ€ FILES πŸŽ€

  • ~/.mcdsrc β€” the configuration file. It's used to set default values for mcds, but command-line arguments can override it. It's formatted as a list of β€œkey = value” pairs separated by newlines.

The keys are as follows:

  • url = URL β€” the URL of the CardDAV server. πŸ”—
  • verify = [yes | no] β€” verify the server certificate if you're connecting over HTTPS. Disabled by default. ⚠️
  • netrc = [yes | no] β€” enables reading the ~/.netrc file. Disabled by default. ⚠️
  • username = USERNAME β€” the username to log in to the CardDAV server with. Heads up: if a username is specified, mcds will not use the ~/.netrc file. 🚫
  • password_file = password.gpg β€” the GPG encrypted file containing the password for the CardDAV server. πŸ”
  • libsecret = [yes | no] β€” use the library β€œlibsecret” to store and retrieve the password. πŸ—οΈ
  • ~/.netrc β€” used to grab your username and password when authenticating with the CardDAV server, if you haven't specified your username and password file in ~/.mcdsrc. 🧚

🌈 EXIT STATUS 🌈

The mcds utility exits 0 on success, and >0 if an error occurs. simple as that, no cap πŸ’€


πŸ‘‘ 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:

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

Now the query command can be shortened to:

set query_command="mcds '%s'"

When compiled against libsecret and after enabling libsecret in the configuration file, mcds can save passwords provided at the password prompt. To set, replace or clear the password, run

mcds -pS

πŸ¦‹ SEE ALSO πŸ¦‹

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


πŸ’œ AUTHORS πŸ’œ

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


and that's the whole page, bestie!! this one shipped from <strong>Debian</strong> on <strong>November 5, 2024</strong> β€” ty for reading, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from