mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Squashed commit of the following:
commita4709b1175Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:36:13 2022 -0700 Update stale.yml [skip ci] commit3a031084f3Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:24:23 2022 -0700 Update changelog.md commit0c517e5351Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:18:49 2022 -0700 v1.8.0 version strings commit5fe435048bMerge:278cedf3a722bfd0Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:17:30 2022 -0700 Merge pull request #1240 from paperless-ngx/beta [Beta] Paperless-ngx v1.8.0 Release Candidate 1 commita722bfd099Author: Paperless-ngx Translation Bot [bot] <99855517+paperless-l10n@users.noreply.github.com> Date: Thu Jul 28 07:46:12 2022 -0700 New Crowdin updates (#1291) * New translations django.po (French) [ci skip] * New translations messages.xlf (French) [ci skip] * New translations django.po (French) [ci skip] * New translations messages.xlf (French) [ci skip] * New translations messages.xlf (Turkish) [ci skip] * New translations django.po (Turkish) [ci skip] commitf3d99a5fdbMerge:ca33477079de0989Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 11:21:42 2022 -0700 Merge pull request #1277 from paperless-ngx/fix/redo-ocr-button-on-edit Fix/feature: add redo ocr button to document edit view commit79de0989d5Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:54:05 2022 -0700 fix button icon spacing on mobile commitca334770b7Author: Paperless-ngx Translation Bot [bot] <99855517+paperless-l10n@users.noreply.github.com> Date: Tue Jul 26 09:45:21 2022 -0700 New Crowdin updates (#1242) * New translations messages.xlf (Turkish) [ci skip] * New translations messages.xlf (German) [ci skip] * New translations django.po (German) [ci skip] * New translations messages.xlf (Italian) [ci skip] * New translations messages.xlf (Italian) [ci skip] * New translations messages.xlf (Finnish) [ci skip] * New translations messages.xlf (Finnish) [ci skip] commit1071357505Merge:f32dfe02ef790ca6Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:44:42 2022 -0700 Merge pull request #1268 from paperless-ngx/bugfix-db-locked Bugfix: Adds configuration for database timeout, fixing database locked error commitf32dfe0278Merge:611707a34e78ca5dAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon Jul 25 12:59:31 2022 -0700 Merge pull request #1261 from paperless-ngx/fix/b1.8.0-ng-select-dropdowns Fix: dropdown selected items not visible again commit278cedf3d0Merge:b141671decc4553eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon Jul 25 09:25:52 2022 -0700 Merge pull request #1272 from paperless-ngx/fix-1263 Documentation: fix occasional code block color legibility commit45a6b5a436Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 20:15:26 2022 -0700 Add redo OCR button to document edit commit611707a3d1Merge:2d88638db4d20d9bAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 19:59:30 2022 -0700 Merge pull request #1276 from paperless-ngx/bugfix-webp-import Bugfix: Document import doesn't convert thumbnails to WebP commitb4d20d9b9aAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Sun Jul 24 10:22:53 2022 -0700 Fixes document import copying PNG files to .webp extensions without actual conversion commitecc4553e67Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 15:10:33 2022 -0700 fix occasional code block color legibility commitef790ca6f4Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 11:08:52 2022 -0700 Fixes the copy and paste of the log line commit2d88638da7Merge:0e2e5f3491ba0bd0Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 10:45:53 2022 -0700 Merge pull request #1269 from paperless-ngx/beta-deps-final Chore: Locks dependencies to the final versions for the beta commit91ba0bd0afAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 08:53:02 2022 -0700 Locks dependencies to the final versions for the beta commit0e2e5f3413Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 13:57:00 2022 -0700 Creates utiliy to ensure all paths in settings are normalized and absolute commit7a99dcf693Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Thu Jul 21 08:02:11 2022 -0700 Adds configuration for database timeout, documentation and troubleshotting suggestion commit4e78ca5d82Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 11:15:35 2022 -0700 remove merge error ng-select css commit83de38e56fMerge:f4be2e4fb1b6d50aAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 08:26:12 2022 -0700 Merge pull request #1247 from paperless-ngx/bugfix-pikepdf-ocrmypdf-warnings Bugfix: Adds pngquant and jbig2dec to Docker image commitf4be2e4fe7Merge:4444925d16b0f7f9Author: Quinn Casey <quinn@quinncasey.com> Date: Tue Jul 19 21:03:16 2022 -0700 Merge pull request #1259 from paperless-ngx/chore-add-ci-hadolint Chore: Add Hadolint job to CI commit16b0f7f9eeAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:18:47 2022 -0700 Removes a Dockerfile I can't find referenced anywhere commit27721aef71Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:01:47 2022 -0700 Fixes and updates the Hadolint action version commit329a317fdfAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 13:54:33 2022 -0700 Configure Hadolint in a single location for both hooks and CI commitdaad634894Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 15 13:45:23 2022 -0700 Adds a CI job for hadolint over all the Dockerfiles, fixes the minor thing it complained about commit4444925deaMerge:4c697ab59c1ae96dAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon Jul 18 15:55:29 2022 -0700 Merge pull request #1249 from paperless-ngx/fix-generated-changelog [CI] Fix automatic changelog generation on release commit9c1ae96d33Author: Quinn Casey <quinn@quinncasey.com> Date: Mon Jul 18 09:48:03 2022 -0700 Create PR for changelog instead of direct commit commitb1b6d50af6Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Mon Jul 18 09:46:31 2022 -0700 Adds a couple packages to the Docker image for ocrmypdf and pikepdf commit4c697ab50eAuthor: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 15:23:28 2022 -0700 Bump version to beta commitb141671d90Merge:48dfbbeb2ab2d912Author: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 13:18:57 2022 -0700 Merge pull request #1237 from tooomm/patch-1 chore: Run stale bot only on certain labels commit2ab2d9127dAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 15 20:19:28 2022 -0700 Use cant-reproduce for stale commit278453451eAuthor: tooomm <tooomm@users.noreply.github.com> Date: Fri Jul 15 21:18:38 2022 +0200 only run on certain labels commit48dfbbebc6Merge:8efb97efe568b300Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 3 07:42:20 2022 -0700 Merge pull request #1110 from paperless-ngx/update-issue-form commit8efb97ef4eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 19:06:32 2022 -0700 Update stale.yml [ci skip] commitd8cda7fc1bAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 17:51:39 2022 -0700 Use any-of-labels for stalebot [ci skip] commit68f0cf419bMerge:666b938526b12512Author: Felix E <felix@eckhofer.com> Date: Mon Jun 20 14:25:59 2022 +0200 Merge pull request #1148 from pReya/patch-1 fix: update scanner capability commit26b12512b1Author: Moritz Stückler <moritz.stueckler@gmail.com> Date: Mon Jun 20 12:06:54 2022 +0200 fix: update scanner capability The Brother ADS-A1700W does indeed support SFTP. I've just bought it, and set it up like this. commite568b3000eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jun 7 15:28:49 2022 -0700 Add lsio to issue form commit666b938550Merge:de5eaf1c163231d3Author: Quinn Casey <quinn@quinncasey.com> Date: Thu May 19 17:23:23 2022 -0700 Merge pull request #990 from tooomm/patch-2 Docs: Fix headings and add links to PRs in changelog commit163231d307Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 23:12:40 2022 +0200 Link issues, capitalization and minor fixes commite530750fc6Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 22:05:43 2022 +0200 update heading levels for v1.7.0
This commit is contained in:
		| @@ -3,6 +3,7 @@ import logging | ||||
| import os | ||||
| import shutil | ||||
| from contextlib import contextmanager | ||||
| from pathlib import Path | ||||
|  | ||||
| import tqdm | ||||
| from django.conf import settings | ||||
| @@ -14,6 +15,7 @@ from django.core.serializers.base import DeserializationError | ||||
| from django.db.models.signals import m2m_changed | ||||
| from django.db.models.signals import post_save | ||||
| from documents.models import Document | ||||
| from documents.parsers import run_convert | ||||
| from documents.settings import EXPORTER_ARCHIVE_NAME | ||||
| from documents.settings import EXPORTER_FILE_NAME | ||||
| from documents.settings import EXPORTER_THUMBNAIL_NAME | ||||
| @@ -192,7 +194,7 @@ class Command(BaseCommand): | ||||
|             document_path = os.path.join(self.source, doc_file) | ||||
|  | ||||
|             thumb_file = record[EXPORTER_THUMBNAIL_NAME] | ||||
|             thumbnail_path = os.path.join(self.source, thumb_file) | ||||
|             thumbnail_path = Path(os.path.join(self.source, thumb_file)).resolve() | ||||
|  | ||||
|             if EXPORTER_ARCHIVE_NAME in record: | ||||
|                 archive_file = record[EXPORTER_ARCHIVE_NAME] | ||||
| @@ -209,7 +211,20 @@ class Command(BaseCommand): | ||||
|                 create_source_path_directory(document.source_path) | ||||
|  | ||||
|                 shutil.copy2(document_path, document.source_path) | ||||
|                 shutil.copy2(thumbnail_path, document.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: | ||||
|                     shutil.copy2(thumbnail_path, document.thumbnail_path) | ||||
|                 if archive_path: | ||||
|                     create_source_path_directory(document.archive_path) | ||||
|                     # TODO: this assumes that the export is valid and | ||||
|   | ||||
| @@ -11,6 +11,7 @@ from django.contrib.contenttypes.models import ContentType | ||||
| from django.db import DatabaseError | ||||
| from django.db import models | ||||
| from django.db.models import Q | ||||
| from django.db.utils import OperationalError | ||||
| from django.dispatch import receiver | ||||
| from django.utils import termcolors | ||||
| from django.utils import timezone | ||||
| @@ -506,21 +507,28 @@ def add_to_index(sender, document, **kwargs): | ||||
| @receiver(django_q.signals.pre_enqueue) | ||||
| def init_paperless_task(sender, task, **kwargs): | ||||
|     if task["func"] == "documents.tasks.consume_file": | ||||
|         paperless_task, created = PaperlessTask.objects.get_or_create( | ||||
|             task_id=task["id"], | ||||
|         ) | ||||
|         paperless_task.name = task["name"] | ||||
|         paperless_task.created = task["started"] | ||||
|         paperless_task.save() | ||||
|         try: | ||||
|             paperless_task, created = PaperlessTask.objects.get_or_create( | ||||
|                 task_id=task["id"], | ||||
|             ) | ||||
|             paperless_task.name = task["name"] | ||||
|             paperless_task.created = task["started"] | ||||
|             paperless_task.save() | ||||
|         except OperationalError as e: | ||||
|             logger.error(f"Creating PaperlessTask failed: {e}") | ||||
|  | ||||
|  | ||||
| @receiver(django_q.signals.pre_execute) | ||||
| def paperless_task_started(sender, task, **kwargs): | ||||
|     try: | ||||
|         if task["func"] == "documents.tasks.consume_file": | ||||
|             paperless_task = PaperlessTask.objects.get(task_id=task["id"]) | ||||
|             paperless_task, created = PaperlessTask.objects.get_or_create( | ||||
|                 task_id=task["id"], | ||||
|             ) | ||||
|             paperless_task.started = timezone.now() | ||||
|             paperless_task.save() | ||||
|     except OperationalError as e: | ||||
|         logger.error(f"Creating PaperlessTask failed: {e}") | ||||
|     except PaperlessTask.DoesNotExist: | ||||
|         pass | ||||
|  | ||||
| @@ -529,8 +537,12 @@ def paperless_task_started(sender, task, **kwargs): | ||||
| def update_paperless_task(sender, instance, **kwargs): | ||||
|     try: | ||||
|         if instance.func == "documents.tasks.consume_file": | ||||
|             paperless_task = PaperlessTask.objects.get(task_id=instance.id) | ||||
|             paperless_task, created = PaperlessTask.objects.get_or_create( | ||||
|                 task_id=instance.id, | ||||
|             ) | ||||
|             paperless_task.attempted_task = instance | ||||
|             paperless_task.save() | ||||
|     except OperationalError as e: | ||||
|         logger.error(f"Creating PaperlessTask failed: {e}") | ||||
|     except PaperlessTask.DoesNotExist: | ||||
|         pass | ||||
|   | ||||
| @@ -3,7 +3,7 @@ msgstr "" | ||||
| "Project-Id-Version: paperless-ngx\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2022-07-08 14:11-0700\n" | ||||
| "PO-Revision-Date: 2022-07-08 22:07\n" | ||||
| "PO-Revision-Date: 2022-07-18 16:55\n" | ||||
| "Last-Translator: \n" | ||||
| "Language-Team: German\n" | ||||
| "Language: de_DE\n" | ||||
| @@ -376,7 +376,7 @@ msgstr "Filterregeln" | ||||
|  | ||||
| #: documents/models.py:521 | ||||
| msgid "started" | ||||
| msgstr "" | ||||
| msgstr "gestartet" | ||||
|  | ||||
| #: documents/serialisers.py:70 | ||||
| #, python-format | ||||
| @@ -654,7 +654,7 @@ msgstr "Als wichtig markieren, markierte E-Mails nicht verarbeiten" | ||||
|  | ||||
| #: paperless_mail/models.py:68 | ||||
| msgid "Tag the mail with specified tag, don't process tagged mails" | ||||
| msgstr "" | ||||
| msgstr "Markiere die Mail mit dem angegebenen Tag, verarbeite nicht markierte Mails" | ||||
|  | ||||
| #: paperless_mail/models.py:71 | ||||
| msgid "Use subject as title" | ||||
|   | ||||
| @@ -3,7 +3,7 @@ msgstr "" | ||||
| "Project-Id-Version: paperless-ngx\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2022-07-08 14:11-0700\n" | ||||
| "PO-Revision-Date: 2022-07-08 22:07\n" | ||||
| "PO-Revision-Date: 2022-07-27 17:57\n" | ||||
| "Last-Translator: \n" | ||||
| "Language-Team: French\n" | ||||
| "Language: fr_FR\n" | ||||
| @@ -100,15 +100,15 @@ msgstr "types de document" | ||||
|  | ||||
| #: documents/models.py:90 | ||||
| msgid "path" | ||||
| msgstr "" | ||||
| msgstr "chemin" | ||||
|  | ||||
| #: documents/models.py:96 documents/models.py:124 | ||||
| msgid "storage path" | ||||
| msgstr "" | ||||
| msgstr "chemin de stockage" | ||||
|  | ||||
| #: documents/models.py:97 | ||||
| msgid "storage paths" | ||||
| msgstr "" | ||||
| msgstr "chemins de stockage" | ||||
|  | ||||
| #: documents/models.py:105 | ||||
| msgid "Unencrypted" | ||||
| @@ -376,7 +376,7 @@ msgstr "règles de filtrage" | ||||
|  | ||||
| #: documents/models.py:521 | ||||
| msgid "started" | ||||
| msgstr "" | ||||
| msgstr "commencé" | ||||
|  | ||||
| #: documents/serialisers.py:70 | ||||
| #, python-format | ||||
| @@ -394,7 +394,7 @@ msgstr "Type de fichier %(type)s non pris en charge" | ||||
|  | ||||
| #: documents/serialisers.py:596 | ||||
| msgid "Invalid variable detected." | ||||
| msgstr "" | ||||
| msgstr "Variable invalide détectée." | ||||
|  | ||||
| #: documents/templates/index.html:78 | ||||
| msgid "Paperless-ngx is loading..." | ||||
| @@ -402,11 +402,11 @@ msgstr "Paperless-ngx est en cours de chargement..." | ||||
|  | ||||
| #: documents/templates/index.html:79 | ||||
| msgid "Still here?! Hmm, something might be wrong." | ||||
| msgstr "" | ||||
| msgstr "Toujours ici ? Hum, quelque chose a dû mal se passer." | ||||
|  | ||||
| #: documents/templates/index.html:79 | ||||
| msgid "Here's a link to the docs." | ||||
| msgstr "" | ||||
| msgstr "Voici un lien vers la documentation." | ||||
|  | ||||
| #: documents/templates/registration/logged_out.html:14 | ||||
| msgid "Paperless-ngx signed out" | ||||
| @@ -450,7 +450,7 @@ msgstr "Anglais (US)" | ||||
|  | ||||
| #: paperless/settings.py:340 | ||||
| msgid "Belarusian" | ||||
| msgstr "" | ||||
| msgstr "Biélorusse" | ||||
|  | ||||
| #: paperless/settings.py:341 | ||||
| msgid "Czech" | ||||
| @@ -510,11 +510,11 @@ msgstr "Russe" | ||||
|  | ||||
| #: paperless/settings.py:355 | ||||
| msgid "Slovenian" | ||||
| msgstr "" | ||||
| msgstr "Slovène" | ||||
|  | ||||
| #: paperless/settings.py:356 | ||||
| msgid "Serbian" | ||||
| msgstr "" | ||||
| msgstr "Serbe" | ||||
|  | ||||
| #: paperless/settings.py:357 | ||||
| msgid "Swedish" | ||||
| @@ -522,11 +522,11 @@ msgstr "Suédois" | ||||
|  | ||||
| #: paperless/settings.py:358 | ||||
| msgid "Turkish" | ||||
| msgstr "" | ||||
| msgstr "Turc" | ||||
|  | ||||
| #: paperless/settings.py:359 | ||||
| msgid "Chinese Simplified" | ||||
| msgstr "" | ||||
| msgstr "Chinois simplifié" | ||||
|  | ||||
| #: paperless/urls.py:161 | ||||
| msgid "Paperless-ngx administration" | ||||
| @@ -654,7 +654,7 @@ msgstr "Marquer le courriel, ne pas traiter les courriels marqués" | ||||
|  | ||||
| #: paperless_mail/models.py:68 | ||||
| msgid "Tag the mail with specified tag, don't process tagged mails" | ||||
| msgstr "" | ||||
| msgstr "Affecter l’étiquette spécifée au courrier, ne pas traiter les courriels étiquetés" | ||||
|  | ||||
| #: paperless_mail/models.py:71 | ||||
| msgid "Use subject as title" | ||||
| @@ -694,7 +694,7 @@ msgstr "répertoire" | ||||
|  | ||||
| #: paperless_mail/models.py:96 | ||||
| msgid "Subfolders must be separated by a delimiter, often a dot ('.') or slash ('/'), but it varies by mail server." | ||||
| msgstr "" | ||||
| msgstr "Les sous-dossiers doivent être séparés par un délimiteurs, souvent un point ('.') ou un slash ('/'), en fonction du serveur de messagerie." | ||||
|  | ||||
| #: paperless_mail/models.py:102 | ||||
| msgid "filter from" | ||||
|   | ||||
| @@ -3,7 +3,7 @@ msgstr "" | ||||
| "Project-Id-Version: paperless-ngx\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2022-07-08 14:11-0700\n" | ||||
| "PO-Revision-Date: 2022-07-08 22:07\n" | ||||
| "PO-Revision-Date: 2022-07-28 11:11\n" | ||||
| "Last-Translator: \n" | ||||
| "Language-Team: Turkish\n" | ||||
| "Language: tr_TR\n" | ||||
| @@ -80,7 +80,7 @@ msgstr "gelen kutu etiketidir" | ||||
|  | ||||
| #: documents/models.py:72 | ||||
| msgid "Marks this tag as an inbox tag: All newly consumed documents will be tagged with inbox tags." | ||||
| msgstr "Bu etiketi, gelen kutusu etiketi olarak işaretle: Tüm yeni olarak tüketilen dökümanlar gelen kutusu etiketi ile etiketlendirileceklerdir." | ||||
| msgstr "Bu etiketi, gelen kutusu etiketi olarak işaretle: Yeni aktarılan tüm dokümanlar gelen kutusu etiketi ile etiketlendirileceklerdir." | ||||
|  | ||||
| #: documents/models.py:78 | ||||
| msgid "tag" | ||||
| @@ -376,7 +376,7 @@ msgstr "filtreleme kuralları" | ||||
|  | ||||
| #: documents/models.py:521 | ||||
| msgid "started" | ||||
| msgstr "" | ||||
| msgstr "başladı" | ||||
|  | ||||
| #: documents/serialisers.py:70 | ||||
| #, python-format | ||||
| @@ -394,7 +394,7 @@ msgstr "Dosya türü %(type)s desteklenmiyor" | ||||
|  | ||||
| #: documents/serialisers.py:596 | ||||
| msgid "Invalid variable detected." | ||||
| msgstr "" | ||||
| msgstr "Geçersiz değişken algılandı." | ||||
|  | ||||
| #: documents/templates/index.html:78 | ||||
| msgid "Paperless-ngx is loading..." | ||||
| @@ -402,7 +402,7 @@ msgstr "Paperless-ngx yükleniyor..." | ||||
|  | ||||
| #: documents/templates/index.html:79 | ||||
| msgid "Still here?! Hmm, something might be wrong." | ||||
| msgstr "" | ||||
| msgstr "Hâlâ burada mısınız? Hmm, bir şeyler yanlış olabilir." | ||||
|  | ||||
| #: documents/templates/index.html:79 | ||||
| msgid "Here's a link to the docs." | ||||
| @@ -450,7 +450,7 @@ msgstr "İngilizce (Birleşik Devletler)" | ||||
|  | ||||
| #: paperless/settings.py:340 | ||||
| msgid "Belarusian" | ||||
| msgstr "" | ||||
| msgstr "Belarusça" | ||||
|  | ||||
| #: paperless/settings.py:341 | ||||
| msgid "Czech" | ||||
| @@ -510,11 +510,11 @@ msgstr "Rusça" | ||||
|  | ||||
| #: paperless/settings.py:355 | ||||
| msgid "Slovenian" | ||||
| msgstr "" | ||||
| msgstr "Slovakça" | ||||
|  | ||||
| #: paperless/settings.py:356 | ||||
| msgid "Serbian" | ||||
| msgstr "" | ||||
| msgstr "Sırpça" | ||||
|  | ||||
| #: paperless/settings.py:357 | ||||
| msgid "Swedish" | ||||
| @@ -522,11 +522,11 @@ msgstr "İsveççe" | ||||
|  | ||||
| #: paperless/settings.py:358 | ||||
| msgid "Turkish" | ||||
| msgstr "" | ||||
| msgstr "Türkçe" | ||||
|  | ||||
| #: paperless/settings.py:359 | ||||
| msgid "Chinese Simplified" | ||||
| msgstr "" | ||||
| msgstr "Basitleştirilmiş Çince" | ||||
|  | ||||
| #: paperless/urls.py:161 | ||||
| msgid "Paperless-ngx administration" | ||||
|   | ||||
| @@ -4,6 +4,7 @@ import math | ||||
| import multiprocessing | ||||
| import os | ||||
| import re | ||||
| import tempfile | ||||
| from typing import Final | ||||
| from typing import Optional | ||||
| from typing import Set | ||||
| @@ -56,6 +57,13 @@ def __get_float(key: str, default: float) -> float: | ||||
|     return float(os.getenv(key, default)) | ||||
|  | ||||
|  | ||||
| def __get_path(key: str, default: str) -> str: | ||||
|     """ | ||||
|     Return a normalized, absolute path based on the environment variable or a default | ||||
|     """ | ||||
|     return os.path.abspath(os.path.normpath(os.environ.get(key, default))) | ||||
|  | ||||
|  | ||||
| # NEVER RUN WITH DEBUG IN PRODUCTION. | ||||
| DEBUG = __get_boolean("PAPERLESS_DEBUG", "NO") | ||||
|  | ||||
| @@ -66,14 +74,14 @@ DEBUG = __get_boolean("PAPERLESS_DEBUG", "NO") | ||||
|  | ||||
| BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||||
|  | ||||
| STATIC_ROOT = os.getenv("PAPERLESS_STATICDIR", os.path.join(BASE_DIR, "..", "static")) | ||||
| STATIC_ROOT = __get_path("PAPERLESS_STATICDIR", os.path.join(BASE_DIR, "..", "static")) | ||||
|  | ||||
| MEDIA_ROOT = os.getenv("PAPERLESS_MEDIA_ROOT", os.path.join(BASE_DIR, "..", "media")) | ||||
| MEDIA_ROOT = __get_path("PAPERLESS_MEDIA_ROOT", os.path.join(BASE_DIR, "..", "media")) | ||||
| ORIGINALS_DIR = os.path.join(MEDIA_ROOT, "documents", "originals") | ||||
| ARCHIVE_DIR = os.path.join(MEDIA_ROOT, "documents", "archive") | ||||
| THUMBNAIL_DIR = os.path.join(MEDIA_ROOT, "documents", "thumbnails") | ||||
|  | ||||
| DATA_DIR = os.getenv("PAPERLESS_DATA_DIR", os.path.join(BASE_DIR, "..", "data")) | ||||
| DATA_DIR = __get_path("PAPERLESS_DATA_DIR", os.path.join(BASE_DIR, "..", "data")) | ||||
|  | ||||
| TRASH_DIR = os.getenv("PAPERLESS_TRASH_DIR") | ||||
|  | ||||
| @@ -83,15 +91,18 @@ MEDIA_LOCK = os.path.join(MEDIA_ROOT, "media.lock") | ||||
| INDEX_DIR = os.path.join(DATA_DIR, "index") | ||||
| MODEL_FILE = os.path.join(DATA_DIR, "classification_model.pickle") | ||||
|  | ||||
| LOGGING_DIR = os.getenv("PAPERLESS_LOGGING_DIR", os.path.join(DATA_DIR, "log")) | ||||
| LOGGING_DIR = __get_path("PAPERLESS_LOGGING_DIR", os.path.join(DATA_DIR, "log")) | ||||
|  | ||||
| CONSUMPTION_DIR = os.getenv( | ||||
| CONSUMPTION_DIR = __get_path( | ||||
|     "PAPERLESS_CONSUMPTION_DIR", | ||||
|     os.path.join(BASE_DIR, "..", "consume"), | ||||
| ) | ||||
|  | ||||
| # This will be created if it doesn't exist | ||||
| SCRATCH_DIR = os.getenv("PAPERLESS_SCRATCH_DIR", "/tmp/paperless") | ||||
| SCRATCH_DIR = __get_path( | ||||
|     "PAPERLESS_SCRATCH_DIR", | ||||
|     os.path.join(tempfile.gettempdir(), "paperless"), | ||||
| ) | ||||
|  | ||||
| ############################################################################### | ||||
| # Application Definition                                                      # | ||||
| @@ -327,6 +338,13 @@ if os.getenv("PAPERLESS_DBHOST"): | ||||
|     if os.getenv("PAPERLESS_DBPORT"): | ||||
|         DATABASES["default"]["PORT"] = os.getenv("PAPERLESS_DBPORT") | ||||
|  | ||||
| if os.getenv("PAPERLESS_DB_TIMEOUT") is not None: | ||||
|     _new_opts = {"timeout": float(os.getenv("PAPERLESS_DB_TIMEOUT"))} | ||||
|     if "OPTIONS" in DATABASES["default"]: | ||||
|         DATABASES["default"]["OPTIONS"].update(_new_opts) | ||||
|     else: | ||||
|         DATABASES["default"]["OPTIONS"] = _new_opts | ||||
|  | ||||
| DEFAULT_AUTO_FIELD = "django.db.models.AutoField" | ||||
|  | ||||
| ############################################################################### | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| from typing import Final | ||||
| from typing import Tuple | ||||
|  | ||||
| __version__: Final[Tuple[int, int, int]] = (1, 7, 1) | ||||
| __version__: Final[Tuple[int, int, int]] = (1, 8, 0) | ||||
| # Version string like X.Y.Z | ||||
| __full_version_str__: Final[str] = ".".join(map(str, __version__)) | ||||
| # Version string like X.Y | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Michael Shamoon
					Michael Shamoon