From 143f9a5b63c567f21c9c56c46bfb72592418a845 Mon Sep 17 00:00:00 2001 From: Jan Beilicke Date: Fri, 10 Apr 2020 22:16:06 +0200 Subject: [PATCH 1/2] Updated README --- README.md | 6 ++++++ README.rst | 0 2 files changed, 6 insertions(+) create mode 100644 README.md delete mode 100644 README.rst diff --git a/README.md b/README.md new file mode 100644 index 0000000..64c5f8a --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# WebDAV CLI + +Can be used to pull a directory from a remote WebDAV server, e.g. as supported by Nextcloud. + +## Quickstart + diff --git a/README.rst b/README.rst deleted file mode 100644 index e69de29..0000000 From 0ab3c5413b5484c1103543f5e204f29645de474b Mon Sep 17 00:00:00 2001 From: Jan Beilicke Date: Fri, 10 Apr 2020 22:58:11 +0200 Subject: [PATCH 2/2] README: Added quickstart --- README.md | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 64c5f8a..ac5b6a9 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,45 @@ Can be used to pull a directory from a remote WebDAV server, e.g. as supported by Nextcloud. -## Quickstart +## Prerequisites + +- Python >3.6 +- Pip + +## Quickstart (using poetry) + +``` +pip3 install poetry +git clone +cd +local-repo-path $ git submodule init && git submodule update +local-repo-path $ poetry install +local-repo-path $ poetry run python webdavcli/webdavcli.py -h +Using python3.7 (3.7.6) +usage: webdavcli.py [-h] remote_dir local_dir + +Pulls a WebDAV remote directory. + +positional arguments: + remote_dir remote source path + local_dir local target path + +optional arguments: + -h, --help show this help message and exit + +``` + +To use the client, create a file `.env` in the `local-repo-path` with the following content (adapt it according to your environment): + +``` +WEBDAV_SYNC_REMOTE_URL="https://nextcloud.example.tld/remote.php/dav/files//" +WEBDAV_SYNC_REMOTE_USER="" +WEBDAV_SYNC_REMOTE_PASS="" +``` + +Ensure that the remote WebDAV directory exists and then run the client, supplying a remote directory and a local target directory: + +``` +poetry run python webdavcli/webdavcli.py +```