Add background mount path helpers

This commit is contained in:
Jan Bader
2026-07-19 19:48:49 +02:00
parent ef8caef37b
commit 7edd1b8d7f
5 changed files with 227 additions and 12 deletions
+13 -1
View File
@@ -26,10 +26,13 @@ Erstellen Sie eine `docspell-import.json` Datei in Ihrem Home-Verzeichnis: [Beis
The `mount` subcommand exposes a Docspell collection as a read-only filesystem.
It uses the same `~/docspell-import.json` configuration and password command as the import command.
Set `mountPath` in the config to define the default mount point.
```bash
mkdir -p ~/mnt/docspell
docspell-import mount --query '*' ~/mnt/docspell
docspell-import mount --query '*' ~/mnt/docspell # starts in the background
# or, with mountPath configured:
docspell-import mount --query '*'
# unmount when done
fusermount -u ~/mnt/docspell
```
@@ -47,3 +50,12 @@ Options:
- `--auth-header`: token header, default `X-Docspell-Auth`.
The mount is read-only. File contents are downloaded lazily from `/api/v1/sec/attachment/{id}` when read.
Helper commands:
```bash
docspell-import get-local-path <item-id-or-web-url>
docspell-import get-url <local-mounted-path-or-item-id>
```
`get-local-path` starts the configured mount in the background if it is not mounted yet.