A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Chore: Remove some further old items (encryption passphrase and PNG handling) (#12290)
Trenton H63cb75564e25
diff --git a/scripts/post-consumption-example.sh b/scripts/post-consumption-example.shindex fbcd0b4cf..00517321a 100755--- a/scripts/post-consumption-example.sh+++ b/scripts/post-consumption-example.sh@@ -19,6 +19,4 @@ following additional information about it:* Correspondent: ${DOCUMENT_CORRESPONDENT}* Tags: ${DOCUMENT_TAGS}-It was consumed with the passphrase ${PASSPHRASE}-"diff --git a/src/documents/management/commands/document_importer.py b/src/documents/management/commands/document_importer.pyindex fd6941213..20d50e41b 100644--- a/src/documents/management/commands/document_importer.py+++ b/src/documents/management/commands/document_importer.py@@ -33,7 +33,6 @@ from documents.models import Documentfrom documents.models import DocumentTypefrom documents.models import Notefrom documents.models import Tag-from documents.parsers import run_convertfrom documents.settings import EXPORTER_ARCHIVE_NAMEfrom documents.settings import EXPORTER_CRYPTO_SETTINGS_NAMEfrom documents.settings import EXPORTER_FILE_NAME@@ -403,22 +402,10 @@ class Command(CryptMixin, PaperlessCommand):copy_file_with_basic_stats(document_path, document.source_path)if thumbnail_path:- if thumbnail_path.suffix in {".png", ".PNG"}:- run_convert(- density=300,- scale="500x5000>",- alpha="remove",- strip=True,- trim=False,- auto_orient=True,- input_file=f"{thumbnail_path}[0]",- output_file=str(document.thumbnail_path),- )- else:- copy_file_with_basic_stats(- thumbnail_path,- document.thumbnail_path,- )+ copy_file_with_basic_stats(+ thumbnail_path,+ document.thumbnail_path,+ )if archive_path:create_source_path_directory(document.archive_path)diff --git a/src/documents/management/commands/loaddata_stdin.py b/src/documents/management/commands/loaddata_stdin.pydeleted file mode 100644index f6feb2e8d..000000000--- a/src/documents/management/commands/loaddata_stdin.py+++ /dev/null@@ -1,22 +0,0 @@-import sys--from django.core.management.commands.loaddata import Command as LoadDataCommand---# This class is used to migrate data between databases-# That's difficult to test-class Command(LoadDataCommand): # pragma: no cover- """- Allow the loading of data from standard in. Sourced originally from:- https://gist.github.com/bmispelon/ad5a2c333443b3a1d051 (MIT licensed)- """-- def parse_name(self, fixture_name):- self.compression_formats["stdin"] = (lambda x, y: sys.stdin, None)- if fixture_name == "-":- return "-", "json", "stdin"-- def find_fixtures(self, fixture_label):- if fixture_label == "-":- return [("-", None, "-")]- return super().find_fixtures(fixture_label)diff --git a/src/documents/tests/test_management_exporter.py b/src/documents/tests/test_management_exporter.pyindex fb41bfa07..6cd8cd729 100644--- a/src/documents/tests/test_management_exporter.py+++ b/src/documents/tests/test_management_exporter.py@@ -147,7 +147,6 @@ class TestExportImport(else:raise ValueError(f"document with id {id} does not exist in manifest")- @override_settings(PASSPHRASE="test")def _do_export(self,*,@@ -441,7 +440,6 @@ class TestExportImport()self.assertRaises(FileNotFoundError, call_command, "document_exporter", target)- @override_settings(PASSPHRASE="test")def test_export_zipped(self) -> None:"""GIVEN:@@ -473,7 +471,6 @@ class TestExportImport(self.assertIn("manifest.json", zip.namelist())self.assertIn("metadata.json", zip.namelist())- @override_settings(PASSPHRASE="test")def test_export_zipped_format(self) -> None:"""GIVEN:@@ -510,7 +507,6 @@ class TestExportImport(self.assertIn("manifest.json", zip.namelist())self.assertIn("metadata.json", zip.namelist())- @override_settings(PASSPHRASE="test")def test_export_zipped_with_delete(self) -> None:"""GIVEN: