mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 02:48:26 +00:00
Documentation updates
This commit is contained in:
47
modules/microsite/docs/doc/tools/ds.md
Normal file
47
modules/microsite/docs/doc/tools/ds.md
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
layout: docs
|
||||
title: Upload CLI
|
||||
permalink: doc/tools/ds
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
|
||||
A bash script is provided to quickly upload files from the command
|
||||
line. It reads a configuration file containing the URLs to upload to.
|
||||
Then each file given to the script will be uploaded to al URLs in the
|
||||
config.
|
||||
|
||||
The config file is expected in
|
||||
`$XDG_CONFIG_HOME/docspell/ds.conf`. `$XDG_CONFIG_HOME` defaults to
|
||||
`~/.config`.
|
||||
|
||||
The config file contains lines with key-value pairs, separated by a
|
||||
`=` sign. Lines starting with `#` are ignored. Example:
|
||||
|
||||
```
|
||||
# Config file
|
||||
url.1 = http://localhost:7880/api/v1/open/upload/item/5DxhjkvWf9S-CkWqF3Kr892-WgoCspFWDo7-XBykwCyAUxQ
|
||||
url.2 = http://localhost:7880/api/v1/open/upload/item/6DxhjkvWf9S-CkWqF3Kr892-WgoCspFWDo7-XBykwCyAUxQ
|
||||
```
|
||||
|
||||
The key must start with `url`. The urls should be [anonymous upload
|
||||
urls](./uploading#anonymous-upload).
|
||||
|
||||
|
||||
### Usage
|
||||
|
||||
- The `-c` option allows to specifiy a different config file.
|
||||
- The `-h` option shows a help overview.
|
||||
- The `-d` option deletes files after upload was successful
|
||||
- The `-e` option can be used to check for file existence in docspell.
|
||||
Instead of uploading, the script only checks whether the file is in
|
||||
docspell or not.
|
||||
|
||||
The script takes a list of files as arguments.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
``` bash
|
||||
./ds.sh ~/Downloads/*.pdf
|
||||
```
|
Reference in New Issue
Block a user