# HG changeset patch # User Olaf Wintermann # Date 1528029607 -7200 # Node ID f71eab18ed38e6e262d1bc73894de39d42d92ab9 # Parent 9505224d2fd28a46648ed65ac6618b46814026a9 more dav documentation documents -x option for set/get-property adds documentation for new commands diff -r 9505224d2fd2 -r f71eab18ed38 docs/src/add-tag.md diff -r 9505224d2fd2 -r f71eab18ed38 docs/src/export.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/src/export.md Sun Jun 03 14:40:07 2018 +0200 @@ -0,0 +1,27 @@ +--- +title: 'dav export' +--- + +**`dav export [-pc] [-o ] [-u ] `** + +Downloads a resource or a collection with all child resources, and writes the contents to an archive file. The Output is written to stdout, unless the **`-o`** option is used. + +Currently the only available archive format is the ustar format. + +These archive files can be uploaded to an collection with the [dav import][1] command. + +**`-p`** disable file name and content decryption. You get exactly what is stored + on the server. + +**`-c`** enable file name and content decryption + +**`-o `** specify the local output file. A **-** indicates stdout + +**`-u `** download only files which are modified since the specified date. Uses the HTTP date format + +[1]: ./import.html + +### Example: create tar file from collection + + $ dav export -o collection.tar myserv/col/ + diff -r 9505224d2fd2 -r f71eab18ed38 docs/src/get-property.md --- a/docs/src/get-property.md Sun Jun 03 12:03:04 2018 +0200 +++ b/docs/src/get-property.md Sun Jun 03 14:40:07 2018 +0200 @@ -2,10 +2,14 @@ title: 'dav get-property' --- -**`dav get-property [-pc] [-n ] `** +**`dav get-property [-pcx] [-n ] `** Gets a specific resource property. Every WebDAV property has a name and an XML namespace. A namespace can be specified with the `-n` option or with a prefixed name. The prefix and property name are separated by a **:** as usual. +If the **`-x`** option is specified, a valid xml document containing the value is printed on stdout. + +If the property contains xml data and the **`-x`** option is not specified, the value is printed on stderr in an xml-like format. + Example: `D:creationdate` `D` is the prefix, `creationdate` is the name. @@ -23,8 +27,16 @@ **`-c`** enable file name and path decryption +**`-x`** prints property as xml + **`-n `** specify property namespace **Note:** Properties are never encrypted. +### Example: xml property + + $ dav get-property -x myserv/collection/ resourcetype + + + [1]: ./configuration.html diff -r 9505224d2fd2 -r f71eab18ed38 docs/src/import.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/src/import.md Sun Jun 03 14:40:07 2018 +0200 @@ -0,0 +1,37 @@ +--- +title: 'dav import' +--- + +**`dav import [-pc] [-k ] [-L ] `** + +Uploads the content of an archive file to a collection. If the url points to a non-existing collection, the collection is created. + +Currently the only available archive format is the ustar format. You can use tools like *tar* or the [dav export][1] command to create such archives. + +**`-p`** disable file name encryption and decryption + +**`-c`** enable file name and content encryption + +**`-R`** upload directory + +**`-k `** use the specified key for encryption. The key must be configured in + the config.xml file + +**`-L `** use a lock token. See [dav lock][2] + +[1]: ./export.html +[2]: ./lock.html + +### Example: create tar archive with GNU tar and import it to a collection + + $ tar cvf archive.tar --format=ustar mydir + mydir/ + mydir/file.txt + mydir/otherfile + mydir/newfile + $ dav import myserv/col/ archive.tar + mkcol: mydir/ + mydir: SRC/file.txt + mydir: SRC/otherfile + mydir: SRC/newfile + diff -r 9505224d2fd2 -r f71eab18ed38 docs/src/list-tags.md diff -r 9505224d2fd2 -r f71eab18ed38 docs/src/remove-repository.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/src/remove-repository.md Sun Jun 03 14:40:07 2018 +0200 @@ -0,0 +1,9 @@ +--- +title: 'dav remove-repository' +--- + +**`dav remove-repository `** + +This command removes a repository from the config.xml file. + +**Command alias:** remove-repo, rm-repo diff -r 9505224d2fd2 -r f71eab18ed38 docs/src/remove-tag.md diff -r 9505224d2fd2 -r f71eab18ed38 docs/src/set-property.md --- a/docs/src/set-property.md Sun Jun 03 12:03:04 2018 +0200 +++ b/docs/src/set-property.md Sun Jun 03 14:40:07 2018 +0200 @@ -8,6 +8,8 @@ *property* is a property name with or without prefix (see [get-property][1] for details). +To store an xml value, use the **`-x`** option. The specified value must be a valid xml document. All nodes below the root element are stored as the property value. + [1]: ./get-property.html If no value is specified, the content for the property is read from stdin. @@ -16,6 +18,8 @@ **`-c`** enable file name and path decryption +**`-x`** store an xml value + **`-L `** use a lock token. See [dav lock][1] **`-n `** specify property namespace diff -r 9505224d2fd2 -r f71eab18ed38 docs/src/set-tags.md