'\" t .\" Title: pc_query .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 01/31/2014 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" .TH "PC_QUERY" "1" "01/31/2014" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" pc_query \- query the local address book .SH "SYNOPSIS" .sp \fBpc_query\fR [\fIOPTIONS\fR] [SEARCHSTRING] .SH "DESCRIPTION" .sp pc_query(1) prints contacts from a local address book, synchronized with remote CardDAV resources with pycardsyncer(1)\&. Contact information is kept in the \fIvCard\fR format, one set of information, corresponding to a business card, is therefore often referred to as a \fIcard\fR\&. pc_query(1) can also import and export vcards from/to the database\&. pc_query(1) is part of the \fIpycarddav\fR package\&. .SH "OPTIONS" .SS "BASIC STARTUP OPTIONS" .PP \fB\-a, \-\-account\fR=\fINAME\fR .RS 4 Only use the account/resource \fINAME\fR (this option can be used more than once)\&. .RE .PP \fB\-c, \-\-config\fR=\fICONFIG\fR .RS 4 Use the configuration file \fICONFIG\fR, otherwise pc_query(1) will look in \fI$HOME/\&.pycard/\fR and \fI$HOME/\&.config/pycard/\fR for files named \fIpycard\&.conf\fR\&. .RE .PP \fB\-\-debug\fR .RS 4 This option enables debugging output\&. .RE .PP \fB\-h, \-\-help\fR .RS 4 Print a small help text and exit\&. .RE .PP \fB\-v, \-\-version\fR .RS 4 Print pc_query\(cqs version number and exit\&. .RE .SS "PRINTING OPTIONS" .sp These options can only be used with \fISEARCHSTRING\fR and determine the output format of pc_query(1)\&. Without any options pc_query(1) will print the name, telephone numbers and email addresses of all matching contact cards\&. .PP \fB\-A\fR .RS 4 Prints the whole card\&. .RE .PP \fB\-m\fR .RS 4 Only prints names and email addresses, in a mutt friendly format (one line per email address)\&. .RE .PP \fB\-t\fR .RS 4 Only prints names and telephone numbers, analogue to \-m (but in different sequence) .RE .SS "FILE INPUT AND OUTPUT OPTIONS" .PP \fB\-b, \-\-backup\fR\fI=\*(AqFILE\fR .RS 4 Backup the local db to BACKUP, if a SEARCHSTRING is present, only backup cards matching it\&. .RE .PP \fB\-\-delete\fR .RS 4 Delete card matching \fISEARCHSTRING\fR, if more than one matches, the user has to choose one card in an interactive user interface\&. .RE .PP \fB\-i, \-\-import\fR=\fIFILE\fR .RS 4 Import vCard from FILE or \fISTDIN\fR into the first specified (or default) account .RE .SS "OTHER OPTIONS" .PP \fB\-\-where\fR=\fIMODE\fR .RS 4 Decides which part of the contact cards are matched against the searchterm\&. \fIMODE\fR is one of \fIvcard\fR, \fIname\fR (the structured name, as used in the vcard specification), \fIfname\fR (the formated name, meaning as is printed by pc_query) and \fIallnames\fR (\fIallnames\fR means search \fIfname\fR as well as \fIname\fR)\&. While only search through the names might not find what you are looking for, it will considerably speed up your query\&. .RE .SH "AUTHOR" .sp pc_query was mostly written by Christian Geier, with a lot of help by others, see \fICONTRIBUTORS\&.txt\fR in the pycarddav distribution\&. .SH "RESOURCES" .sp Main web site: http://lostpackets\&.de/pycarddav/ Please report bugs via the contact information at the above web site or via github: http://github\&.com/geier/khal/\&. .SH "SEE ALSO" .sp pycardsyncer(1), pycard\-import(1) .SH "COPYING" .sp Copyright (C) 2011\-2013 Christian Geier and Contributors\&. pc_query and pycarddav are released under the terms of the Expat/MIT license, see the \fICOPYING\fR file distributed with pycarddav\&.