--- a/docs/man/dav.1.man Sun Jul 01 16:45:03 2018 +0200 +++ b/docs/man/dav.1.man Sun Jul 01 17:14:17 2018 +0200 @@ -12,151 +12,245 @@ .PP TODO .SH COMMANDS -.PP -list [\f[B]\-altdepcR\f[]] [\f[B]\-u\f[] \f[I]date\f[]] \f[I]url\f[] -.PP -get [\f[B]\-pcRK\f[]] [\f[B]\-o\f[] \f[I]file\f[]] [\f[B]\-u\f[] -\f[I]date\f[]] \f[I]url\f[] -.PP -put [\f[B]\-pcR\f[]] [\f[B]\-k\f[] \f[I]key\f[]] [\f[B]\-L\f[] -\f[I]lock\f[]] \f[I]url\f[] \f[I]file\f[] +.TP +.B list [\f[B]\-altdepcR\f[]] [\f[B]\-u\f[] \f[I]date\f[]] \f[I]url\f[] +Lists the files at \f[I]url\f[]. +.RS +.RE +.TP +.B get [\f[B]\-pcRK\f[]] [\f[B]\-o\f[] \f[I]file\f[]] [\f[B]\-u\f[] \f[I]date\f[]] \f[I]url\f[] +Downloads a resource from \f[I]url\f[]. +.RS +.RE +.TP +.B put [\f[B]\-pcR\f[]] [\f[B]\-k\f[] \f[I]key\f[]] [\f[B]\-L\f[] \f[I]lock\f[]] \f[I]url\f[] \f[I]file\f[] +Uploads a resource to \f[I]url\f[]. +.RS +.RE +.TP +.B mkdir [\f[B]\-pc\f[]] [\f[B]\-k\f[] \f[I]key\f[]] [\f[B]\-L\f[] \f[I]lock\f[]] \f[I]url\f[] +Creates a new collection at \f[I]url\f[]. +.RS +.RE +.TP +.B remove [\f[B]\-pc\f[]] [\f[B]\-L\f[] \f[I]lock\f[]] \f[I]url\f[] +Deletes a resource or collection at \f[I]url\f[] +.RS +.RE +.TP +.B copy [\f[B]\-pcO\f[]] [\f[B]\-L\f[] \f[I]lock\f[]] \f[I]srcurl\f[] \f[I]desturl\f[] +Copies a resource or collection from \f[I]srcurl\f[] to +\f[I]desturl\f[]. +.RS +.RE +.TP +.B move [\f[B]\-pcO\f[]] [\f[B]\-L\f[] \f[I]lock\f[]] \f[I]srcurl\f[] \f[I]desturl\f[] +Moves a resource or collection from \f[I]srcurl\f[] to \f[I]desturl\f[]. +.RS +.RE +.TP +.B export [\f[B]\-pc\f[]] [\f[B]\-o\f[] \f[I]file\f[]] [\f[B]\-u\f[] \f[I]date\f[]] \f[I]url\f[] +Exports a resource or collection to a \f[B]tar(5)\f[] archive. +By default the data is written to \f[I]stdout\f[], but you may specify a +\f[I]file\f[] with the \f[B]\-o\f[] option. +.RS +.RE +.TP +.B import [\f[B]\-pc\f[]] [\f[B]\-k\f[] \f[I]key\f[]] [\f[B]\-L\f[] \f[I]lock\f[]] \f[I]url\f[] \f[I]file\f[] +Uploads and extracts the contents of the \f[B]tar(5)\f[] archive +\f[I]file\f[] to \f[I]url\f[]. +.RS +.RE +.TP +.B get\-property [\f[B]\-pcx\f[]] [\f[B]\-n\f[] \f[I]uri\f[]] \f[I]url\f[] \f[I]property\f[] +Gets a specific resource property. +Every WebDAV property has a name and an XML namespace. +A namespace can be specified with the \f[B]\-n\f[] option or with a +prefixed name. +The prefix and property name are separated by a colon \f[I]:\f[] as +usual. +.RS .PP -mkdir [\f[B]\-pc\f[]] [\f[B]\-k\f[] \f[I]key\f[]] [\f[B]\-L\f[] -\f[I]lock\f[]] \f[I]url\f[] -.PP -remove [\f[B]\-pc\f[]] [\f[B]\-L\f[] \f[I]lock\f[]] \f[I]url\f[] -.PP -copy [\f[B]\-pcO\f[]] [\f[B]\-L\f[] \f[I]lock\f[]] \f[I]srcurl\f[] -\f[I]desturl\f[] -.PP -move [\f[B]\-pcO\f[]] [\f[B]\-L\f[] \f[I]lock\f[]] \f[I]srcurl\f[] -\f[I]desturl\f[] +If the \f[B]\-x\f[] option is specified, a valid XML document containing +the value is printed on \f[I]stdout\f[]. .PP -export [\f[B]\-pc\f[]] [\f[B]\-o\f[] \f[I]file\f[]] [\f[B]\-u\f[] -\f[I]date\f[]] \f[I]url\f[] -.PP -import [\f[B]\-pc\f[]] [\f[B]\-k\f[] \f[I]key\f[]] [\f[B]\-L\f[] -\f[I]lock\f[]] \f[I]url\f[] \f[I]file\f[] -.PP -get\-property [\f[B]\-pcx\f[]] [\f[B]\-n\f[] \f[I]uri\f[]] \f[I]url\f[] -\f[I]property\f[] -.PP -set\-property [\f[B]\-pcx\f[]] [\f[B]\-L\f[] \f[I]lock\f[]] -[\f[B]\-n\f[] \f[I]uri\f[]] \f[I]url\f[] \f[I]property\f[] -[\f[I]value\f[]] -.PP -remove\-property [\f[B]\-pc\f[]] [\f[B]\-n\f[] \f[I]uri\f[]] -\f[I]url\f[] \f[I]property\f[] -.PP -lock [\f[B]\-pc\f[]] [\f[B]\-T\f[] \f[I]timeout\f[]] \f[I]url\f[] -.PP -unlock [\f[B]\-pc\f[]] [\f[B]\-L\f[] \f[I]lock\f[]] \f[I]url\f[] -.PP -info [\f[B]\-pc\f[]] \f[I]url\f[] -.PP -date [\f[I]url\f[]] +If the property contains XML data and the \f[B]\-x\f[] option is not +specified, the value is printed on \f[I]stderr\f[] in an XML\-like +format. +.RE +.TP +.B set\-property [\f[B]\-pcx\f[]] [\f[B]\-L\f[] \f[I]lock\f[]] [\f[B]\-n\f[] \f[I]uri\f[]] \f[I]url\f[] \f[I]property\f[] [\f[I]value\f[]] +Sets a resource property to the specified value. +See \f[B]get\-property\f[] for details. +If no \f[I]value\f[] is specified, it is read from \f[I]stdin\f[]. +.RS +.RE +.TP +.B remove\-property [\f[B]\-pc\f[]] [\f[B]\-n\f[] \f[I]uri\f[]] \f[I]url\f[] \f[I]property\f[] +Removes a resource property. +.RS +.RE +.TP +.B lock [\f[B]\-pc\f[]] [\f[B]\-T\f[] \f[I]timeout\f[]] \f[I]url\f[] +Creates a lock on the resource at \f[I]url\f[]. +The lock is an exclusive write lock with infinite depth. +If the resource is sucessfully locked, a lock token for this resource is +printed to \f[I]stdout\f[]. +This lock token should be saved to unlock the resource eventually. +.RS +.RE +.TP +.B unlock [\f[B]\-pc\f[]] [\f[B]\-L\f[] \f[I]lock\f[]] \f[I]url\f[] +Unlocks the resource at \f[I]url\f[] with a lock token. +If \f[I]lock\f[] is not specified, the token is read from +\f[I]stdin\f[]. +.RS +.RE +.TP +.B info [\f[B]\-pc\f[]] \f[I]url\f[] +Prints some information and lists al properties for the resource at +\f[I]url\f[]. +.RS +.RE +.TP +.B date [\f[I]url\f[]] +Gets the time from the server providing the resource denoted by +\f[I]url\f[]. +If \f[I]url\f[] is not specified, this command prints the local time. +This command is useful, if the server clock and the local clock are not +in sync. +.RS +.RE +.SH CONFIGURATION COMMANDS +.TP +.B add\-repository +This command runs an interactive assistant that creates a repository +configuration. +.RS +.RE +.TP +.B remove\-repository \f[I]name\f[] +Removes the repository with the specified \f[I]name\f[] from the +configuration. +.RS +.RE +.TP +.B list\-repositories +Lists all currently configured repositories. +.RS +.RE +.TP +.B check\-config +Validates the \f[B]$HOME/.dav/config.xml\f[] configuration file. +.RS +.RE .SH GENERAL OPTIONS .PP The following options can be used with all commands. .TP -.B \f[B]\-i\f[] +.B \-i Disable cert verification. .RS .RE .TP -.B \f[B]\-N\f[] +.B \-N Disable authentication prompt. .RS .RE .TP -.B \f[B]\-v\f[] +.B \-v Verbose output. .RS .RE .SH COMMAND OPTIONS .TP -.B \f[B]\-a\f[] +.B \-a Show all files. .RS .RE .TP -.B \f[B]\-c\f[] +.B \-c Enable full encryption. .RS .RE .TP -.B \f[B]\-d\f[] +.B \-d Order by last modified date. .RS .RE .TP -.B \f[B]\-e\f[] +.B \-e Show extended flags. .RS .RE .TP -.B \f[B]\-K\f[] +.B \-K Keep already present files. .RS .RE .TP -.B \f[B]\-k\f[] \f[I]key\f[] +.B \-k \f[I]key\f[] Key to use for encryption. .RS .RE .TP -.B \f[B]\-l\f[] +.B \-l Print resources in long list format. .RS .RE .TP -.B \f[B]\-L\f[] \f[I]lock\f[] +.B \-L \f[I]lock\f[] Specificy lock token. .RS .RE .TP -.B \f[B]\-n\f[] \f[I]uri\f[] +.B \-n \f[I]uri\f[] Specify namespace \f[I]uri\f[]. +There are two namespaces configured by default. .RS +.IP "1." 3 +\f[I]D\f[] for the \f[I]DAV:\f[] namespace +.IP "2." 3 +\f[I]idav\f[] for the \f[I]http://davutils.org/\f[] namespace .RE .TP -.B \f[B]\-o\f[] \f[I]file\f[] +.B \-o \f[I]file\f[] Write output to \f[I]file\f[]. Use \[aq]\-\[aq] for stdout. .RS .RE .TP -.B \f[B]\-O\f[] +.B \-O Override resources. .RS .RE .TP -.B \f[B]\-p\f[] +.B \-p Don\[aq]t encrypt or decrypt files. .RS .RE .TP -.B \f[B]\-R\f[] +.B \-R Recursively do the operation for all children. .RS .RE .TP -.B \f[B]\-t\f[] +.B \-t Print content type. .RS .RE .TP -.B \f[B]\-T\f[] \f[I]sec\f[] +.B \-T \f[I]sec\f[] Timeout in seconds. .RS .RE .TP -.B \f[B]\-u\f[] \f[I]date\f[] +.B \-u \f[I]date\f[] Get resources which are modified since the specified \f[I]date\f[]. .RS .RE .TP -.B \f[B]\-x\f[] +.B \-x XML property content. .RS .RE