sort exporter option by alphabetical order

This commit is contained in:
Matthieu Helleboid 2023-01-20 20:59:09 +01:00 committed by Trenton H
parent 2b3edbaa46
commit aeecc10e45
2 changed files with 47 additions and 47 deletions

View File

@ -227,16 +227,16 @@ is not a TTY" errors. For example:
`docker-compose exec -T webserver document_exporter ../export`
```
document_exporter target [-sm] [-c] [-f] [-p] [-d] [-na] [-nt]
document_exporter target [-c] [-d] [-f] [-na] [-nt] [-p] [-sm] [-z]
optional arguments:
-sm, --split-manifest
-c, --compare-checksums
-f, --use-filename-format
-p, --use-filename-prefix
-d, --delete
-f, --use-filename-format
-na, --no-archive
-nt, --no-thumbnail
-p, --use-filename-prefix
-sm, --split-manifest
-z --zip
```
@ -244,9 +244,6 @@ optional arguments:
documents, thumbnails and a `manifest.json` file. The manifest contains
all metadata from the database (correspondents, tags, etc).
If `-sm` or `--split-manifest` is provided, information about document
will be placed in individual json files.
When you use the provided docker compose script, specify `../export` as
the target. This path inside the container is automatically mounted on
your host on the folder `export`.
@ -256,24 +253,29 @@ will assume that the contents of the export directory are a previous
export and will attempt to update the previous export. Paperless will
only export changed and added files. Paperless determines whether a file
has changed by inspecting the file attributes "date/time modified" and
"size". If that does not work out for you, specify
"size". If that does not work out for you, specify `-c` or
`--compare-checksums` and paperless will attempt to compare file
checksums instead. This is slower.
Paperless will not remove any existing files in the export directory. If
you want paperless to also remove files that do not belong to the
current export such as files from deleted documents, specify `--delete`.
current export such as files from deleted documents, specify `-d` or `--delete`.
Be careful when pointing paperless to a directory that already contains
other files.
Paperless will not export archive files if you use `--no-archive`. After
The filenames generated by this command follow the format
`[date created] [correspondent] [title].[extension]`. If you want
paperless to use `PAPERLESS_FILENAME_FORMAT` for exported filenames
instead, specify `-f` or `--use-filename-format`.
Paperless will not export archive files if you use `-na` or `--no-archive`. After
importing, the sanity checker will warn about missing files until these files
are generated again by using `document_archiver`.
It can make sense to omit these files from backup as their content and checksum
can change (new archiver algorithm) and may then cause additional used space in
a deduplicated backup.
Paperless will not export thumbnails if you use `--no-thumbnail`. After
Paperless will not export thumbnails if you use `-nt` or `--no-thumbnail`. After
importing, the sanity checker will warn about missing files and the documents
view will not have thumbnails until these files are generated again by using
`document_thumbnails`.
@ -281,18 +283,16 @@ It can make sense to omit these files from backup as their content and checksum
can change (new thumbnail generation algorithm) and may then cause additional
used space in a deduplicated backup.
If `-z` or `--zip` is provided, the export will be a zipfile
in the target directory, named according to the current date.
The filenames generated by this command follow the format
`[date created] [correspondent] [title].[extension]`. If you want
paperless to use `PAPERLESS_FILENAME_FORMAT` for exported filenames
instead, specify `--use-filename-format`.
If `-p` or `--use-filename-prefix` is provided, Files will be exported
in dedicated folders according to their nature: `archive`, `originals`,
`thumbnails` or `json`
If `-sm` or `--split-manifest` is provided, information about document
will be placed in individual json files.
If `-z` or `--zip` is provided, the export will be a zipfile
in the target directory, named according to the current date.
!!! warning
If exporting with the file name format, there may be errors due to

View File

@ -53,14 +53,6 @@ class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument("target")
parser.add_argument(
"-sm",
"--split-manifest",
default=False,
action="store_true",
help="Export document information in individual manifest json files.",
)
parser.add_argument(
"-c",
"--compare-checksums",
@ -71,24 +63,6 @@ class Command(BaseCommand):
"modified is used instead.",
)
parser.add_argument(
"-f",
"--use-filename-format",
default=False,
action="store_true",
help="Use PAPERLESS_FILENAME_FORMAT for storing files in the "
"export directory, if configured.",
)
parser.add_argument(
"-p",
"--use-filename-prefix",
default=False,
action="store_true",
help="Export files in dedicated folders according to their nature: "
"archive, originals or thumbnails",
)
parser.add_argument(
"-d",
"--delete",
@ -99,6 +73,15 @@ class Command(BaseCommand):
"deleted documents.",
)
parser.add_argument(
"-f",
"--use-filename-format",
default=False,
action="store_true",
help="Use PAPERLESS_FILENAME_FORMAT for storing files in the "
"export directory, if configured.",
)
parser.add_argument(
"-na",
"--no-archive",
@ -116,10 +99,20 @@ class Command(BaseCommand):
)
parser.add_argument(
"--no-progress-bar",
"-p",
"--use-filename-prefix",
default=False,
action="store_true",
help="If set, the progress bar will not be shown",
help="Export files in dedicated folders according to their nature: "
"archive, originals or thumbnails",
)
parser.add_argument(
"-sm",
"--split-manifest",
default=False,
action="store_true",
help="Export document information in individual manifest json files.",
)
parser.add_argument(
@ -130,6 +123,13 @@ class Command(BaseCommand):
help="Export the documents to a zip file in the given directory",
)
parser.add_argument(
"--no-progress-bar",
default=False,
action="store_true",
help="If set, the progress bar will not be shown",
)
def __init__(self, *args, **kwargs):
BaseCommand.__init__(self, *args, **kwargs)
self.target: Path = None