mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-02 21:42:52 +00:00
Add usage
This commit is contained in:
parent
bebe0dabde
commit
517979f81e
@ -9,6 +9,29 @@
|
||||
# saner programming env: these switches turn some bugs into errors
|
||||
set -o errexit -o pipefail -o noclobber -o nounset
|
||||
|
||||
showUsage() {
|
||||
echo "Options:"
|
||||
echo " CONSUMEDIR_VERBOSE=y Print more to stdout."
|
||||
echo " CONSUMEDIR_DELETE=y Delete the file if successfully uploaded. (value: $delete)"
|
||||
echo " CONSUMEDIR_UNIQUE=y Optional. Upload only if the file doesn't already exist. (value: $distinct)"
|
||||
echo " CONSUMEDIR_ONCE=y Instead of watching, upload all files in that dir."
|
||||
echo " CONSUMEDIR_PATH=/opt/docs The directories to watch."
|
||||
echo " CONSUMEDIR_POLLING=y Enables the polling mode instead of using inotifywait"
|
||||
echo " CONSUMEDIR_POLLING_INTERVAL=60 Sets the interval for polling mode"
|
||||
echo " CONSUMEDIR_ENDPOINT= Sets the endpoint URL"
|
||||
echo " CONSUMEDIR_INTEGRATION=y Upload to the integration endpoint. It implies -r. This puts the script in"
|
||||
echo " a different mode, where the first subdirectory of any given starting point"
|
||||
echo " is read as the collective name. The url(s) are completed with this name in"
|
||||
echo " order to upload files to the respective collective. So each directory"
|
||||
echo " given is expected to contain one subdirectory per collective and the urls"
|
||||
echo " are expected to identify the integration endpoint, which is"
|
||||
echo " /api/v1/open/integration/item/<collective-name>. (value: $integration)"
|
||||
echo " DOCSPELL_HEADER_VALUE= The header name and value to use with the integration endpoint. This must be"
|
||||
echo " in form 'headername:value'. Only used if '-i' is supplied."
|
||||
echo " CONSUMEDIR_ARGS= Allows to specify a custom command line that is passed to the consumedir script"
|
||||
echo " CONSUMEDIR_SCRIPT= Allows to override the location of the consumedir script"
|
||||
}
|
||||
|
||||
CONSUMEDIR_SCRIPT=${CONSUMEDIR_SCRIPT-${0/-entrypoint/}}
|
||||
CONSUMEDIR_PATH="${CONSUMEDIR_PATH-/opt/docs}"
|
||||
CONSUMEDIR_POLLING_INTERVAL=${CONSUMEDIR_POLLING_INTERVAL-60}
|
||||
|
Loading…
x
Reference in New Issue
Block a user