From b21ff75a3076e7eb6901339b1f1d1d9bb5094e1e Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 23 Jan 2026 21:50:01 -0800 Subject: [PATCH] Run importer --- src/paperless_migration/settings.py | 1 + .../paperless_migration/migration_home.html | 16 +-- src/paperless_migration/urls.py | 1 + src/paperless_migration/views.py | 104 +++++++++++++++++- 4 files changed, 109 insertions(+), 13 deletions(-) diff --git a/src/paperless_migration/settings.py b/src/paperless_migration/settings.py index 316a1be20..4228760dd 100644 --- a/src/paperless_migration/settings.py +++ b/src/paperless_migration/settings.py @@ -201,6 +201,7 @@ MIGRATION_TRANSFORMED_PATH = __get_path( "PAPERLESS_MIGRATION_TRANSFORMED_PATH", EXPORT_DIR / "manifest.v3.json", ) +MIGRATION_IMPORTED_PATH = Path(EXPORT_DIR / "import.completed").resolve() # One-time access code required for migration logins; stable across autoreload _code = os.getenv("PAPERLESS_MIGRATION_ACCESS_CODE") diff --git a/src/paperless_migration/templates/paperless_migration/migration_home.html b/src/paperless_migration/templates/paperless_migration/migration_home.html index ae5cf8805..200da714e 100644 --- a/src/paperless_migration/templates/paperless_migration/migration_home.html +++ b/src/paperless_migration/templates/paperless_migration/migration_home.html @@ -81,7 +81,7 @@ left: 0; top: 0; bottom: 0; - width: calc({{ export_exists|yesno:'33,0' }}% + {{ transformed_exists|yesno:'33,0' }}%); + width: calc({{ export_exists|yesno:'33,0' }}% + {{ transformed_exists|yesno:'33,0' }}% + {{ imported_exists|yesno:'34,0' }}%); max-width: 100%; background: linear-gradient(90deg, #17541f, #2c7a3c); border-radius: 999px; @@ -143,7 +143,7 @@
Step 3
@@ -253,7 +253,7 @@ type="submit" name="action" value="import" - {% if not transformed_exists %}disabled aria-disabled="true"{% endif %} + {% if not transformed_exists or imported_exists %}disabled aria-disabled="true"{% endif %} > Import transformed data @@ -289,19 +289,21 @@