ccremer / paperless-cli

CLI tool to interact with paperless-ngx remote API
GNU General Public License v3.0
8 stars 2 forks source link

Add command to bulk-download all documents #17

Closed ccremer closed 1 year ago

ccremer commented 1 year ago

Summary

Adds bulk-download subcommand with following options

NAME:
   paperless-cli bulk-download - Downloads all documents at once

USAGE:
   paperless-cli bulk-download [command options] [arguments...]

OPTIONS:
   --url value          URL endpoint of the paperless instance. [$PAPERLESS_URL]
   --username value     username for BasicAuth of the paperless instance. Leave empty to use token authentication. [$PAPERLESS_USERNAME]
   --token value        password or token of the paperless instance. [$PAPERLESS_TOKEN]
   --target-path value  target file path where documents are downloaded. (default: documents.zip) [$DOWNLOAD_TARGET_PATH]
   --content value      selection of document variant. (default: "archive") [$DOWNLOAD_CONTENT]
   --unzip              unzip the downloaded file. (default: false) [$DOWNLOAD_UNZIP]
   --overwrite          deletes existing file(s) before downloading. (default: false) [$DOWNLOAD_OVERWRITE]
   --help, -h           show help (default: false)

Closes #16

This command is useful to create a local copy of Paperless documents (without the filtering and searching ofc) for offline usage. Works best if the file name formatting configured in Paperless makes somewhat sense for local usage.

⚠️ Please note that this is not a full-fledged backup solution for your Paperless instance.

Checklist