Skip to main content

davify

Uploads files to a WebDAV server for retrieval via https.

The problem davify solves

Sending document versions to collaborators is often quite cumbersome. Davify (i) uploads files to your WebDAV server (multiple files and directories are put into a .txz archive prior to uploading), (ii) provides a publicly available download link, and (iii) copies this information into the clipboard.

In addition it keeps track of a file's lifetime and provides scripts for automatically removing files once their lifetime has expired.

Setup and configuration files:

Installation

pipx install davify

Client configuration:

Setup the WebDAV client with

davify --setup

Davify's configuration resides in ~/.davify and the WebDAV server credentials are stored in your system's keystore. Please find below an example configuration file.

[default]
filename_pattern = {random_prefix}{lifetime_str}-{fname}{version_suffix}{ext}
file_url_pattern = {protocol}://example.net/{random_prefix}{lifetime_str}-{fname_quoted}{version_suffix}{ext}
notification_message = {url}\n(Note the file will be available for {lifetime}.)`

Server configuration

Calling clean-davify-directory on the server removes expired files. Note that you need to provide the full path to the clean-davify-directory binary (use which clean-davify-directory to obtain the path).

Example crontab entry:

# clean davify directory
15 00   * * *   www-data  /root/.local/bin/clean-davify-directory /var/www/davify

Command line parameters

usage: davify [-h] [--lifetime LIFETIME]
                   [--retrieval-url-pattern RETRIEVAL_URL_PATTERN]
                   [--webdav-file-pattern WEBDAV_FILE_PATTERN]
                   [--file-url-pattern FILE_URL_PATTERN] 
                   [--archive-name ARCHIVE_NAME] [--setup]
                   [fname [fname ...]]

positional arguments:
  fname                 File(s) to davify or directory to upload.

optional arguments:
  -h, --help            show this help message and exit
  --lifetime LIFETIME   Suggested file lifetime in hours (default: 1 week).
                        Zero suggests that the file is never deleted.
  --retrieval-url-pattern RETRIEVAL_URL_PATTERN
                        Pattern to use for the retrieval URL.
  --webdav-file-pattern WEBDAV_FILE_PATTERN
                        Pattern used to create the webdav file.
  --file-url-pattern FILE_URL_PATTERN
                        Patterns used to retrieve the created file
  --archive-name ARCHIVE_NAME, -n ARCHIVE_NAME
                        An optional file name for the created archive.
  --setup               Setup WebDAV connection.

Example call:

albert@myhost:~$ davify transform.py
https://example.net/qOMvcO/transform-15dez-0201.py
(Note the file will be available for 1 week.)

Metadata

Release files for davify 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for davify 1.2.0
File Size Uploaded
davify-1.2.0.tar.gz 20.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for davify 1.2.0
File Interpreter ABI Platform
davify-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.3 kB

Release files / davify-1.2.0.tar.gz

Download URL davify-1.2.0.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3e1f74654458919bc776dc25adb027d6f02903b9b8d867bb6c09dc35aa927336
BLAKE2b-256 checksum
How to use checksums
cec0be4b4b3ca235d41b601cb73f1f74d9094a030dd3dbf493377e4f2bf509cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-35-generic

Release files / davify-1.2.0-py3-none-any.whl

Download URL davify-1.2.0-py3-none-any.whl
Size 21.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53e3c909da8054f816a6c214ce4dcb3b24cd849a216ee89ad6e8547d15a44d10
BLAKE2b-256 checksum
How to use checksums
effc8511431980764d42b23fd9043e27578bd408ac529d295b030276426a4def
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-35-generic

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page