more dav documentation

Sun, 03 Jun 2018 14:40:07 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 03 Jun 2018 14:40:07 +0200
changeset 408
f71eab18ed38
parent 407
9505224d2fd2
child 409
90a6d6952d83

more dav documentation

documents -x option for set/get-property
adds documentation for new commands

docs/src/add-tag.md file | annotate | diff | comparison | revisions
docs/src/export.md file | annotate | diff | comparison | revisions
docs/src/get-property.md file | annotate | diff | comparison | revisions
docs/src/import.md file | annotate | diff | comparison | revisions
docs/src/list-tags.md file | annotate | diff | comparison | revisions
docs/src/remove-repository.md file | annotate | diff | comparison | revisions
docs/src/remove-tag.md file | annotate | diff | comparison | revisions
docs/src/set-property.md file | annotate | diff | comparison | revisions
docs/src/set-tags.md file | annotate | diff | comparison | revisions
--- /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 <file>] [-u <date>] <url>`**
+
+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 <file>`** specify the local output file. A **-** indicates stdout
+
+**`-u <date>`** 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/
+
--- 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 <uri>] <url> <property>`**
+**`dav get-property [-pcx] [-n <uri>] <url> <property>`**
 
 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 <uri>`** specify property namespace
 
 **Note:** Properties are never encrypted.
 
+### Example: xml property
+
+	$ dav get-property -x myserv/collection/ resourcetype
+	<?xml version="1.0"?>
+	<x0:resourcetype xmlns:x0="DAV:"><x0:collection /></x0:resourcetype>
+
 [1]: ./configuration.html
--- /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 <key>] [-L <lock>] <url> <file>`**
+
+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 <key>`** use the specified key for encryption. The key must be configured in
+  the config.xml file
+
+**`-L <lock>`** 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
+
--- /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 <reponame>`**
+
+This command removes a repository from the config.xml file.
+
+**Command alias:** remove-repo, rm-repo
--- 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 <lock>`** use a lock token. See [dav lock][1]
 
 **`-n <uri>`** specify property namespace

mercurial