# HG changeset patch # User Olaf Wintermann # Date 1499798732 -7200 # Node ID 8c44c59196919394b9b192ee7d8bccf63cf8a882 # Parent ee9e63c437c49d850fa61b2ab172a80f96583d7c more documentation diff -r ee9e63c437c4 -r 8c44c5919691 .hgignore --- a/.hgignore Sun Jul 09 20:15:14 2017 +0200 +++ b/.hgignore Tue Jul 11 20:45:32 2017 +0200 @@ -1,6 +1,7 @@ syntax:regexp ^nbproject/.*$ ^build/.*$ +^docs/src/build/.*$ core$ ^.c?project$ ^.settings/.*$ diff -r ee9e63c437c4 -r 8c44c5919691 docs/config.xsd --- a/docs/config.xsd Sun Jul 09 20:15:14 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/add-repository.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/add-repository.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,57 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+ +
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/check-config.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/check-config.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,57 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+ +
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/commands.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/commands.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,80 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

Commands

+

Overview

+

List resources:

+
dav list <url>
+

Download resource:

+
dav get <url>
+

Download all resources from a collection:

+
dav get -R <url>
+

Upload a file:

+
dav put <url> <file>
+

Upload all files from a directory:

+
dav put -R <url> <dir>
+

Duplicate a resource or a collection on a server:

+
dav copy <src-url> <dst-url>
+

There is also a move operation similar to copy:

+
dav move <src-url> <dst-url>
+

These are the most common commands. There are also more commands for webdav locking and manipulating webdav properties.

+

Common options

+

-N disable any authentication prompt. If authentication is required, dav will abort.

+

-i disable TLS certificate verification

+

-v enable verbose output. Internally CURLOPT_VERBOSE is set to 1 and verbose output is printed on stderr.

+

Most commands have the -p and -c options for enabling or disabling encryption. If encryption is not configured for a repository, but the -c option is specified, encryption/decryption is enabled. When enabled, all commands handle encrypted resource names. The -p options disables any encryption/decryption. See encryption for details.

+

Aliases

+

Some commands have alternate names. For example dav ls is the same as dav list.

+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/configuration.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/configuration.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,161 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

Configuration

+

The main configuration file for dav is $HOME/.dav/config.xml and is used for configuring repositories, proxies and encryption keys. This configuration is also used by dav-sync. The file is created automaticaly if it doesn't exist.

+

The config.xml file is an XML file with <configuration> as root element. The <configuration> element can have the following child elements: <repository>, <http-proxy>, <https-proxy>, <key>

+

repository

+

This element is used to configure a repository. A repository must have a unique name to identify the repository and a url pointing to the root collection for this repository.

+

Required child elements: <name>, <url>
+Optional elements: <user>, <password>, <default-key>, <full-encryption>, <content-encryption>, <decrypt-content>, <decrypt-name>, <cert>, <verification>, <ssl-version>, <authmethods>

+

name

+

Unique repository identifer.

+

Type: string
+Example: <name>myrepo</name>

+

url

+

The url must point to a valid WebDAV compilant collection.

+

Type: string
+Example: <url>https://example.com/webdav/repo1/</url>

+

user

+

User used for authentication

+

Type: string
+Example: <user>alice</user>

+

password

+

A base64 encoded password used for authentication.

+

Type: base64 string
+Example: <password>MTIzNDU2Nzg=</password>

+

default-key

+

Identifer of the key used by default for encryption. There must be a configured key with this name.

+

Type: string
+Example: <key>mykey</key>

+

full-encryption

+

If this element has the value of true, content and resource name encryption/decryption is enabled. Because encryption and decryption is disabled by default, false has no effect for this element.

+

Type: boolean
+Default: false
+Example: `true

+

content-encryption

+

This element enables only content encryption and decryption. A value of false disables content encryption, but it does not disables content decryption, if this is enabled with <decrypt-content>.

+

Type: boolean
+Default: false
+Example: <content-encryption>true</content-encryption>

+

decrypt-content

+

Controls only the decryption of content. If true content is decrypted.

+

Type: boolean
+Default false
+Example: <decrypt-content>true</decrypt-content>

+

decrypt-name

+

Controls only the decryption of resource names. If true resource names are decrypted. This effects path to url resolution.

+

Type: boolean
+Default: false
+Example: <decrypt-name>true</decrypt-name>

+

cert

+

Path to a file containing certificates to verify the TLS connection to the server.

+

Type: string
+Example: <cert>/etc/certs/cabundle.pem</cert>

+

Note: This element does the same as curl's --cacert option.

+

verification

+

This element can disable TLS certificate verification.

+

Type: boolean
+Default: true
+Example: <verification>false</verification>

+

ssl-version

+

Specifies the SSL version to attempt to use. The value must be one of this strings: TLSv1, TLSv1.0, TLSv1.1, TLSv1.2, SSLv2, SSLv3

+

Type: ssl version enum
+Example: <ssl-version>TLSv1.2</ssl-version>

+

authmethods

+

Controls which http authentication methods are used. Multiple methods can be used. The value must be one or more authentication methods separated by space. Valid authentication methods are: basic, digest, negotiate, ntlm, any, none

+

Type: list of authmethod

+

Default: basic
+Example: <authmethods>basic digest</authmethods>

+

key

+

The <key> element configures a key used for encryption. A key must have a unique name, which is stored in the properties of encrypted resources. To decrypt resources, dav looks for configured keys with this name, therefore the name of the key should never changed and must be the same on all hosts accessing the same repository.

+

Required child elements: <name>, <file>
+Optional elements: <type>

+

name

+

Unique key identifer.

+

Type: string
+Example: <name>key1</name>

+

file

+

Path to the content of the key. The file should contain 32 (aes256) or 16 (aes128) bytes. If value is not an absolut path, it must be relative to the dav config directory $HOME/.dav/.

+

Type: string
+Example: <path>keys/key1.bin</path>

+

type

+

Specifies the key type. Valid values are aes128 or aes256.

+

Type: aes type enum
+Default: aes256
+Example: <type>aes128</type>

+

http-proxy / https-proxy

+

Configuration for http and https proxies is the same. Both use the same elements, but https-proxy expects an https url.

+

Required child elements: <url>
+Optional elements: <user>, <password>, <no>

+

url

+

user

+

password

+

no

+

Example 1: minimal repository configuration

+

A minimal configuration for a repository. If no user and/or password are configured, dav prompts for authentication informations if required.

+
<repository>
+    <name>myrepo</name>
+    <url>https://example.com/path/to/repo/</url>
+</repository>
+

Example 2: repository with authentication informations

+

A typical configuration for easy accessing a repository without authentication prompt.

+
<repository>
+    <name>myrepo</name>
+    <url>https://example.com/path/to/repo/</url>
+    <user>alice</user>
+    <password>MTIzNDU2Nzg=</password>
+</repository>
+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/copy.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/copy.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,67 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

dav copy

+

copy [-pcO] [-L <lock>] <url1> <url2>

+

Creates a duplicate of the resource identified by url1 at the location url2. All resource properties are copied. Currently url1 and url2 must be the same host.

+

If url1 is a collection, all children are copied.

+

If url2 already exists, the command aborts, unless the -O option is specified.

+

The command uses a single WebDAV COPY request to duplicate the resources. It does not handle the dav encryption functionality, which means it does not modify url2 if encryption is enabled.

+

-p disable file name and path decryption if enabled. This applies only to url1

+

-c enable file name and path decryption This applies only to url1

+

-O override the destination resource

+

-L <lock> use a lock token. See dav lock

+

Command alias: cp

+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/date.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/date.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,67 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

dav date

+

date [url]

+

The purpose of this command is to get the current date from a server and print it on stdout (http date format). This in useful in combination with the -U option for the list and get command.

+

The url can be any http url. If no url is specified, the local time is used.

+

Example: incremental dav get

+

It is possible to download only resources, which are modified since a specified date. The date command allows you to easily store the date of the last get.

+
$ dav get -R myserv/col/
+...
+$ dav date myserv > last_get
+

After some resources are changed on the server, you can download only the modified files.

+
$ dav get -R -U `cat last_get` myserv/col/
+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/davdoc.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/davdoc.css Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,79 @@ +.header, h1, h2, h3, .sidebar { + font-family: sans-serif; +} + +div.header { + padding-top: 0.3em; + padding-bottom: 0.5em; + margin-bottom: 2em; + border: none; + border-bottom: 1px solid; + border-bottom-color: #2E2E2E; +} + +div.header span { + font-size: 2em; + font-weight: bold; + margin-left: 1em; +} + +div.header img { + float: right; +} + +div.sidebar { + float: left; + width: 15em; +} + +div.nav { + color: black; + background-color: #E9EBEC; + margin-bottom: 1em; + padding-bottom: 0.1em; +} + +div.nav h3 { + color: white; + background-color: #5B6F7A; + font-size: 1.2em; + padding-top: 0.2em; + padding-bottom: 0.2em; + padding-left: 0.5em; + margin-top: 0; +} + +div.nav ul { + margin-top: 0; + padding-top: 0; + font-size: 0.95em; +} + +div.content { + margin-left: 16em; + padding: 0; + font-family: serif; + font-size: 1em; + min-width: 16em; +} + +div.content h1 { + color: white; + background-color: #5B6F7A; + font-size: 1.2em; + padding-top: 0.2em; + padding-bottom: 0.2em; + padding-left: 0.5em; + padding-right: 0; + margin-top: 0; +} + +div.content h2 { + font-size: 1.2em; +} + +div.content h3 { + font-size: 1.05em; +} + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/encryption.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/encryption.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,57 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+ +
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/get-property.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/get-property.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,72 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

dav get-property

+

get-property [-pc] [-n <uri>] <url> <property>

+

Gets a specified 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. A prefix and property name are separated by an :

+

Example: D:creationdate

+

D is the prefix, creationdate is the name.

+

There are only two available prefixes:

+
    +
  1. D for the DAV: namespace
  2. +
  3. idav for http://davutils.org/
  4. +
+

To use an other namespace, use the -n option.

+

If the property name has no prefix, and no namespace is specified, the default namespace DAV: is used.

+

-p disable file name and path decryption if enabled

+

-c enable file name and path decryption

+

-n <uri> specify property namespace

+

Note: Properties are never encrypted.

+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/get.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/get.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,64 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

dav get

+

get [-pcR] [-o <file>] [-u <date>] <url>

+

Downloads a resource. It can also download collections and its child resources. When downloading a single resource, the default local file name is the resource name. When downloading collections, it does NOT create a local directory with the collection's name and places it children in there, but it downloads the children directly to the current working directory.

+

-p disable file name and content decryption. You get exactly what is stored on the server.

+

-c enable file name and content decryption

+

-R download a collection

+

-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

+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/getting-started.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/getting-started.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,84 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

Getting started

+

Test

+

After successful installation you can test dav with your WebDAV server.

+
dav list http://example.com/webdav/
+

This lists all child resources of the specified collection. If you are unfamiliar to WebDAV terminology this means basically listing all files in a directory, similar to the ls unix tool. Infact you can also write dav ls instead of dav list and there is also a -l option like ls has one.

+

Create a repository

+

All dav commands are expecting a url argument, but it may be a bit cumbersome to type a full url every time. But you can configure a repository in the dav configuration file ($HOME/.dav/config.xml) with the servers url, optional authentication information and other options. After that you can access a webdav server just with the repository name and an optional path.

+

So when you have created a repository with the name myserv and the url http://example.com/webdav/, you can just type

+
dav list myserv
+

You can add a path to the repository name to access an other url

+
dav list myserv/mycollection/
+

This lists the content of http://example.com/webdav/mycollection/

+

The easiest way to create a repository is with the add-repository command. This is a simple configuration assistant.

+
$ dav add-repository
+Each repository must have an unique name.
+name: myserv
+
+Specify the repository base url.
+url: http://example.com/webdav/
+
+User for HTTP authentication.
+user (optional): myuser
+password (optional): 
+
+
+Added repository: myserv (http://example.com/webdav/)
+

You can also configure the config.xml yourself, check out this example page and the config.xml spec.

+

More informations about urls and path in dav here.

+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/info.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/info.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,96 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

dav info

+

info [-pc] <url>

+

Prints some information and lists all properties for the resource specified by url.

+

Example 1: info of a collection

+

In this example myserv is a configured repository with the base url https://example.com/webdav/. Because col is not encrypted, the url is just the path appended to base url.

+
$ dav info myserv/col/
+name: col
+path: /col
+url:  https://example.com/webdav/col
+type: collection
+size: 28
+
+namespace: DAV:
+  creationdate: 2017-06-14T09:32:43Z
+  getetag: "1000-551e83bebc19c"
+  getlastmodified: Wed, 14 Jun 2017 09:32:43 GMT
+  supportedlock:
+

Example 2: encrypted resource

+

With encrypted resources, the path and url are different. The real resource name is random, but the name used by dav is stored in the crypto-name property.

+
$ dav info -c myserv/crres
+name: crres
+path: /crres
+url:  https://example.com/webdav/wsIwbLxuJQTGtgiMAD1KGeaY
+type: resource
+size: 48 bytes
+
+namespace: DAV:
+  creationdate: 2017-07-09T16:18:09Z
+  getcontentlength: 48
+  getetag: "30-553e4cfecd170"
+  getlastmodified: Sun, 09 Jul 2017 16:18:09 GMT
+  supportedlock: 
+
+namespace: http://apache.org/dav/props/
+  executable: F
+
+namespace: http://davutils.org/
+  crypto-hash: fm4zstp/FevTs1aoUXc3+mqTmAf2Go+zQ34rSp8/ixDlGLQJXR74Je+WMl1zxZKbS/+5VwDhyZ9pT3gInsq2SA==
+  crypto-key: mykey
+  crypto-name: ZU+lZtFi3dprBz44714plYwfRnhyI/apYq46Sk/B6QU=
+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/list-repositories.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/list-repositories.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,57 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+ +
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/list.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/list.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,84 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

dav list

+

dav list [-altepcR] [-u <date>] <url>

+

Lists child resources of the specified collection. Without any options it shows only the direct children and hides files beginning with a dot.

+

Options

+

-a don't hide files whose names begins with a dot .

+

-l show additional information for resources

+

Example:

+
--     4.2 KiB  Oct 11  2015  somefile
+

The first column contains to fields for flags.

+
    +
  1. Field: d- indicates a collection
  2. +
  3. Field: -c indicates an encrypted resource
  4. +
+

Also encrypted collections are possible, but only the collection name is encrypted, the content may be unencrypted.

+

The second column in the list -l output is the resource size. The number has always a suffix (bytes, KiB, MiB, GiB, TiB). To get the exact content-length in bytes you can use the dav info command.

+

The third column is the date of the last modification. The strftime format is %b %d %H:%M if the year is the same. Otherwise the format is %b %d %Y.

+

The last column is the resource name. If the -R option is specified, the resource path is shown.

+

-t this options only works in combination with -l and it adds the resource content type to the output (after the flags)

+

-e similar to -l, but with 6 flag fields. Currently only the first 4 fields are used. The last two are reserved for future use.

+
    +
  1. Field: l indicates a locked resource
  2. +
  3. Field: x indicates a executable resource (executable property with http://apache.org/dav/props/ namespace)
  4. +
+

-p disable file name and path decryption if enabled

+

-c enable file name and path decryption

+

-R recursively show all resources in the collection and all child collections

+

-u <date> show only resources with a lastmodified date after the specified date. Uses the http date format

+

Command alias: ls

+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/lock.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/lock.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,67 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

dav lock

+

lock [-pc] <url>

+

Creates a lock on the resource specified by the url. The lock is an exclusive write lock with infinity depth.

+

If the resource is successfully locked, a lock token for this resource is printed on stdout. This lock token should be saved somewhere to unlock the resource eventually.

+

-p disable file name and path decryption if enabled

+

-c enable file name and path decryption

+

Example 1: lock resource and use the lock token

+
$ dav lock myserv/resource
+opaquelocktoken:0454905e-f2ff-45c4-a3d7-5c4e4db5ce37
+$ dav put -L opaquelocktoken:0454905e-f2ff-45c4-a3d7-5c4e4db5ce37 myserv/resource newfile
+$ dav unlock -L opaquelocktoken:0454905e-f2ff-45c4-a3d7-5c4e4db5ce37 myserv/resource
+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/mkdir.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/mkdir.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,64 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

dav mkdir

+

mkdir [-pc] [-k <key>] [-L <lock>] <url>

+

Creates a collection. All intermediate collections are created.

+

-p disable file name encryption and decryption

+

-c enables file file name and content encryption

+

-k <key> use the specified key for encryption. The key must be configured in the config.xml file

+

-L <lock> use a lock token

+

Command alias: mkcol

+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/move.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/move.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,66 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

dav move

+

move [-pcO] [-L <lock>] <url> <url>

+

Moves the resource identified by url1 to the location url2. Currently url1 and url2 must be on the same host.

+

If url2 already exists, the command aborts, unless the -O option is specified.

+

The command uses a single WebDAV MOVE request to move the resources. It does not handle the dav encryption functionality, which means it does not modify url2 if encryption is enabled.

+

-p disable file name and path decryption if enabled. This applies only to url1

+

-c enable file name and path decryption This applies only to url1

+

-O override the destination resource

+

-L <lock> use a lock token. See dav lock

+

Command alias: mv

+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/put.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/put.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,65 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

dav put

+

put [-pcR] [-k <key>] [-L <lock>] <url> <file>

+

Uploads a file or a directory. When uploading a file and the url points to an existing collection, a resource inside this collection with the file's name is created. When the url points to a non-existing resource, the resource is created.

+

When uploading a directory, you need to specify the -R option. It uploads all files in the directory to the specified url, but it does not create a collection for the directory itself.

+

-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

+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/remove.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/remove.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,63 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

dav remove

+

remove [-pc] [-L <lock>] <url>

+

Removes a resource. When removing a collection, all unterneath resources are removed.

+

-p disable file name and path decryption if enabled

+

-c enable file name and path decryption

+

-L use a lock token

+

Command aliases: rm, delete

+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/set-property.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/set-property.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,66 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

dav set-property

+

set-property [-pc] [-L <lock>] [-n <uri>] <url> <property> [value]

+

Sets a resource property to a specified value.

+

property is a property name with or without prefix (see get-property for details).

+

If no value is specified, the content for the property is read from stdin.

+

-p disable file name and path decryption if enabled

+

-c enable file name and path decryption

+

-L <lock> use a lock token. See dav lock

+

-n <uri> specify property namespace

+

Note: Properties are never encrypted.

+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/html/unlock.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/unlock.html Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,69 @@ + + + + + + + + + + + +
+ davutils documentation +
+ + + +
+

dav unlock

+

unlock [-pc] [-L <lock>] <url>

+

Unlocks the specified url with a lock token. If no lock token is specified with the -L option, it read from stdin.

+

-p disable file name and path decryption if enabled

+

-c enable file name and path decryption

+

-L <lock> use a lock token

+

Example 1: unlock with lock token from stdin

+
$ dav lock myserv/resource > locktoken
+$ dav unlock myserv/resource < locktoken
+

Example 2: unlock with lock token from command line argument

+
$ dav lock myserv/resource
+opaquelocktoken:0454905e-f2ff-45c4-a3d7-5c4e4db5ce37
+$ dav unlock -L opaquelocktoken:0454905e-f2ff-45c4-a3d7-5c4e4db5ce37 myserv/resource
+
+ + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/schema/config.xsd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/schema/config.xsd Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/schema/sync.xsd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/schema/sync.xsd Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/src/Makefile --- a/docs/src/Makefile Sun Jul 09 20:15:14 2017 +0200 +++ b/docs/src/Makefile Tue Jul 11 20:45:32 2017 +0200 @@ -46,6 +46,9 @@ SRC += date.md SRC += configuration.md SRC += encryption.md +SRC += add-repository.md +SRC += list-repositories.md +SRC += check-config.md HTML = $(SRC:%.md=build/%.html) diff -r ee9e63c437c4 -r 8c44c5919691 docs/src/add-repository.md diff -r ee9e63c437c4 -r 8c44c5919691 docs/src/check-config.md diff -r ee9e63c437c4 -r 8c44c5919691 docs/src/commands.md --- a/docs/src/commands.md Sun Jul 09 20:15:14 2017 +0200 +++ b/docs/src/commands.md Tue Jul 11 20:45:32 2017 +0200 @@ -42,3 +42,12 @@ **`-i`** disable TLS certificate verification **`-v`** enable verbose output. Internally `CURLOPT_VERBOSE` is set to 1 and verbose output is printed on stderr. + +Most commands have the **`-p`** and **`-c`** options for enabling or disabling encryption. If encryption is not configured for a repository, but the **`-c`** option is specified, encryption/decryption is enabled. When enabled, all commands handle encrypted resource names. The **`-p`** options disables any encryption/decryption. See [encryption][1] for details. + +[1]: ./encryption.html + +Aliases +------- + +Some commands have alternate names. For example `dav ls` is the same as `dav list`. diff -r ee9e63c437c4 -r 8c44c5919691 docs/src/configuration.md --- a/docs/src/configuration.md Sun Jul 09 20:15:14 2017 +0200 +++ b/docs/src/configuration.md Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,178 @@ +Configuration +============= + +The main configuration file for *dav* is `$HOME/.dav/config.xml` and is used for configuring repositories, proxies and encryption keys. This configuration is also used by *dav-sync*. The file is created automaticaly if it doesn't exist. + +The *config.xml* file is an XML file with `` as root element. The `` element can have the following child elements: ``, ``, ``, `` + +## repository + +This element is used to configure a repository. A repository must have a unique name to identify the repository and a url pointing to the root collection for this repository. + +Required child elements: ``, `` \ +Optional elements: ``, ``, ``, ``, ``, ``, ``, ``, ``, ``, `` + +### name + +Unique repository identifer. + +Type: string \ +Example: `myrepo` + +### url + +The url must point to a valid WebDAV compilant collection. + +Type: string \ +Example: `https://example.com/webdav/repo1/` + +### user + +User used for authentication + +Type: string \ +Example: `alice` + +### password + +A base64 encoded password used for authentication. + +Type: base64 string \ +Example: `MTIzNDU2Nzg=` + +### default-key + +Identifer of the key used by default for encryption. There must be a configured key with this name. + +Type: string \ +Example: `mykey` + +### full-encryption + +If this element has the value of true, content and resource name encryption/decryption is enabled. Because encryption and decryption is disabled by default, `false` has no effect for this element. + +Type: boolean \ +Default: false \ +Example: `true + +### content-encryption + +This element enables only content encryption and decryption. A value of `false` disables content encryption, but it does not disables content decryption, if this is enabled with ``. + +Type: boolean \ +Default: false \ +Example: `true` + +### decrypt-content + +Controls only the decryption of content. If `true` content is decrypted. + +Type: boolean \ +Default false \ +Example: `true` + +### decrypt-name + +Controls only the decryption of resource names. If `true` resource names are decrypted. This effects path to url resolution. + +Type: boolean \ +Default: false \ +Example: `true` + +### cert + +Path to a file containing certificates to verify the TLS connection to the server. + +Type: string \ +Example: `/etc/certs/cabundle.pem` + +Note: This element does the same as curl's `--cacert` option. + +### verification + +This element can disable TLS certificate verification. + +Type: boolean \ +Default: true \ +Example: `false` + +### ssl-version + +Specifies the SSL version to attempt to use. The value must be one of this strings: TLSv1, TLSv1.0, TLSv1.1, TLSv1.2, SSLv2, SSLv3 + +Type: ssl version enum \ +Example: `TLSv1.2` + +### authmethods + +Controls which http authentication methods are used. Multiple methods can be used. The value must be one or more authentication methods separated by space. Valid authentication methods are: basic, digest, negotiate, ntlm, any, none + +Type: list of authmethod + +Default: basic \ +Example: `basic digest` + +## key + +The `` element configures a key used for encryption. A key must have a unique name, which is stored in the properties of encrypted resources. To decrypt resources, dav looks for configured keys with this name, therefore the name of the key should never changed and must be the same on all hosts accessing the same repository. + +Required child elements: ``, `` \ +Optional elements: `` + +### name + +Unique key identifer. + +Type: string \ +Example: `key1` + +### file + +Path to the content of the key. The file should contain 32 (aes256) or 16 (aes128) bytes. If value is not an absolut path, it must be relative to the dav config directory *$HOME/.dav/*. + +Type: string \ +Example: `keys/key1.bin` + +### type + +Specifies the key type. Valid values are `aes128` or `aes256`. + +Type: aes type enum \ +Default: aes256 \ +Example: `aes128` + +## http-proxy / https-proxy + +Configuration for http and https proxies is the same. Both use the same elements, but https-proxy expects an https url. + +Required child elements: `` \ +Optional elements: ``, ``, `` + +### url + +### user + +### password + +### no + +## Example 1: minimal repository configuration + +A minimal configuration for a repository. If no user and/or password are configured, dav prompts for authentication informations if required. + + + myrepo + https://example.com/path/to/repo/ + + +## Example 2: repository with authentication informations + +A typical configuration for easy accessing a repository without authentication prompt. + + + myrepo + https://example.com/path/to/repo/ + alice + MTIzNDU2Nzg= + + diff -r ee9e63c437c4 -r 8c44c5919691 docs/src/copy.md --- a/docs/src/copy.md Sun Jul 09 20:15:14 2017 +0200 +++ b/docs/src/copy.md Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,24 @@ +dav copy +======== + +**`copy [-pcO] [-L ] `** + +Creates a duplicate of the resource identified by *url1* at the location *url2*. All resource properties are copied. Currently *url1* and *url2* must be the same host. + +If *url1* is a collection, all children are copied. + +If *url2* already exists, the command aborts, unless the `-O` option is specified. + +The command uses a single WebDAV COPY request to duplicate the resources. It does not handle the dav encryption functionality, which means it does not modify *url2* if encryption is enabled. + +**`-p`** disable file name and path decryption if enabled. This applies only to *url1* + +**`-c`** enable file name and path decryption This applies only to *url1* + +**`-O`** override the destination resource + +**`-L `** use a lock token. See [dav lock][1] + +[1]: ./lock.html + +**Command alias:** cp diff -r ee9e63c437c4 -r 8c44c5919691 docs/src/get.md --- a/docs/src/get.md Sun Jul 09 20:15:14 2017 +0200 +++ b/docs/src/get.md Tue Jul 11 20:45:32 2017 +0200 @@ -18,6 +18,6 @@ **`-o `** specify the local output file. A **-** indicates stdout -**`-u `** downloads only files which are modified since the specified date. Uses the http date format +**`-u `** download only files which are modified since the specified date. Uses the http date format diff -r ee9e63c437c4 -r 8c44c5919691 docs/src/header.html --- a/docs/src/header.html Sun Jul 09 20:15:14 2017 +0200 +++ b/docs/src/header.html Tue Jul 11 20:45:32 2017 +0200 @@ -21,6 +21,9 @@
  • unlock
  • info
  • date
  • +
  • add-repository
  • +
  • list-repositories
  • +
  • check-config
  • Configuration
  • Encryption
  • diff -r ee9e63c437c4 -r 8c44c5919691 docs/src/list-repositories.md diff -r ee9e63c437c4 -r 8c44c5919691 docs/src/list.md --- a/docs/src/list.md Sun Jul 09 20:15:14 2017 +0200 +++ b/docs/src/list.md Tue Jul 11 20:45:32 2017 +0200 @@ -11,7 +11,7 @@ **`-a`** don't hide files whose names begins with a dot `.` -**`-l`** shows additional information for resources +**`-l`** show additional information for resources Example: @@ -32,18 +32,20 @@ The last column is the resource name. If the `-R` option is specified, the resource path is shown. -**`-t`** this options only work in combination with `-l` and it adds the resource content type to the output (after the flags) +**`-t`** this options only works in combination with `-l` and it adds the resource content type to the output (after the flags) **`-e`** similar to `-l`, but with 6 flag fields. Currently only the first 4 fields are used. The last two are reserved for future use. 3. Field: **l** indicates a locked resource 4. Field: **x** indicates a executable resource (executable property with http://apache.org/dav/props/ namespace) -**`-p`** disables file name and path decryption if enabled +**`-p`** disable file name and path decryption if enabled -**`-c`** enables file name and path decryption +**`-c`** enable file name and path decryption -**`-R`** recursively shows all resources in the collection and all child collections +**`-R`** recursively show all resources in the collection and all child collections -**`-u `** shows only resources with a lastmodified date after the specified +**`-u `** show only resources with a lastmodified date after the specified date. Uses the http date format + +**Command alias:** ls diff -r ee9e63c437c4 -r 8c44c5919691 docs/src/mkdir.md --- a/docs/src/mkdir.md Sun Jul 09 20:15:14 2017 +0200 +++ b/docs/src/mkdir.md Tue Jul 11 20:45:32 2017 +0200 @@ -13,3 +13,5 @@ the config.xml file **`-L `** use a lock token + +**Command alias:** mkcol diff -r ee9e63c437c4 -r 8c44c5919691 docs/src/move.md --- a/docs/src/move.md Sun Jul 09 20:15:14 2017 +0200 +++ b/docs/src/move.md Tue Jul 11 20:45:32 2017 +0200 @@ -0,0 +1,22 @@ +dav move +======== + +**`move [-pcO] [-L ] `** + +Moves the resource identified by *url1* to the location *url2*. Currently *url1* and *url2* must be on the same host. + +If *url2* already exists, the command aborts, unless the `-O` option is specified. + +The command uses a single WebDAV MOVE request to move the resources. It does not handle the dav encryption functionality, which means it does not modify *url2* if encryption is enabled. + +**`-p`** disable file name and path decryption if enabled. This applies only to *url1* + +**`-c`** enable file name and path decryption This applies only to *url1* + +**`-O`** override the destination resource + +**`-L `** use a lock token. See [dav lock][1] + +[1]: ./lock.html + +**Command alias:** mv diff -r ee9e63c437c4 -r 8c44c5919691 docs/src/remove.md --- a/docs/src/remove.md Sun Jul 09 20:15:14 2017 +0200 +++ b/docs/src/remove.md Tue Jul 11 20:45:32 2017 +0200 @@ -11,3 +11,5 @@ **`-c`** enable file name and path decryption **`-L`** use a lock token + +**Command aliases:** rm, delete diff -r ee9e63c437c4 -r 8c44c5919691 docs/sync.xsd --- a/docs/sync.xsd Sun Jul 09 20:15:14 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -