Move config file to XDG config dir
This commit is contained in:
@@ -18,11 +18,18 @@ A small command-line helper for managing Docspell import folders, archiving file
|
||||
- A running Docspell instance.
|
||||
- A password command, for example [`pass`](https://www.passwordstore.org/), that prints the Docspell password to stdout.
|
||||
- FUSE support for the `mount` command, including `fusermount` or `fusermount3` for unmounting.
|
||||
- A configuration file at `~/docspell-cli.json`.
|
||||
- A configuration file at `${XDG_CONFIG_HOME:-~/.config}/docspell-cli/config.json`.
|
||||
|
||||
## Configuration
|
||||
|
||||
Create `~/docspell-cli.json`. See [docspell-cli-example.json](./docspell-cli-example.json) for a complete example.
|
||||
Create `${XDG_CONFIG_HOME:-~/.config}/docspell-cli/config.json`. See [docspell-cli-example.json](./docspell-cli-example.json) for a complete example.
|
||||
|
||||
```bash
|
||||
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/docspell-cli"
|
||||
cp docspell-cli-example.json "${XDG_CONFIG_HOME:-$HOME/.config}/docspell-cli/config.json"
|
||||
```
|
||||
|
||||
For compatibility, the legacy `~/docspell-cli.json` file is still read if the XDG config file does not exist, but the tool will print a warning asking you to move it.
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -84,7 +91,7 @@ Uploaded files are not archived immediately. They are re-checked on the next run
|
||||
|
||||
## Read-only FUSE mount
|
||||
|
||||
The `mount` subcommand exposes Docspell search results as a read-only filesystem. It uses the same `~/docspell-cli.json` file and password command as the import/archive command.
|
||||
The `mount` subcommand exposes Docspell search results as a read-only filesystem. It uses the same XDG config file and password command as the import/archive command.
|
||||
|
||||
Set `mountPath` in the config to define the default mount point and `mountQuery` to define the default Docspell query.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user