]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Merge management commands
authorshamoon <4887959+shamoon@users.noreply.github.com>
Tue, 8 Apr 2025 23:46:43 +0000 (16:46 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Tue, 8 Apr 2025 23:46:43 +0000 (16:46 -0700)
20 files changed:
pyproject.toml
src/documents/management/commands/__init__.py [deleted file]
src/paperless/management/commands/__init__.py [moved from src/documents/management/__init__.py with 100% similarity]
src/paperless/management/commands/convert_mariadb_uuid.py [moved from src/documents/management/commands/convert_mariadb_uuid.py with 100% similarity]
src/paperless/management/commands/decrypt_documents.py [moved from src/documents/management/commands/decrypt_documents.py with 100% similarity]
src/paperless/management/commands/document_archiver.py [moved from src/documents/management/commands/document_archiver.py with 96% similarity]
src/paperless/management/commands/document_consumer.py [moved from src/documents/management/commands/document_consumer.py with 100% similarity]
src/paperless/management/commands/document_create_classifier.py [moved from src/documents/management/commands/document_create_classifier.py with 100% similarity]
src/paperless/management/commands/document_exporter.py [moved from src/documents/management/commands/document_exporter.py with 99% similarity]
src/paperless/management/commands/document_fuzzy_match.py [moved from src/documents/management/commands/document_fuzzy_match.py with 97% similarity]
src/paperless/management/commands/document_importer.py [moved from src/documents/management/commands/document_importer.py with 98% similarity]
src/paperless/management/commands/document_index.py [moved from src/documents/management/commands/document_index.py with 92% similarity]
src/paperless/management/commands/document_renamer.py [moved from src/documents/management/commands/document_renamer.py with 92% similarity]
src/paperless/management/commands/document_retagger.py [moved from src/documents/management/commands/document_retagger.py with 98% similarity]
src/paperless/management/commands/document_sanity_checker.py [moved from src/documents/management/commands/document_sanity_checker.py with 88% similarity]
src/paperless/management/commands/document_thumbnails.py [moved from src/documents/management/commands/document_thumbnails.py with 95% similarity]
src/paperless/management/commands/loaddata_stdin.py [moved from src/documents/management/commands/loaddata_stdin.py with 100% similarity]
src/paperless/management/commands/manage_superuser.py [moved from src/documents/management/commands/manage_superuser.py with 100% similarity]
src/paperless/management/commands/mixins.py [moved from src/documents/management/commands/mixins.py with 100% similarity]
src/paperless/management/commands/prune_audit_logs.py [moved from src/documents/management/commands/prune_audit_logs.py with 95% similarity]

index ba978c24576c82e2b5e5827a4eaf65a7a6e4b8dc..00b059557953102f1d217aa7b4630d55c6bc35e1 100644 (file)
@@ -200,18 +200,9 @@ lint.per-file-ignores."docker/wait-for-redis.py" = [
   "INP001",
   "T201",
 ]
-lint.per-file-ignores."src/documents/management/commands/document_consumer.py" = [
-  "PTH",
-] # TODO Enable & remove
-lint.per-file-ignores."src/documents/management/commands/document_exporter.py" = [
-  "PTH",
-] # TODO Enable & remove
 lint.per-file-ignores."src/documents/migrations/1012_fix_archive_files.py" = [
   "PTH",
 ] # TODO Enable & remove
-lint.per-file-ignores."src/documents/models.py" = [
-  "SIM115",
-]
 lint.per-file-ignores."src/documents/signals/handlers.py" = [
   "PTH",
 ] # TODO Enable & remove
@@ -251,6 +242,15 @@ lint.per-file-ignores."src/paperless/checks.py" = [
 lint.per-file-ignores."src/paperless/file_handling.py" = [
   "PTH",
 ] # TODO Enable & remove
+lint.per-file-ignores."src/paperless/management/commands/document_consumer.py" = [
+  "PTH",
+] # TODO Enable & remove
+lint.per-file-ignores."src/paperless/management/commands/document_exporter.py" = [
+  "PTH",
+] # TODO Enable & remove
+lint.per-file-ignores."src/paperless/models.py" = [
+  "SIM115",
+]
 lint.per-file-ignores."src/paperless/parsers.py" = [
   "PTH",
 ] # TODO Enable & remove
diff --git a/src/documents/management/commands/__init__.py b/src/documents/management/commands/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
similarity index 96%
rename from src/documents/management/commands/document_archiver.py
rename to src/paperless/management/commands/document_archiver.py
index 6120b10df37dfacdd536e68dc2f49f6deda03926..1e79004503bca2e5f9e322fb08e768cc03ffda77 100644 (file)
@@ -6,8 +6,8 @@ from django import db
 from django.conf import settings
 from django.core.management.base import BaseCommand
 
-from documents.management.commands.mixins import MultiProcessMixin
-from documents.management.commands.mixins import ProgressBarMixin
+from paperless.management.commands.mixins import MultiProcessMixin
+from paperless.management.commands.mixins import ProgressBarMixin
 from paperless.models import Document
 from paperless.tasks import update_document_content_maybe_archive_file
 
similarity index 99%
rename from src/documents/management/commands/document_exporter.py
rename to src/paperless/management/commands/document_exporter.py
index 519d294be95450d672a42c259abbf779a603f9dc..4bf581d054a4adcf42edb75898ccbad260a9d560 100644 (file)
@@ -32,14 +32,11 @@ if TYPE_CHECKING:
 if settings.AUDIT_LOG_ENABLED:
     from auditlog.models import LogEntry
 
-from documents.management.commands.mixins import CryptMixin
-from documents.settings import EXPORTER_ARCHIVE_NAME
-from documents.settings import EXPORTER_FILE_NAME
-from documents.settings import EXPORTER_THUMBNAIL_NAME
 from paperless import version
 from paperless.db import GnuPG
 from paperless.file_handling import delete_empty_directories
 from paperless.file_handling import generate_filename
+from paperless.management.commands.mixins import CryptMixin
 from paperless.models import ApplicationConfiguration
 from paperless.models import Correspondent
 from paperless.models import CustomField
@@ -57,6 +54,9 @@ from paperless.models import WorkflowAction
 from paperless.models import WorkflowActionEmail
 from paperless.models import WorkflowActionWebhook
 from paperless.models import WorkflowTrigger
+from paperless.settings import EXPORTER_ARCHIVE_NAME
+from paperless.settings import EXPORTER_FILE_NAME
+from paperless.settings import EXPORTER_THUMBNAIL_NAME
 from paperless.utils import copy_file_with_basic_stats
 from paperless_mail.models import MailAccount
 from paperless_mail.models import MailRule
similarity index 97%
rename from src/documents/management/commands/document_fuzzy_match.py
rename to src/paperless/management/commands/document_fuzzy_match.py
index 1197fdececfdd0fa6fb327a40bf2cf8833ea4580..640e0a53479a999b28b4daef0e72cd984fc45912 100644 (file)
@@ -7,8 +7,8 @@ import tqdm
 from django.core.management import BaseCommand
 from django.core.management import CommandError
 
-from documents.management.commands.mixins import MultiProcessMixin
-from documents.management.commands.mixins import ProgressBarMixin
+from paperless.management.commands.mixins import MultiProcessMixin
+from paperless.management.commands.mixins import ProgressBarMixin
 from paperless.models import Document
 
 
similarity index 98%
rename from src/documents/management/commands/document_importer.py
rename to src/paperless/management/commands/document_importer.py
index 3a66ee1c2e23cdb2201aa8732c4540cf6a8b2eb6..1bb320d0c209e3c5c4ab59404734ea19d2d4b25c 100644 (file)
@@ -21,15 +21,11 @@ from django.db.models.signals import m2m_changed
 from django.db.models.signals import post_save
 from filelock import FileLock
 
-from documents.management.commands.mixins import CryptMixin
-from documents.settings import EXPORTER_ARCHIVE_NAME
-from documents.settings import EXPORTER_CRYPTO_SETTINGS_NAME
-from documents.settings import EXPORTER_FILE_NAME
-from documents.settings import EXPORTER_THUMBNAIL_NAME
 from documents.signals.handlers import check_paths_and_prune_custom_fields
 from documents.signals.handlers import update_filename_and_move_files
 from paperless import version
 from paperless.file_handling import create_source_path_directory
+from paperless.management.commands.mixins import CryptMixin
 from paperless.models import Correspondent
 from paperless.models import CustomField
 from paperless.models import CustomFieldInstance
@@ -38,6 +34,10 @@ from paperless.models import DocumentType
 from paperless.models import Note
 from paperless.models import Tag
 from paperless.parsers import run_convert
+from paperless.settings import EXPORTER_ARCHIVE_NAME
+from paperless.settings import EXPORTER_CRYPTO_SETTINGS_NAME
+from paperless.settings import EXPORTER_FILE_NAME
+from paperless.settings import EXPORTER_THUMBNAIL_NAME
 from paperless.utils import copy_file_with_basic_stats
 
 if settings.AUDIT_LOG_ENABLED:
similarity index 92%
rename from src/documents/management/commands/document_index.py
rename to src/paperless/management/commands/document_index.py
index 08d5f4657f398380ae43453e3d5e80d97c659d2b..ac951bc625d9b3c22b389afd2c56c9a3dda9e338 100644 (file)
@@ -1,7 +1,7 @@
 from django.core.management import BaseCommand
 from django.db import transaction
 
-from documents.management.commands.mixins import ProgressBarMixin
+from paperless.management.commands.mixins import ProgressBarMixin
 from paperless.tasks import index_optimize
 from paperless.tasks import index_reindex
 
similarity index 92%
rename from src/documents/management/commands/document_renamer.py
rename to src/paperless/management/commands/document_renamer.py
index 76dcb69cbe798ef189093c000b1be50ffbf5d4f0..e561f2469b78439fba618ac849995e58106b7229 100644 (file)
@@ -4,7 +4,7 @@ import tqdm
 from django.core.management.base import BaseCommand
 from django.db.models.signals import post_save
 
-from documents.management.commands.mixins import ProgressBarMixin
+from paperless.management.commands.mixins import ProgressBarMixin
 from paperless.models import Document
 
 
similarity index 98%
rename from src/documents/management/commands/document_retagger.py
rename to src/paperless/management/commands/document_retagger.py
index 50bcf979b272630ee98a7e104f0dc28ea6c9d3b7..b89e4cd64edc697ba34793734dca1feb42a9fd34 100644 (file)
@@ -3,12 +3,12 @@ import logging
 import tqdm
 from django.core.management.base import BaseCommand
 
-from documents.management.commands.mixins import ProgressBarMixin
 from documents.signals.handlers import set_correspondent
 from documents.signals.handlers import set_document_type
 from documents.signals.handlers import set_storage_path
 from documents.signals.handlers import set_tags
 from paperless.classifier import load_classifier
+from paperless.management.commands.mixins import ProgressBarMixin
 from paperless.models import Document
 
 logger = logging.getLogger("paperless.management.retagger")
similarity index 88%
rename from src/documents/management/commands/document_sanity_checker.py
rename to src/paperless/management/commands/document_sanity_checker.py
index b634d4dc9ab5ae3a96f39db4c1f50f2b1530718c..88295445ca72f182833c4f0c21778ad1165a53a4 100644 (file)
@@ -1,7 +1,7 @@
 from django.core.management.base import BaseCommand
 
-from documents.management.commands.mixins import ProgressBarMixin
 from documents.sanity_checker import check_sanity
+from paperless.management.commands.mixins import ProgressBarMixin
 
 
 class Command(ProgressBarMixin, BaseCommand):
similarity index 95%
rename from src/documents/management/commands/document_thumbnails.py
rename to src/paperless/management/commands/document_thumbnails.py
index 3c1b7c542fccd53c18d10798a36582a185554f09..5ba2a4f4cdf1a1ed67734161a317df97aaeb49f3 100644 (file)
@@ -6,8 +6,8 @@ import tqdm
 from django import db
 from django.core.management.base import BaseCommand
 
-from documents.management.commands.mixins import MultiProcessMixin
-from documents.management.commands.mixins import ProgressBarMixin
+from paperless.management.commands.mixins import MultiProcessMixin
+from paperless.management.commands.mixins import ProgressBarMixin
 from paperless.models import Document
 from paperless.parsers import get_parser_class_for_mime_type
 
similarity index 95%
rename from src/documents/management/commands/prune_audit_logs.py
rename to src/paperless/management/commands/prune_audit_logs.py
index b49f4afc26f1fc33baedcfca49596de6897f1b43..dae16750580737365673f8e8a240f18209e629ab 100644 (file)
@@ -3,7 +3,7 @@ from django.core.management.base import BaseCommand
 from django.db import transaction
 from tqdm import tqdm
 
-from documents.management.commands.mixins import ProgressBarMixin
+from paperless.management.commands.mixins import ProgressBarMixin
 
 
 class Command(BaseCommand, ProgressBarMixin):