paperless-ngx/src/paperless/settings.py

670 lines
23 KiB
Python
Raw Normal View History

import datetime
import json
2020-11-16 18:26:54 +01:00
import math
2020-11-02 21:59:36 +01:00
import multiprocessing
2015-12-20 19:23:33 +00:00
import os
import re
Squashed commit of the following: commit a4709b1175f730a3091907040b4d60b72e1f4cd1 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:36:13 2022 -0700 Update stale.yml [skip ci] commit 3a031084f3f9542458c872daf66cea14fd7948de Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:24:23 2022 -0700 Update changelog.md commit 0c517e535146dc1ada8f8fa83a591e260b236ec6 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:18:49 2022 -0700 v1.8.0 version strings commit 5fe435048bc6eb77f9473afc11588427846456ab Merge: 278cedf3 a722bfd0 Author: 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 commit a722bfd09994c1adb820aa41460024fbbf8ad08c Author: 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] commit f3d99a5fdbc9362721e821f85944c906d33c97df Merge: ca334770 79de0989 Author: 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 commit 79de0989d544f16394f24a99d520aef4232e5184 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:54:05 2022 -0700 fix button icon spacing on mobile commit ca334770b705de3907c4396441b0d93bfd6c05da Author: 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] commit 10713575059044abab24ba94cc2429d87528775e Merge: f32dfe02 ef790ca6 Author: 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 commit f32dfe0278c4af1ba93d6f0c4756e30f5183daa6 Merge: 611707a3 4e78ca5d Author: 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 commit 278cedf3d01628ae7f1776f49f5cf48274a09b4c Merge: b141671d ecc4553e Author: 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 commit 45a6b5a43676d8e62b09c37594e01ad98c432fba Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 20:15:26 2022 -0700 Add redo OCR button to document edit commit 611707a3d177836bd586b0fe667a71883cf7ff92 Merge: 2d88638d b4d20d9b Author: 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 commit b4d20d9b9a4f1ff3cb90945dbbcf321e6f84c6ea Author: 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 commit ecc4553e673440d18f68d88c8579ef4f53f4dc80 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 15:10:33 2022 -0700 fix occasional code block color legibility commit ef790ca6f4336095610a3fca2a4ad6507c26455e Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 11:08:52 2022 -0700 Fixes the copy and paste of the log line commit 2d88638da7e144413085f29c2e9ba714648b9d69 Merge: 0e2e5f34 91ba0bd0 Author: 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 commit 91ba0bd0af089e59157305ea23331c8b86bd8644 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 08:53:02 2022 -0700 Locks dependencies to the final versions for the beta commit 0e2e5f3413ba265ac209ec9e755702671e47f30a Author: 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 commit 7a99dcf69309a464648db39e59498a97715238c4 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Thu Jul 21 08:02:11 2022 -0700 Adds configuration for database timeout, documentation and troubleshotting suggestion commit 4e78ca5d82cb9b047639d92e0692436434d3a556 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 11:15:35 2022 -0700 remove merge error ng-select css commit 83de38e56f5019fe506c52dbae1f9f5b6e81afc4 Merge: f4be2e4f b1b6d50a Author: 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 commit f4be2e4fe77f8340b1b2dffa29b0ad609bfca86a Merge: 4444925d 16b0f7f9 Author: 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 commit 16b0f7f9ee96a5fdf3c1c989dba0db9279bc907c Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:18:47 2022 -0700 Removes a Dockerfile I can't find referenced anywhere commit 27721aef71529e133487294e79585bc2c8f6f451 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:01:47 2022 -0700 Fixes and updates the Hadolint action version commit 329a317fdf04ce905b9e3bfcbefb7e3a21f04659 Author: 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 commit daad634894831b410b9348587ffdde389bf72ae2 Author: 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 commit 4444925dea6ebac6a972cb94076bc08c15ab94c2 Merge: 4c697ab5 9c1ae96d Author: 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 commit 9c1ae96d336b499355cb5053516a36daa60983a0 Author: Quinn Casey <quinn@quinncasey.com> Date: Mon Jul 18 09:48:03 2022 -0700 Create PR for changelog instead of direct commit commit b1b6d50af602f2d52a2557fb921f36367e9be38c Author: 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 commit 4c697ab50e3a4ecc92291659c9ca93921421d61d Author: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 15:23:28 2022 -0700 Bump version to beta commit b141671d908204dc05d1fdf3c5cad1f325f3e7a3 Merge: 48dfbbeb 2ab2d912 Author: 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 commit 2ab2d9127df146910130591b541258c3bb6cd4c4 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 15 20:19:28 2022 -0700 Use cant-reproduce for stale commit 278453451ec49366f993a7b9cce22a3dcaab5f1d Author: tooomm <tooomm@users.noreply.github.com> Date: Fri Jul 15 21:18:38 2022 +0200 only run on certain labels commit 48dfbbebc654464026b0137c635262073c417292 Merge: 8efb97ef e568b300 Author: 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 commit 8efb97ef4ebfad8690c32ac9e4ae0b328b1c13e1 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 19:06:32 2022 -0700 Update stale.yml [ci skip] commit d8cda7fc1b878c43ae10733f6b807c13d50239e9 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 17:51:39 2022 -0700 Use any-of-labels for stalebot [ci skip] commit 68f0cf419b54b2487647db84941dfb9233e54580 Merge: 666b9385 26b12512 Author: 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 commit 26b12512b1fd25dba7e1180bcf1dbf70b66b8dba Author: 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. commit e568b3000e9304c1aa1febfd6ab6749fc59e09a3 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jun 7 15:28:49 2022 -0700 Add lsio to issue form commit 666b938550963d136a4f2274cafc0d8d14993761 Merge: de5eaf1c 163231d3 Author: 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 commit 163231d3076562da4079a13842b5e13cd7470611 Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 23:12:40 2022 +0200 Link issues, capitalization and minor fixes commit e530750fc6e405bf3a37981d9da8dbb0d33c840a Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 22:05:43 2022 +0200 update heading levels for v1.7.0
2022-07-28 15:36:24 -07:00
import tempfile
from typing import Final
from typing import Optional
from typing import Set
from urllib.parse import urlparse
2015-12-20 19:23:33 +00:00
2021-02-06 17:05:07 +01:00
from concurrent_log_handler.queue import setup_logging_queues
from django.utils.translation import gettext_lazy as _
from dotenv import load_dotenv
# Tap paperless.conf if it's available
2020-10-27 01:09:50 +01:00
if os.path.exists("../paperless.conf"):
load_dotenv("../paperless.conf")
elif os.path.exists("/etc/paperless.conf"):
load_dotenv("/etc/paperless.conf")
elif os.path.exists("/usr/local/etc/paperless.conf"):
load_dotenv("/usr/local/etc/paperless.conf")
2020-11-12 10:01:22 +01:00
# There are multiple levels of concurrency in paperless:
# - Multiple consumers may be run in parallel.
# - Each consumer may process multiple pages in parallel.
# - Each Tesseract OCR run may spawn multiple threads to process a single page
# slightly faster.
# The performance gains from having tesseract use multiple threads are minimal.
# However, when multiple pages are processed in parallel, the total number of
# OCR threads may exceed the number of available cpu cores, which will
# dramatically slow down the consumption process. This settings limits each
# Tesseract process to one thread.
2022-02-27 15:26:41 +01:00
os.environ["OMP_THREAD_LIMIT"] = "1"
def __get_boolean(key: str, default: str = "NO") -> bool:
"""
Return a boolean value based on whatever the user has supplied in the
environment based on whether the value "looks like" it's True or not.
"""
2018-09-12 16:25:23 +02:00
return bool(os.getenv(key, default).lower() in ("yes", "y", "1", "t", "true"))
2020-11-12 21:09:45 +01:00
def __get_int(key: str, default: int) -> int:
"""
Return an integer value based on the environment variable or a default
"""
return int(os.getenv(key, default))
def __get_float(key: str, default: float) -> float:
"""
Return an integer value based on the environment variable or a default
"""
return float(os.getenv(key, default))
Squashed commit of the following: commit a4709b1175f730a3091907040b4d60b72e1f4cd1 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:36:13 2022 -0700 Update stale.yml [skip ci] commit 3a031084f3f9542458c872daf66cea14fd7948de Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:24:23 2022 -0700 Update changelog.md commit 0c517e535146dc1ada8f8fa83a591e260b236ec6 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:18:49 2022 -0700 v1.8.0 version strings commit 5fe435048bc6eb77f9473afc11588427846456ab Merge: 278cedf3 a722bfd0 Author: 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 commit a722bfd09994c1adb820aa41460024fbbf8ad08c Author: 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] commit f3d99a5fdbc9362721e821f85944c906d33c97df Merge: ca334770 79de0989 Author: 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 commit 79de0989d544f16394f24a99d520aef4232e5184 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:54:05 2022 -0700 fix button icon spacing on mobile commit ca334770b705de3907c4396441b0d93bfd6c05da Author: 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] commit 10713575059044abab24ba94cc2429d87528775e Merge: f32dfe02 ef790ca6 Author: 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 commit f32dfe0278c4af1ba93d6f0c4756e30f5183daa6 Merge: 611707a3 4e78ca5d Author: 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 commit 278cedf3d01628ae7f1776f49f5cf48274a09b4c Merge: b141671d ecc4553e Author: 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 commit 45a6b5a43676d8e62b09c37594e01ad98c432fba Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 20:15:26 2022 -0700 Add redo OCR button to document edit commit 611707a3d177836bd586b0fe667a71883cf7ff92 Merge: 2d88638d b4d20d9b Author: 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 commit b4d20d9b9a4f1ff3cb90945dbbcf321e6f84c6ea Author: 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 commit ecc4553e673440d18f68d88c8579ef4f53f4dc80 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 15:10:33 2022 -0700 fix occasional code block color legibility commit ef790ca6f4336095610a3fca2a4ad6507c26455e Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 11:08:52 2022 -0700 Fixes the copy and paste of the log line commit 2d88638da7e144413085f29c2e9ba714648b9d69 Merge: 0e2e5f34 91ba0bd0 Author: 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 commit 91ba0bd0af089e59157305ea23331c8b86bd8644 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 08:53:02 2022 -0700 Locks dependencies to the final versions for the beta commit 0e2e5f3413ba265ac209ec9e755702671e47f30a Author: 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 commit 7a99dcf69309a464648db39e59498a97715238c4 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Thu Jul 21 08:02:11 2022 -0700 Adds configuration for database timeout, documentation and troubleshotting suggestion commit 4e78ca5d82cb9b047639d92e0692436434d3a556 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 11:15:35 2022 -0700 remove merge error ng-select css commit 83de38e56f5019fe506c52dbae1f9f5b6e81afc4 Merge: f4be2e4f b1b6d50a Author: 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 commit f4be2e4fe77f8340b1b2dffa29b0ad609bfca86a Merge: 4444925d 16b0f7f9 Author: 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 commit 16b0f7f9ee96a5fdf3c1c989dba0db9279bc907c Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:18:47 2022 -0700 Removes a Dockerfile I can't find referenced anywhere commit 27721aef71529e133487294e79585bc2c8f6f451 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:01:47 2022 -0700 Fixes and updates the Hadolint action version commit 329a317fdf04ce905b9e3bfcbefb7e3a21f04659 Author: 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 commit daad634894831b410b9348587ffdde389bf72ae2 Author: 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 commit 4444925dea6ebac6a972cb94076bc08c15ab94c2 Merge: 4c697ab5 9c1ae96d Author: 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 commit 9c1ae96d336b499355cb5053516a36daa60983a0 Author: Quinn Casey <quinn@quinncasey.com> Date: Mon Jul 18 09:48:03 2022 -0700 Create PR for changelog instead of direct commit commit b1b6d50af602f2d52a2557fb921f36367e9be38c Author: 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 commit 4c697ab50e3a4ecc92291659c9ca93921421d61d Author: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 15:23:28 2022 -0700 Bump version to beta commit b141671d908204dc05d1fdf3c5cad1f325f3e7a3 Merge: 48dfbbeb 2ab2d912 Author: 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 commit 2ab2d9127df146910130591b541258c3bb6cd4c4 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 15 20:19:28 2022 -0700 Use cant-reproduce for stale commit 278453451ec49366f993a7b9cce22a3dcaab5f1d Author: tooomm <tooomm@users.noreply.github.com> Date: Fri Jul 15 21:18:38 2022 +0200 only run on certain labels commit 48dfbbebc654464026b0137c635262073c417292 Merge: 8efb97ef e568b300 Author: 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 commit 8efb97ef4ebfad8690c32ac9e4ae0b328b1c13e1 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 19:06:32 2022 -0700 Update stale.yml [ci skip] commit d8cda7fc1b878c43ae10733f6b807c13d50239e9 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 17:51:39 2022 -0700 Use any-of-labels for stalebot [ci skip] commit 68f0cf419b54b2487647db84941dfb9233e54580 Merge: 666b9385 26b12512 Author: 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 commit 26b12512b1fd25dba7e1180bcf1dbf70b66b8dba Author: 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. commit e568b3000e9304c1aa1febfd6ab6749fc59e09a3 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jun 7 15:28:49 2022 -0700 Add lsio to issue form commit 666b938550963d136a4f2274cafc0d8d14993761 Merge: de5eaf1c 163231d3 Author: 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 commit 163231d3076562da4079a13842b5e13cd7470611 Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 23:12:40 2022 +0200 Link issues, capitalization and minor fixes commit e530750fc6e405bf3a37981d9da8dbb0d33c840a Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 22:05:43 2022 +0200 update heading levels for v1.7.0
2022-07-28 15:36:24 -07:00
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")
2020-11-12 21:09:45 +01:00
2020-11-02 21:59:36 +01:00
###############################################################################
# Directories #
###############################################################################
2015-12-20 19:23:33 +00:00
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Squashed commit of the following: commit a4709b1175f730a3091907040b4d60b72e1f4cd1 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:36:13 2022 -0700 Update stale.yml [skip ci] commit 3a031084f3f9542458c872daf66cea14fd7948de Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:24:23 2022 -0700 Update changelog.md commit 0c517e535146dc1ada8f8fa83a591e260b236ec6 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:18:49 2022 -0700 v1.8.0 version strings commit 5fe435048bc6eb77f9473afc11588427846456ab Merge: 278cedf3 a722bfd0 Author: 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 commit a722bfd09994c1adb820aa41460024fbbf8ad08c Author: 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] commit f3d99a5fdbc9362721e821f85944c906d33c97df Merge: ca334770 79de0989 Author: 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 commit 79de0989d544f16394f24a99d520aef4232e5184 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:54:05 2022 -0700 fix button icon spacing on mobile commit ca334770b705de3907c4396441b0d93bfd6c05da Author: 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] commit 10713575059044abab24ba94cc2429d87528775e Merge: f32dfe02 ef790ca6 Author: 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 commit f32dfe0278c4af1ba93d6f0c4756e30f5183daa6 Merge: 611707a3 4e78ca5d Author: 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 commit 278cedf3d01628ae7f1776f49f5cf48274a09b4c Merge: b141671d ecc4553e Author: 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 commit 45a6b5a43676d8e62b09c37594e01ad98c432fba Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 20:15:26 2022 -0700 Add redo OCR button to document edit commit 611707a3d177836bd586b0fe667a71883cf7ff92 Merge: 2d88638d b4d20d9b Author: 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 commit b4d20d9b9a4f1ff3cb90945dbbcf321e6f84c6ea Author: 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 commit ecc4553e673440d18f68d88c8579ef4f53f4dc80 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 15:10:33 2022 -0700 fix occasional code block color legibility commit ef790ca6f4336095610a3fca2a4ad6507c26455e Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 11:08:52 2022 -0700 Fixes the copy and paste of the log line commit 2d88638da7e144413085f29c2e9ba714648b9d69 Merge: 0e2e5f34 91ba0bd0 Author: 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 commit 91ba0bd0af089e59157305ea23331c8b86bd8644 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 08:53:02 2022 -0700 Locks dependencies to the final versions for the beta commit 0e2e5f3413ba265ac209ec9e755702671e47f30a Author: 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 commit 7a99dcf69309a464648db39e59498a97715238c4 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Thu Jul 21 08:02:11 2022 -0700 Adds configuration for database timeout, documentation and troubleshotting suggestion commit 4e78ca5d82cb9b047639d92e0692436434d3a556 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 11:15:35 2022 -0700 remove merge error ng-select css commit 83de38e56f5019fe506c52dbae1f9f5b6e81afc4 Merge: f4be2e4f b1b6d50a Author: 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 commit f4be2e4fe77f8340b1b2dffa29b0ad609bfca86a Merge: 4444925d 16b0f7f9 Author: 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 commit 16b0f7f9ee96a5fdf3c1c989dba0db9279bc907c Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:18:47 2022 -0700 Removes a Dockerfile I can't find referenced anywhere commit 27721aef71529e133487294e79585bc2c8f6f451 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:01:47 2022 -0700 Fixes and updates the Hadolint action version commit 329a317fdf04ce905b9e3bfcbefb7e3a21f04659 Author: 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 commit daad634894831b410b9348587ffdde389bf72ae2 Author: 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 commit 4444925dea6ebac6a972cb94076bc08c15ab94c2 Merge: 4c697ab5 9c1ae96d Author: 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 commit 9c1ae96d336b499355cb5053516a36daa60983a0 Author: Quinn Casey <quinn@quinncasey.com> Date: Mon Jul 18 09:48:03 2022 -0700 Create PR for changelog instead of direct commit commit b1b6d50af602f2d52a2557fb921f36367e9be38c Author: 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 commit 4c697ab50e3a4ecc92291659c9ca93921421d61d Author: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 15:23:28 2022 -0700 Bump version to beta commit b141671d908204dc05d1fdf3c5cad1f325f3e7a3 Merge: 48dfbbeb 2ab2d912 Author: 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 commit 2ab2d9127df146910130591b541258c3bb6cd4c4 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 15 20:19:28 2022 -0700 Use cant-reproduce for stale commit 278453451ec49366f993a7b9cce22a3dcaab5f1d Author: tooomm <tooomm@users.noreply.github.com> Date: Fri Jul 15 21:18:38 2022 +0200 only run on certain labels commit 48dfbbebc654464026b0137c635262073c417292 Merge: 8efb97ef e568b300 Author: 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 commit 8efb97ef4ebfad8690c32ac9e4ae0b328b1c13e1 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 19:06:32 2022 -0700 Update stale.yml [ci skip] commit d8cda7fc1b878c43ae10733f6b807c13d50239e9 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 17:51:39 2022 -0700 Use any-of-labels for stalebot [ci skip] commit 68f0cf419b54b2487647db84941dfb9233e54580 Merge: 666b9385 26b12512 Author: 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 commit 26b12512b1fd25dba7e1180bcf1dbf70b66b8dba Author: 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. commit e568b3000e9304c1aa1febfd6ab6749fc59e09a3 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jun 7 15:28:49 2022 -0700 Add lsio to issue form commit 666b938550963d136a4f2274cafc0d8d14993761 Merge: de5eaf1c 163231d3 Author: 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 commit 163231d3076562da4079a13842b5e13cd7470611 Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 23:12:40 2022 +0200 Link issues, capitalization and minor fixes commit e530750fc6e405bf3a37981d9da8dbb0d33c840a Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 22:05:43 2022 +0200 update heading levels for v1.7.0
2022-07-28 15:36:24 -07:00
STATIC_ROOT = __get_path("PAPERLESS_STATICDIR", os.path.join(BASE_DIR, "..", "static"))
2020-10-26 00:35:24 +01:00
Squashed commit of the following: commit a4709b1175f730a3091907040b4d60b72e1f4cd1 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:36:13 2022 -0700 Update stale.yml [skip ci] commit 3a031084f3f9542458c872daf66cea14fd7948de Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:24:23 2022 -0700 Update changelog.md commit 0c517e535146dc1ada8f8fa83a591e260b236ec6 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:18:49 2022 -0700 v1.8.0 version strings commit 5fe435048bc6eb77f9473afc11588427846456ab Merge: 278cedf3 a722bfd0 Author: 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 commit a722bfd09994c1adb820aa41460024fbbf8ad08c Author: 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] commit f3d99a5fdbc9362721e821f85944c906d33c97df Merge: ca334770 79de0989 Author: 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 commit 79de0989d544f16394f24a99d520aef4232e5184 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:54:05 2022 -0700 fix button icon spacing on mobile commit ca334770b705de3907c4396441b0d93bfd6c05da Author: 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] commit 10713575059044abab24ba94cc2429d87528775e Merge: f32dfe02 ef790ca6 Author: 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 commit f32dfe0278c4af1ba93d6f0c4756e30f5183daa6 Merge: 611707a3 4e78ca5d Author: 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 commit 278cedf3d01628ae7f1776f49f5cf48274a09b4c Merge: b141671d ecc4553e Author: 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 commit 45a6b5a43676d8e62b09c37594e01ad98c432fba Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 20:15:26 2022 -0700 Add redo OCR button to document edit commit 611707a3d177836bd586b0fe667a71883cf7ff92 Merge: 2d88638d b4d20d9b Author: 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 commit b4d20d9b9a4f1ff3cb90945dbbcf321e6f84c6ea Author: 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 commit ecc4553e673440d18f68d88c8579ef4f53f4dc80 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 15:10:33 2022 -0700 fix occasional code block color legibility commit ef790ca6f4336095610a3fca2a4ad6507c26455e Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 11:08:52 2022 -0700 Fixes the copy and paste of the log line commit 2d88638da7e144413085f29c2e9ba714648b9d69 Merge: 0e2e5f34 91ba0bd0 Author: 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 commit 91ba0bd0af089e59157305ea23331c8b86bd8644 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 08:53:02 2022 -0700 Locks dependencies to the final versions for the beta commit 0e2e5f3413ba265ac209ec9e755702671e47f30a Author: 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 commit 7a99dcf69309a464648db39e59498a97715238c4 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Thu Jul 21 08:02:11 2022 -0700 Adds configuration for database timeout, documentation and troubleshotting suggestion commit 4e78ca5d82cb9b047639d92e0692436434d3a556 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 11:15:35 2022 -0700 remove merge error ng-select css commit 83de38e56f5019fe506c52dbae1f9f5b6e81afc4 Merge: f4be2e4f b1b6d50a Author: 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 commit f4be2e4fe77f8340b1b2dffa29b0ad609bfca86a Merge: 4444925d 16b0f7f9 Author: 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 commit 16b0f7f9ee96a5fdf3c1c989dba0db9279bc907c Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:18:47 2022 -0700 Removes a Dockerfile I can't find referenced anywhere commit 27721aef71529e133487294e79585bc2c8f6f451 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:01:47 2022 -0700 Fixes and updates the Hadolint action version commit 329a317fdf04ce905b9e3bfcbefb7e3a21f04659 Author: 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 commit daad634894831b410b9348587ffdde389bf72ae2 Author: 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 commit 4444925dea6ebac6a972cb94076bc08c15ab94c2 Merge: 4c697ab5 9c1ae96d Author: 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 commit 9c1ae96d336b499355cb5053516a36daa60983a0 Author: Quinn Casey <quinn@quinncasey.com> Date: Mon Jul 18 09:48:03 2022 -0700 Create PR for changelog instead of direct commit commit b1b6d50af602f2d52a2557fb921f36367e9be38c Author: 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 commit 4c697ab50e3a4ecc92291659c9ca93921421d61d Author: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 15:23:28 2022 -0700 Bump version to beta commit b141671d908204dc05d1fdf3c5cad1f325f3e7a3 Merge: 48dfbbeb 2ab2d912 Author: 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 commit 2ab2d9127df146910130591b541258c3bb6cd4c4 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 15 20:19:28 2022 -0700 Use cant-reproduce for stale commit 278453451ec49366f993a7b9cce22a3dcaab5f1d Author: tooomm <tooomm@users.noreply.github.com> Date: Fri Jul 15 21:18:38 2022 +0200 only run on certain labels commit 48dfbbebc654464026b0137c635262073c417292 Merge: 8efb97ef e568b300 Author: 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 commit 8efb97ef4ebfad8690c32ac9e4ae0b328b1c13e1 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 19:06:32 2022 -0700 Update stale.yml [ci skip] commit d8cda7fc1b878c43ae10733f6b807c13d50239e9 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 17:51:39 2022 -0700 Use any-of-labels for stalebot [ci skip] commit 68f0cf419b54b2487647db84941dfb9233e54580 Merge: 666b9385 26b12512 Author: 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 commit 26b12512b1fd25dba7e1180bcf1dbf70b66b8dba Author: 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. commit e568b3000e9304c1aa1febfd6ab6749fc59e09a3 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jun 7 15:28:49 2022 -0700 Add lsio to issue form commit 666b938550963d136a4f2274cafc0d8d14993761 Merge: de5eaf1c 163231d3 Author: 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 commit 163231d3076562da4079a13842b5e13cd7470611 Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 23:12:40 2022 +0200 Link issues, capitalization and minor fixes commit e530750fc6e405bf3a37981d9da8dbb0d33c840a Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 22:05:43 2022 +0200 update heading levels for v1.7.0
2022-07-28 15:36:24 -07:00
MEDIA_ROOT = __get_path("PAPERLESS_MEDIA_ROOT", os.path.join(BASE_DIR, "..", "media"))
ORIGINALS_DIR = os.path.join(MEDIA_ROOT, "documents", "originals")
2020-11-25 14:45:21 +01:00
ARCHIVE_DIR = os.path.join(MEDIA_ROOT, "documents", "archive")
THUMBNAIL_DIR = os.path.join(MEDIA_ROOT, "documents", "thumbnails")
Squashed commit of the following: commit a4709b1175f730a3091907040b4d60b72e1f4cd1 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:36:13 2022 -0700 Update stale.yml [skip ci] commit 3a031084f3f9542458c872daf66cea14fd7948de Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:24:23 2022 -0700 Update changelog.md commit 0c517e535146dc1ada8f8fa83a591e260b236ec6 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:18:49 2022 -0700 v1.8.0 version strings commit 5fe435048bc6eb77f9473afc11588427846456ab Merge: 278cedf3 a722bfd0 Author: 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 commit a722bfd09994c1adb820aa41460024fbbf8ad08c Author: 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] commit f3d99a5fdbc9362721e821f85944c906d33c97df Merge: ca334770 79de0989 Author: 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 commit 79de0989d544f16394f24a99d520aef4232e5184 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:54:05 2022 -0700 fix button icon spacing on mobile commit ca334770b705de3907c4396441b0d93bfd6c05da Author: 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] commit 10713575059044abab24ba94cc2429d87528775e Merge: f32dfe02 ef790ca6 Author: 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 commit f32dfe0278c4af1ba93d6f0c4756e30f5183daa6 Merge: 611707a3 4e78ca5d Author: 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 commit 278cedf3d01628ae7f1776f49f5cf48274a09b4c Merge: b141671d ecc4553e Author: 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 commit 45a6b5a43676d8e62b09c37594e01ad98c432fba Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 20:15:26 2022 -0700 Add redo OCR button to document edit commit 611707a3d177836bd586b0fe667a71883cf7ff92 Merge: 2d88638d b4d20d9b Author: 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 commit b4d20d9b9a4f1ff3cb90945dbbcf321e6f84c6ea Author: 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 commit ecc4553e673440d18f68d88c8579ef4f53f4dc80 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 15:10:33 2022 -0700 fix occasional code block color legibility commit ef790ca6f4336095610a3fca2a4ad6507c26455e Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 11:08:52 2022 -0700 Fixes the copy and paste of the log line commit 2d88638da7e144413085f29c2e9ba714648b9d69 Merge: 0e2e5f34 91ba0bd0 Author: 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 commit 91ba0bd0af089e59157305ea23331c8b86bd8644 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 08:53:02 2022 -0700 Locks dependencies to the final versions for the beta commit 0e2e5f3413ba265ac209ec9e755702671e47f30a Author: 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 commit 7a99dcf69309a464648db39e59498a97715238c4 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Thu Jul 21 08:02:11 2022 -0700 Adds configuration for database timeout, documentation and troubleshotting suggestion commit 4e78ca5d82cb9b047639d92e0692436434d3a556 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 11:15:35 2022 -0700 remove merge error ng-select css commit 83de38e56f5019fe506c52dbae1f9f5b6e81afc4 Merge: f4be2e4f b1b6d50a Author: 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 commit f4be2e4fe77f8340b1b2dffa29b0ad609bfca86a Merge: 4444925d 16b0f7f9 Author: 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 commit 16b0f7f9ee96a5fdf3c1c989dba0db9279bc907c Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:18:47 2022 -0700 Removes a Dockerfile I can't find referenced anywhere commit 27721aef71529e133487294e79585bc2c8f6f451 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:01:47 2022 -0700 Fixes and updates the Hadolint action version commit 329a317fdf04ce905b9e3bfcbefb7e3a21f04659 Author: 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 commit daad634894831b410b9348587ffdde389bf72ae2 Author: 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 commit 4444925dea6ebac6a972cb94076bc08c15ab94c2 Merge: 4c697ab5 9c1ae96d Author: 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 commit 9c1ae96d336b499355cb5053516a36daa60983a0 Author: Quinn Casey <quinn@quinncasey.com> Date: Mon Jul 18 09:48:03 2022 -0700 Create PR for changelog instead of direct commit commit b1b6d50af602f2d52a2557fb921f36367e9be38c Author: 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 commit 4c697ab50e3a4ecc92291659c9ca93921421d61d Author: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 15:23:28 2022 -0700 Bump version to beta commit b141671d908204dc05d1fdf3c5cad1f325f3e7a3 Merge: 48dfbbeb 2ab2d912 Author: 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 commit 2ab2d9127df146910130591b541258c3bb6cd4c4 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 15 20:19:28 2022 -0700 Use cant-reproduce for stale commit 278453451ec49366f993a7b9cce22a3dcaab5f1d Author: tooomm <tooomm@users.noreply.github.com> Date: Fri Jul 15 21:18:38 2022 +0200 only run on certain labels commit 48dfbbebc654464026b0137c635262073c417292 Merge: 8efb97ef e568b300 Author: 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 commit 8efb97ef4ebfad8690c32ac9e4ae0b328b1c13e1 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 19:06:32 2022 -0700 Update stale.yml [ci skip] commit d8cda7fc1b878c43ae10733f6b807c13d50239e9 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 17:51:39 2022 -0700 Use any-of-labels for stalebot [ci skip] commit 68f0cf419b54b2487647db84941dfb9233e54580 Merge: 666b9385 26b12512 Author: 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 commit 26b12512b1fd25dba7e1180bcf1dbf70b66b8dba Author: 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. commit e568b3000e9304c1aa1febfd6ab6749fc59e09a3 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jun 7 15:28:49 2022 -0700 Add lsio to issue form commit 666b938550963d136a4f2274cafc0d8d14993761 Merge: de5eaf1c 163231d3 Author: 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 commit 163231d3076562da4079a13842b5e13cd7470611 Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 23:12:40 2022 +0200 Link issues, capitalization and minor fixes commit e530750fc6e405bf3a37981d9da8dbb0d33c840a Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 22:05:43 2022 +0200 update heading levels for v1.7.0
2022-07-28 15:36:24 -07:00
DATA_DIR = __get_path("PAPERLESS_DATA_DIR", os.path.join(BASE_DIR, "..", "data"))
2020-12-08 13:54:35 +01:00
2022-02-27 15:26:41 +01:00
TRASH_DIR = os.getenv("PAPERLESS_TRASH_DIR")
2020-12-08 13:54:35 +01:00
# Lock file for synchronizing changes to the MEDIA directory across multiple
# threads.
MEDIA_LOCK = os.path.join(MEDIA_ROOT, "media.lock")
2020-11-02 21:59:36 +01:00
INDEX_DIR = os.path.join(DATA_DIR, "index")
MODEL_FILE = os.path.join(DATA_DIR, "classification_model.pickle")
Squashed commit of the following: commit a4709b1175f730a3091907040b4d60b72e1f4cd1 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:36:13 2022 -0700 Update stale.yml [skip ci] commit 3a031084f3f9542458c872daf66cea14fd7948de Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:24:23 2022 -0700 Update changelog.md commit 0c517e535146dc1ada8f8fa83a591e260b236ec6 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:18:49 2022 -0700 v1.8.0 version strings commit 5fe435048bc6eb77f9473afc11588427846456ab Merge: 278cedf3 a722bfd0 Author: 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 commit a722bfd09994c1adb820aa41460024fbbf8ad08c Author: 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] commit f3d99a5fdbc9362721e821f85944c906d33c97df Merge: ca334770 79de0989 Author: 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 commit 79de0989d544f16394f24a99d520aef4232e5184 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:54:05 2022 -0700 fix button icon spacing on mobile commit ca334770b705de3907c4396441b0d93bfd6c05da Author: 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] commit 10713575059044abab24ba94cc2429d87528775e Merge: f32dfe02 ef790ca6 Author: 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 commit f32dfe0278c4af1ba93d6f0c4756e30f5183daa6 Merge: 611707a3 4e78ca5d Author: 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 commit 278cedf3d01628ae7f1776f49f5cf48274a09b4c Merge: b141671d ecc4553e Author: 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 commit 45a6b5a43676d8e62b09c37594e01ad98c432fba Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 20:15:26 2022 -0700 Add redo OCR button to document edit commit 611707a3d177836bd586b0fe667a71883cf7ff92 Merge: 2d88638d b4d20d9b Author: 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 commit b4d20d9b9a4f1ff3cb90945dbbcf321e6f84c6ea Author: 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 commit ecc4553e673440d18f68d88c8579ef4f53f4dc80 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 15:10:33 2022 -0700 fix occasional code block color legibility commit ef790ca6f4336095610a3fca2a4ad6507c26455e Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 11:08:52 2022 -0700 Fixes the copy and paste of the log line commit 2d88638da7e144413085f29c2e9ba714648b9d69 Merge: 0e2e5f34 91ba0bd0 Author: 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 commit 91ba0bd0af089e59157305ea23331c8b86bd8644 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 08:53:02 2022 -0700 Locks dependencies to the final versions for the beta commit 0e2e5f3413ba265ac209ec9e755702671e47f30a Author: 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 commit 7a99dcf69309a464648db39e59498a97715238c4 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Thu Jul 21 08:02:11 2022 -0700 Adds configuration for database timeout, documentation and troubleshotting suggestion commit 4e78ca5d82cb9b047639d92e0692436434d3a556 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 11:15:35 2022 -0700 remove merge error ng-select css commit 83de38e56f5019fe506c52dbae1f9f5b6e81afc4 Merge: f4be2e4f b1b6d50a Author: 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 commit f4be2e4fe77f8340b1b2dffa29b0ad609bfca86a Merge: 4444925d 16b0f7f9 Author: 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 commit 16b0f7f9ee96a5fdf3c1c989dba0db9279bc907c Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:18:47 2022 -0700 Removes a Dockerfile I can't find referenced anywhere commit 27721aef71529e133487294e79585bc2c8f6f451 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:01:47 2022 -0700 Fixes and updates the Hadolint action version commit 329a317fdf04ce905b9e3bfcbefb7e3a21f04659 Author: 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 commit daad634894831b410b9348587ffdde389bf72ae2 Author: 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 commit 4444925dea6ebac6a972cb94076bc08c15ab94c2 Merge: 4c697ab5 9c1ae96d Author: 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 commit 9c1ae96d336b499355cb5053516a36daa60983a0 Author: Quinn Casey <quinn@quinncasey.com> Date: Mon Jul 18 09:48:03 2022 -0700 Create PR for changelog instead of direct commit commit b1b6d50af602f2d52a2557fb921f36367e9be38c Author: 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 commit 4c697ab50e3a4ecc92291659c9ca93921421d61d Author: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 15:23:28 2022 -0700 Bump version to beta commit b141671d908204dc05d1fdf3c5cad1f325f3e7a3 Merge: 48dfbbeb 2ab2d912 Author: 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 commit 2ab2d9127df146910130591b541258c3bb6cd4c4 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 15 20:19:28 2022 -0700 Use cant-reproduce for stale commit 278453451ec49366f993a7b9cce22a3dcaab5f1d Author: tooomm <tooomm@users.noreply.github.com> Date: Fri Jul 15 21:18:38 2022 +0200 only run on certain labels commit 48dfbbebc654464026b0137c635262073c417292 Merge: 8efb97ef e568b300 Author: 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 commit 8efb97ef4ebfad8690c32ac9e4ae0b328b1c13e1 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 19:06:32 2022 -0700 Update stale.yml [ci skip] commit d8cda7fc1b878c43ae10733f6b807c13d50239e9 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 17:51:39 2022 -0700 Use any-of-labels for stalebot [ci skip] commit 68f0cf419b54b2487647db84941dfb9233e54580 Merge: 666b9385 26b12512 Author: 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 commit 26b12512b1fd25dba7e1180bcf1dbf70b66b8dba Author: 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. commit e568b3000e9304c1aa1febfd6ab6749fc59e09a3 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jun 7 15:28:49 2022 -0700 Add lsio to issue form commit 666b938550963d136a4f2274cafc0d8d14993761 Merge: de5eaf1c 163231d3 Author: 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 commit 163231d3076562da4079a13842b5e13cd7470611 Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 23:12:40 2022 +0200 Link issues, capitalization and minor fixes commit e530750fc6e405bf3a37981d9da8dbb0d33c840a Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 22:05:43 2022 +0200 update heading levels for v1.7.0
2022-07-28 15:36:24 -07:00
LOGGING_DIR = __get_path("PAPERLESS_LOGGING_DIR", os.path.join(DATA_DIR, "log"))
2021-02-06 17:05:07 +01:00
Squashed commit of the following: commit a4709b1175f730a3091907040b4d60b72e1f4cd1 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:36:13 2022 -0700 Update stale.yml [skip ci] commit 3a031084f3f9542458c872daf66cea14fd7948de Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:24:23 2022 -0700 Update changelog.md commit 0c517e535146dc1ada8f8fa83a591e260b236ec6 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:18:49 2022 -0700 v1.8.0 version strings commit 5fe435048bc6eb77f9473afc11588427846456ab Merge: 278cedf3 a722bfd0 Author: 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 commit a722bfd09994c1adb820aa41460024fbbf8ad08c Author: 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] commit f3d99a5fdbc9362721e821f85944c906d33c97df Merge: ca334770 79de0989 Author: 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 commit 79de0989d544f16394f24a99d520aef4232e5184 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:54:05 2022 -0700 fix button icon spacing on mobile commit ca334770b705de3907c4396441b0d93bfd6c05da Author: 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] commit 10713575059044abab24ba94cc2429d87528775e Merge: f32dfe02 ef790ca6 Author: 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 commit f32dfe0278c4af1ba93d6f0c4756e30f5183daa6 Merge: 611707a3 4e78ca5d Author: 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 commit 278cedf3d01628ae7f1776f49f5cf48274a09b4c Merge: b141671d ecc4553e Author: 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 commit 45a6b5a43676d8e62b09c37594e01ad98c432fba Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 20:15:26 2022 -0700 Add redo OCR button to document edit commit 611707a3d177836bd586b0fe667a71883cf7ff92 Merge: 2d88638d b4d20d9b Author: 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 commit b4d20d9b9a4f1ff3cb90945dbbcf321e6f84c6ea Author: 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 commit ecc4553e673440d18f68d88c8579ef4f53f4dc80 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 15:10:33 2022 -0700 fix occasional code block color legibility commit ef790ca6f4336095610a3fca2a4ad6507c26455e Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 11:08:52 2022 -0700 Fixes the copy and paste of the log line commit 2d88638da7e144413085f29c2e9ba714648b9d69 Merge: 0e2e5f34 91ba0bd0 Author: 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 commit 91ba0bd0af089e59157305ea23331c8b86bd8644 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 08:53:02 2022 -0700 Locks dependencies to the final versions for the beta commit 0e2e5f3413ba265ac209ec9e755702671e47f30a Author: 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 commit 7a99dcf69309a464648db39e59498a97715238c4 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Thu Jul 21 08:02:11 2022 -0700 Adds configuration for database timeout, documentation and troubleshotting suggestion commit 4e78ca5d82cb9b047639d92e0692436434d3a556 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 11:15:35 2022 -0700 remove merge error ng-select css commit 83de38e56f5019fe506c52dbae1f9f5b6e81afc4 Merge: f4be2e4f b1b6d50a Author: 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 commit f4be2e4fe77f8340b1b2dffa29b0ad609bfca86a Merge: 4444925d 16b0f7f9 Author: 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 commit 16b0f7f9ee96a5fdf3c1c989dba0db9279bc907c Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:18:47 2022 -0700 Removes a Dockerfile I can't find referenced anywhere commit 27721aef71529e133487294e79585bc2c8f6f451 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:01:47 2022 -0700 Fixes and updates the Hadolint action version commit 329a317fdf04ce905b9e3bfcbefb7e3a21f04659 Author: 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 commit daad634894831b410b9348587ffdde389bf72ae2 Author: 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 commit 4444925dea6ebac6a972cb94076bc08c15ab94c2 Merge: 4c697ab5 9c1ae96d Author: 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 commit 9c1ae96d336b499355cb5053516a36daa60983a0 Author: Quinn Casey <quinn@quinncasey.com> Date: Mon Jul 18 09:48:03 2022 -0700 Create PR for changelog instead of direct commit commit b1b6d50af602f2d52a2557fb921f36367e9be38c Author: 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 commit 4c697ab50e3a4ecc92291659c9ca93921421d61d Author: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 15:23:28 2022 -0700 Bump version to beta commit b141671d908204dc05d1fdf3c5cad1f325f3e7a3 Merge: 48dfbbeb 2ab2d912 Author: 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 commit 2ab2d9127df146910130591b541258c3bb6cd4c4 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 15 20:19:28 2022 -0700 Use cant-reproduce for stale commit 278453451ec49366f993a7b9cce22a3dcaab5f1d Author: tooomm <tooomm@users.noreply.github.com> Date: Fri Jul 15 21:18:38 2022 +0200 only run on certain labels commit 48dfbbebc654464026b0137c635262073c417292 Merge: 8efb97ef e568b300 Author: 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 commit 8efb97ef4ebfad8690c32ac9e4ae0b328b1c13e1 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 19:06:32 2022 -0700 Update stale.yml [ci skip] commit d8cda7fc1b878c43ae10733f6b807c13d50239e9 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 17:51:39 2022 -0700 Use any-of-labels for stalebot [ci skip] commit 68f0cf419b54b2487647db84941dfb9233e54580 Merge: 666b9385 26b12512 Author: 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 commit 26b12512b1fd25dba7e1180bcf1dbf70b66b8dba Author: 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. commit e568b3000e9304c1aa1febfd6ab6749fc59e09a3 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jun 7 15:28:49 2022 -0700 Add lsio to issue form commit 666b938550963d136a4f2274cafc0d8d14993761 Merge: de5eaf1c 163231d3 Author: 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 commit 163231d3076562da4079a13842b5e13cd7470611 Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 23:12:40 2022 +0200 Link issues, capitalization and minor fixes commit e530750fc6e405bf3a37981d9da8dbb0d33c840a Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 22:05:43 2022 +0200 update heading levels for v1.7.0
2022-07-28 15:36:24 -07:00
CONSUMPTION_DIR = __get_path(
"PAPERLESS_CONSUMPTION_DIR",
os.path.join(BASE_DIR, "..", "consume"),
2022-02-27 15:26:41 +01:00
)
# This will be created if it doesn't exist
Squashed commit of the following: commit a4709b1175f730a3091907040b4d60b72e1f4cd1 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:36:13 2022 -0700 Update stale.yml [skip ci] commit 3a031084f3f9542458c872daf66cea14fd7948de Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:24:23 2022 -0700 Update changelog.md commit 0c517e535146dc1ada8f8fa83a591e260b236ec6 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:18:49 2022 -0700 v1.8.0 version strings commit 5fe435048bc6eb77f9473afc11588427846456ab Merge: 278cedf3 a722bfd0 Author: 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 commit a722bfd09994c1adb820aa41460024fbbf8ad08c Author: 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] commit f3d99a5fdbc9362721e821f85944c906d33c97df Merge: ca334770 79de0989 Author: 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 commit 79de0989d544f16394f24a99d520aef4232e5184 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:54:05 2022 -0700 fix button icon spacing on mobile commit ca334770b705de3907c4396441b0d93bfd6c05da Author: 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] commit 10713575059044abab24ba94cc2429d87528775e Merge: f32dfe02 ef790ca6 Author: 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 commit f32dfe0278c4af1ba93d6f0c4756e30f5183daa6 Merge: 611707a3 4e78ca5d Author: 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 commit 278cedf3d01628ae7f1776f49f5cf48274a09b4c Merge: b141671d ecc4553e Author: 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 commit 45a6b5a43676d8e62b09c37594e01ad98c432fba Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 20:15:26 2022 -0700 Add redo OCR button to document edit commit 611707a3d177836bd586b0fe667a71883cf7ff92 Merge: 2d88638d b4d20d9b Author: 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 commit b4d20d9b9a4f1ff3cb90945dbbcf321e6f84c6ea Author: 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 commit ecc4553e673440d18f68d88c8579ef4f53f4dc80 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 15:10:33 2022 -0700 fix occasional code block color legibility commit ef790ca6f4336095610a3fca2a4ad6507c26455e Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 11:08:52 2022 -0700 Fixes the copy and paste of the log line commit 2d88638da7e144413085f29c2e9ba714648b9d69 Merge: 0e2e5f34 91ba0bd0 Author: 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 commit 91ba0bd0af089e59157305ea23331c8b86bd8644 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 08:53:02 2022 -0700 Locks dependencies to the final versions for the beta commit 0e2e5f3413ba265ac209ec9e755702671e47f30a Author: 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 commit 7a99dcf69309a464648db39e59498a97715238c4 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Thu Jul 21 08:02:11 2022 -0700 Adds configuration for database timeout, documentation and troubleshotting suggestion commit 4e78ca5d82cb9b047639d92e0692436434d3a556 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 11:15:35 2022 -0700 remove merge error ng-select css commit 83de38e56f5019fe506c52dbae1f9f5b6e81afc4 Merge: f4be2e4f b1b6d50a Author: 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 commit f4be2e4fe77f8340b1b2dffa29b0ad609bfca86a Merge: 4444925d 16b0f7f9 Author: 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 commit 16b0f7f9ee96a5fdf3c1c989dba0db9279bc907c Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:18:47 2022 -0700 Removes a Dockerfile I can't find referenced anywhere commit 27721aef71529e133487294e79585bc2c8f6f451 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:01:47 2022 -0700 Fixes and updates the Hadolint action version commit 329a317fdf04ce905b9e3bfcbefb7e3a21f04659 Author: 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 commit daad634894831b410b9348587ffdde389bf72ae2 Author: 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 commit 4444925dea6ebac6a972cb94076bc08c15ab94c2 Merge: 4c697ab5 9c1ae96d Author: 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 commit 9c1ae96d336b499355cb5053516a36daa60983a0 Author: Quinn Casey <quinn@quinncasey.com> Date: Mon Jul 18 09:48:03 2022 -0700 Create PR for changelog instead of direct commit commit b1b6d50af602f2d52a2557fb921f36367e9be38c Author: 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 commit 4c697ab50e3a4ecc92291659c9ca93921421d61d Author: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 15:23:28 2022 -0700 Bump version to beta commit b141671d908204dc05d1fdf3c5cad1f325f3e7a3 Merge: 48dfbbeb 2ab2d912 Author: 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 commit 2ab2d9127df146910130591b541258c3bb6cd4c4 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 15 20:19:28 2022 -0700 Use cant-reproduce for stale commit 278453451ec49366f993a7b9cce22a3dcaab5f1d Author: tooomm <tooomm@users.noreply.github.com> Date: Fri Jul 15 21:18:38 2022 +0200 only run on certain labels commit 48dfbbebc654464026b0137c635262073c417292 Merge: 8efb97ef e568b300 Author: 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 commit 8efb97ef4ebfad8690c32ac9e4ae0b328b1c13e1 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 19:06:32 2022 -0700 Update stale.yml [ci skip] commit d8cda7fc1b878c43ae10733f6b807c13d50239e9 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 17:51:39 2022 -0700 Use any-of-labels for stalebot [ci skip] commit 68f0cf419b54b2487647db84941dfb9233e54580 Merge: 666b9385 26b12512 Author: 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 commit 26b12512b1fd25dba7e1180bcf1dbf70b66b8dba Author: 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. commit e568b3000e9304c1aa1febfd6ab6749fc59e09a3 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jun 7 15:28:49 2022 -0700 Add lsio to issue form commit 666b938550963d136a4f2274cafc0d8d14993761 Merge: de5eaf1c 163231d3 Author: 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 commit 163231d3076562da4079a13842b5e13cd7470611 Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 23:12:40 2022 +0200 Link issues, capitalization and minor fixes commit e530750fc6e405bf3a37981d9da8dbb0d33c840a Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 22:05:43 2022 +0200 update heading levels for v1.7.0
2022-07-28 15:36:24 -07:00
SCRATCH_DIR = __get_path(
"PAPERLESS_SCRATCH_DIR",
os.path.join(tempfile.gettempdir(), "paperless"),
)
2020-11-02 21:59:36 +01:00
###############################################################################
# Application Definition #
###############################################################################
2015-12-20 19:23:33 +00:00
2020-12-28 22:37:53 +01:00
env_apps = os.getenv("PAPERLESS_APPS").split(",") if os.getenv("PAPERLESS_APPS") else []
2015-12-20 19:23:33 +00:00
INSTALLED_APPS = [
2020-10-27 01:09:50 +01:00
"whitenoise.runserver_nostatic",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"corsheaders",
2015-12-20 19:23:33 +00:00
"django_extensions",
"paperless",
"documents.apps.DocumentsConfig",
"paperless_tesseract.apps.PaperlessTesseractConfig",
2018-08-30 23:32:41 -04:00
"paperless_text.apps.PaperlessTextConfig",
"paperless_mail.apps.PaperlessMailConfig",
"django.contrib.admin",
2016-02-16 09:28:34 +00:00
"rest_framework",
"rest_framework.authtoken",
2018-12-11 12:26:44 +01:00
"django_filters",
"django_q",
] + env_apps
2015-12-20 19:23:33 +00:00
if DEBUG:
INSTALLED_APPS.append("channels")
REST_FRAMEWORK = {
2022-02-27 15:26:41 +01:00
"DEFAULT_AUTHENTICATION_CLASSES": [
"rest_framework.authentication.BasicAuthentication",
"rest_framework.authentication.SessionAuthentication",
"rest_framework.authentication.TokenAuthentication",
2021-02-24 22:27:43 +01:00
],
2022-02-27 15:26:41 +01:00
"DEFAULT_VERSIONING_CLASS": "rest_framework.versioning.AcceptHeaderVersioning",
"DEFAULT_VERSION": "1",
2021-02-26 11:13:28 +01:00
# Make sure these are ordered and that the most recent version appears
# last
2022-02-27 15:26:41 +01:00
"ALLOWED_VERSIONS": ["1", "2"],
}
if DEBUG:
2022-02-27 15:26:41 +01:00
REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"].append(
"paperless.auth.AngularApiAuthenticationOverride",
)
2018-07-04 17:03:59 +02:00
MIDDLEWARE = [
2022-02-27 15:26:41 +01:00
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"corsheaders.middleware.CorsMiddleware",
"django.middleware.locale.LocaleMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"paperless.middleware.ApiVersionMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
2015-12-20 19:23:33 +00:00
]
2022-02-27 15:26:41 +01:00
ROOT_URLCONF = "paperless.urls"
2020-11-02 21:59:36 +01:00
FORCE_SCRIPT_NAME = os.getenv("PAPERLESS_FORCE_SCRIPT_NAME")
BASE_URL = (FORCE_SCRIPT_NAME or "") + "/"
LOGIN_URL = BASE_URL + "accounts/login/"
LOGOUT_REDIRECT_URL = os.getenv("PAPERLESS_LOGOUT_REDIRECT_URL")
2022-02-27 15:26:41 +01:00
WSGI_APPLICATION = "paperless.wsgi.application"
ASGI_APPLICATION = "paperless.asgi.application"
2020-11-02 21:59:36 +01:00
STATIC_URL = os.getenv("PAPERLESS_STATIC_URL", BASE_URL + "static/")
WHITENOISE_STATIC_PREFIX = "/static/"
2015-12-20 19:23:33 +00:00
2021-02-24 22:27:43 +01:00
# TODO: what is this used for?
2015-12-20 19:23:33 +00:00
TEMPLATES = [
{
2022-02-27 15:26:41 +01:00
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
2015-12-20 19:23:33 +00:00
],
},
},
]
2020-11-20 10:58:17 +01:00
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",
"CONFIG": {
2021-01-27 20:08:09 +01:00
"hosts": [os.getenv("PAPERLESS_REDIS", "redis://localhost:6379")],
"capacity": 2000, # default 100
"expiry": 15, # default 60
2020-11-20 10:58:17 +01:00
},
},
}
2020-11-02 21:59:36 +01:00
###############################################################################
# Security #
###############################################################################
2015-12-20 19:23:33 +00:00
AUTO_LOGIN_USERNAME = os.getenv("PAPERLESS_AUTO_LOGIN_USERNAME")
if AUTO_LOGIN_USERNAME:
2022-02-27 15:26:41 +01:00
_index = MIDDLEWARE.index("django.contrib.auth.middleware.AuthenticationMiddleware")
# This overrides everything the auth middleware is doing but still allows
# regular login in case the provided user does not exist.
2022-02-27 15:26:41 +01:00
MIDDLEWARE.insert(_index + 1, "paperless.auth.AutoLoginMiddleware")
2021-01-06 16:53:58 +01:00
ENABLE_HTTP_REMOTE_USER = __get_boolean("PAPERLESS_ENABLE_HTTP_REMOTE_USER")
2022-02-27 15:26:41 +01:00
HTTP_REMOTE_USER_HEADER_NAME = os.getenv(
"PAPERLESS_HTTP_REMOTE_USER_HEADER_NAME",
"HTTP_REMOTE_USER",
2022-02-27 15:26:41 +01:00
)
2021-01-06 16:53:58 +01:00
if ENABLE_HTTP_REMOTE_USER:
2022-02-27 15:26:41 +01:00
MIDDLEWARE.append("paperless.auth.HttpRemoteUserMiddleware")
2021-01-06 16:53:58 +01:00
AUTHENTICATION_BACKENDS = [
2022-02-27 15:26:41 +01:00
"django.contrib.auth.backends.RemoteUserBackend",
"django.contrib.auth.backends.ModelBackend",
2021-01-06 16:53:58 +01:00
]
2022-02-27 15:26:41 +01:00
REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"].append(
"rest_framework.authentication.RemoteUserAuthentication",
2021-01-06 16:53:58 +01:00
)
# X-Frame options for embedded PDF display:
if DEBUG:
2022-02-27 15:26:41 +01:00
X_FRAME_OPTIONS = "ANY"
else:
2022-02-27 15:26:41 +01:00
X_FRAME_OPTIONS = "SAMEORIGIN"
# The next 3 settings can also be set using just PAPERLESS_URL
_csrf_origins = os.getenv("PAPERLESS_CSRF_TRUSTED_ORIGINS")
if _csrf_origins:
CSRF_TRUSTED_ORIGINS = _csrf_origins.split(",")
else:
CSRF_TRUSTED_ORIGINS = []
# We allow CORS from localhost:8000
2022-02-27 15:26:41 +01:00
CORS_ALLOWED_ORIGINS = tuple(
os.getenv("PAPERLESS_CORS_ALLOWED_HOSTS", "http://localhost:8000").split(","),
2022-02-27 15:26:41 +01:00
)
2020-11-02 21:59:36 +01:00
if DEBUG:
# Allow access from the angular development server during debugging
2022-02-27 15:26:41 +01:00
CORS_ALLOWED_ORIGINS += ("http://localhost:4200",)
2020-11-02 21:59:36 +01:00
_allowed_hosts = os.getenv("PAPERLESS_ALLOWED_HOSTS")
if _allowed_hosts:
ALLOWED_HOSTS = _allowed_hosts.split(",")
else:
ALLOWED_HOSTS = ["*"]
_paperless_url = os.getenv("PAPERLESS_URL")
if _paperless_url:
_paperless_uri = urlparse(_paperless_url)
CSRF_TRUSTED_ORIGINS.append(_paperless_url)
CORS_ALLOWED_ORIGINS += (_paperless_url,)
if _allowed_hosts:
ALLOWED_HOSTS.append(_paperless_uri.hostname)
else:
# always allow localhost. Necessary e.g. for healthcheck in docker.
ALLOWED_HOSTS = [_paperless_uri.hostname] + ["localhost"]
2020-11-02 21:59:36 +01:00
# The secret key has a default that should be fine so long as you're hosting
# Paperless on a closed network. However, if you're putting this anywhere
# public, you should change the key to something unique and verbose.
SECRET_KEY = os.getenv(
"PAPERLESS_SECRET_KEY",
"e11fl1oa-*ytql8p)(06fbj4ukrlo+n7k&q5+$1md7i+mge=ee",
2020-11-02 21:59:36 +01:00
)
AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", # noqa: E501
2020-11-02 21:59:36 +01:00
},
{
2022-02-27 15:26:41 +01:00
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
2020-11-02 21:59:36 +01:00
},
{
2022-02-27 15:26:41 +01:00
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
2020-11-02 21:59:36 +01:00
},
{
2022-02-27 15:26:41 +01:00
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
2020-11-02 21:59:36 +01:00
},
]
# Disable Django's artificial limit on the number of form fields to submit at
# once. This is a protection against overloading the server, but since this is
# a self-hosted sort of gig, the benefits of being able to mass-delete a tonne
# of log entries outweight the benefits of such a safeguard.
DATA_UPLOAD_MAX_NUMBER_FIELDS = None
2020-12-11 17:49:32 +01:00
COOKIE_PREFIX = os.getenv("PAPERLESS_COOKIE_PREFIX", "")
CSRF_COOKIE_NAME = f"{COOKIE_PREFIX}csrftoken"
SESSION_COOKIE_NAME = f"{COOKIE_PREFIX}sessionid"
LANGUAGE_COOKIE_NAME = f"{COOKIE_PREFIX}django_language"
2020-11-02 21:59:36 +01:00
###############################################################################
# Database #
###############################################################################
2015-12-20 19:23:33 +00:00
DATABASES = {
2016-01-10 22:45:15 +00:00
"default": {
"ENGINE": "django.db.backends.sqlite3",
2022-02-27 15:26:41 +01:00
"NAME": os.path.join(DATA_DIR, "db.sqlite3"),
},
2015-12-20 19:23:33 +00:00
}
2016-08-23 12:22:36 -04:00
if os.getenv("PAPERLESS_DBHOST"):
2020-11-12 17:12:58 +01:00
# Have sqlite available as a second option for management commands
# This is important when migrating to/from sqlite
2022-02-27 15:26:41 +01:00
DATABASES["sqlite"] = DATABASES["default"].copy()
2020-11-12 17:12:58 +01:00
2016-01-10 13:40:26 +00:00
DATABASES["default"] = {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"HOST": os.getenv("PAPERLESS_DBHOST"),
2016-02-27 20:18:50 +00:00
"NAME": os.getenv("PAPERLESS_DBNAME", "paperless"),
"USER": os.getenv("PAPERLESS_DBUSER", "paperless"),
"PASSWORD": os.getenv("PAPERLESS_DBPASS", "paperless"),
2022-02-27 15:26:41 +01:00
"OPTIONS": {"sslmode": os.getenv("PAPERLESS_DBSSLMODE", "prefer")},
2016-01-10 13:40:26 +00:00
}
if os.getenv("PAPERLESS_DBPORT"):
DATABASES["default"]["PORT"] = os.getenv("PAPERLESS_DBPORT")
2015-12-20 19:23:33 +00:00
Squashed commit of the following: commit a4709b1175f730a3091907040b4d60b72e1f4cd1 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:36:13 2022 -0700 Update stale.yml [skip ci] commit 3a031084f3f9542458c872daf66cea14fd7948de Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:24:23 2022 -0700 Update changelog.md commit 0c517e535146dc1ada8f8fa83a591e260b236ec6 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:18:49 2022 -0700 v1.8.0 version strings commit 5fe435048bc6eb77f9473afc11588427846456ab Merge: 278cedf3 a722bfd0 Author: 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 commit a722bfd09994c1adb820aa41460024fbbf8ad08c Author: 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] commit f3d99a5fdbc9362721e821f85944c906d33c97df Merge: ca334770 79de0989 Author: 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 commit 79de0989d544f16394f24a99d520aef4232e5184 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:54:05 2022 -0700 fix button icon spacing on mobile commit ca334770b705de3907c4396441b0d93bfd6c05da Author: 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] commit 10713575059044abab24ba94cc2429d87528775e Merge: f32dfe02 ef790ca6 Author: 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 commit f32dfe0278c4af1ba93d6f0c4756e30f5183daa6 Merge: 611707a3 4e78ca5d Author: 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 commit 278cedf3d01628ae7f1776f49f5cf48274a09b4c Merge: b141671d ecc4553e Author: 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 commit 45a6b5a43676d8e62b09c37594e01ad98c432fba Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 20:15:26 2022 -0700 Add redo OCR button to document edit commit 611707a3d177836bd586b0fe667a71883cf7ff92 Merge: 2d88638d b4d20d9b Author: 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 commit b4d20d9b9a4f1ff3cb90945dbbcf321e6f84c6ea Author: 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 commit ecc4553e673440d18f68d88c8579ef4f53f4dc80 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 15:10:33 2022 -0700 fix occasional code block color legibility commit ef790ca6f4336095610a3fca2a4ad6507c26455e Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 11:08:52 2022 -0700 Fixes the copy and paste of the log line commit 2d88638da7e144413085f29c2e9ba714648b9d69 Merge: 0e2e5f34 91ba0bd0 Author: 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 commit 91ba0bd0af089e59157305ea23331c8b86bd8644 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 08:53:02 2022 -0700 Locks dependencies to the final versions for the beta commit 0e2e5f3413ba265ac209ec9e755702671e47f30a Author: 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 commit 7a99dcf69309a464648db39e59498a97715238c4 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Thu Jul 21 08:02:11 2022 -0700 Adds configuration for database timeout, documentation and troubleshotting suggestion commit 4e78ca5d82cb9b047639d92e0692436434d3a556 Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 11:15:35 2022 -0700 remove merge error ng-select css commit 83de38e56f5019fe506c52dbae1f9f5b6e81afc4 Merge: f4be2e4f b1b6d50a Author: 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 commit f4be2e4fe77f8340b1b2dffa29b0ad609bfca86a Merge: 4444925d 16b0f7f9 Author: 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 commit 16b0f7f9ee96a5fdf3c1c989dba0db9279bc907c Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:18:47 2022 -0700 Removes a Dockerfile I can't find referenced anywhere commit 27721aef71529e133487294e79585bc2c8f6f451 Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:01:47 2022 -0700 Fixes and updates the Hadolint action version commit 329a317fdf04ce905b9e3bfcbefb7e3a21f04659 Author: 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 commit daad634894831b410b9348587ffdde389bf72ae2 Author: 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 commit 4444925dea6ebac6a972cb94076bc08c15ab94c2 Merge: 4c697ab5 9c1ae96d Author: 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 commit 9c1ae96d336b499355cb5053516a36daa60983a0 Author: Quinn Casey <quinn@quinncasey.com> Date: Mon Jul 18 09:48:03 2022 -0700 Create PR for changelog instead of direct commit commit b1b6d50af602f2d52a2557fb921f36367e9be38c Author: 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 commit 4c697ab50e3a4ecc92291659c9ca93921421d61d Author: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 15:23:28 2022 -0700 Bump version to beta commit b141671d908204dc05d1fdf3c5cad1f325f3e7a3 Merge: 48dfbbeb 2ab2d912 Author: 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 commit 2ab2d9127df146910130591b541258c3bb6cd4c4 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 15 20:19:28 2022 -0700 Use cant-reproduce for stale commit 278453451ec49366f993a7b9cce22a3dcaab5f1d Author: tooomm <tooomm@users.noreply.github.com> Date: Fri Jul 15 21:18:38 2022 +0200 only run on certain labels commit 48dfbbebc654464026b0137c635262073c417292 Merge: 8efb97ef e568b300 Author: 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 commit 8efb97ef4ebfad8690c32ac9e4ae0b328b1c13e1 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 19:06:32 2022 -0700 Update stale.yml [ci skip] commit d8cda7fc1b878c43ae10733f6b807c13d50239e9 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 17:51:39 2022 -0700 Use any-of-labels for stalebot [ci skip] commit 68f0cf419b54b2487647db84941dfb9233e54580 Merge: 666b9385 26b12512 Author: 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 commit 26b12512b1fd25dba7e1180bcf1dbf70b66b8dba Author: 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. commit e568b3000e9304c1aa1febfd6ab6749fc59e09a3 Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jun 7 15:28:49 2022 -0700 Add lsio to issue form commit 666b938550963d136a4f2274cafc0d8d14993761 Merge: de5eaf1c 163231d3 Author: 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 commit 163231d3076562da4079a13842b5e13cd7470611 Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 23:12:40 2022 +0200 Link issues, capitalization and minor fixes commit e530750fc6e405bf3a37981d9da8dbb0d33c840a Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 22:05:43 2022 +0200 update heading levels for v1.7.0
2022-07-28 15:36:24 -07:00
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
2022-02-27 15:26:41 +01:00
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
2021-04-17 16:00:29 +02:00
2020-11-02 21:59:36 +01:00
###############################################################################
# Internationalization #
###############################################################################
2015-12-20 19:23:33 +00:00
2022-02-27 15:26:41 +01:00
LANGUAGE_CODE = "en-us"
2015-12-20 19:23:33 +00:00
LANGUAGES = [
2022-02-27 15:26:41 +01:00
("en-us", _("English (US)")), # needs to be first to act as fallback language
2022-03-31 19:42:08 -07:00
("be-by", _("Belarusian")),
2022-02-18 09:08:02 +01:00
("cs-cz", _("Czech")),
("da-dk", _("Danish")),
2021-03-06 22:20:06 +01:00
("de-de", _("German")),
2022-02-17 16:56:25 +01:00
("en-gb", _("English (GB)")),
("es-es", _("Spanish")),
2021-03-06 22:20:06 +01:00
("fr-fr", _("French")),
2022-02-17 16:56:25 +01:00
("it-it", _("Italian")),
("lb-lu", _("Luxembourgish")),
("nl-nl", _("Dutch")),
("pl-pl", _("Polish")),
2021-02-26 12:55:39 +01:00
("pt-br", _("Portuguese (Brazil)")),
2021-03-17 22:32:39 +01:00
("pt-pt", _("Portuguese")),
2021-03-07 10:07:42 +01:00
("ro-ro", _("Romanian")),
2021-03-14 13:34:14 +01:00
("ru-ru", _("Russian")),
("sl-si", _("Slovenian")),
2022-03-22 22:26:59 -07:00
("sr-cs", _("Serbian")),
2021-05-04 17:01:39 +02:00
("sv-se", _("Swedish")),
2022-03-26 13:52:15 -07:00
("tr-tr", _("Turkish")),
("zh-cn", _("Chinese Simplified")),
]
2022-02-27 15:26:41 +01:00
LOCALE_PATHS = [os.path.join(BASE_DIR, "locale")]
2017-01-07 15:12:45 -08:00
TIME_ZONE = os.getenv("PAPERLESS_TIME_ZONE", "UTC")
2015-12-20 19:23:33 +00:00
USE_I18N = True
USE_L10N = True
USE_TZ = True
2020-11-02 21:59:36 +01:00
###############################################################################
# Logging #
###############################################################################
2016-02-27 20:18:50 +00:00
2021-02-06 17:05:07 +01:00
setup_logging_queues()
os.makedirs(LOGGING_DIR, exist_ok=True)
2022-02-27 15:26:41 +01:00
LOGROTATE_MAX_SIZE = os.getenv("PAPERLESS_LOGROTATE_MAX_SIZE", 1024 * 1024)
2021-02-06 17:05:07 +01:00
LOGROTATE_MAX_BACKUPS = os.getenv("PAPERLESS_LOGROTATE_MAX_BACKUPS", 20)
2016-02-27 20:18:50 +00:00
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
2022-02-27 15:26:41 +01:00
"formatters": {
"verbose": {
"format": "[{asctime}] [{levelname}] [{name}] {message}",
"style": "{",
2020-12-03 01:03:56 +01:00
},
2022-02-27 15:26:41 +01:00
"simple": {
"format": "{levelname} {message}",
"style": "{",
2020-12-03 01:03:56 +01:00
},
},
2016-02-27 20:18:50 +00:00
"handlers": {
2020-12-03 01:03:56 +01:00
"console": {
2021-01-13 13:35:05 +01:00
"level": "DEBUG" if DEBUG else "INFO",
2020-12-03 01:03:56 +01:00
"class": "logging.StreamHandler",
"formatter": "verbose",
2021-02-06 17:05:07 +01:00
},
"file_paperless": {
"class": "concurrent_log_handler.ConcurrentRotatingFileHandler",
"formatter": "verbose",
"filename": os.path.join(LOGGING_DIR, "paperless.log"),
"maxBytes": LOGROTATE_MAX_SIZE,
2022-02-27 15:26:41 +01:00
"backupCount": LOGROTATE_MAX_BACKUPS,
2021-02-06 17:05:07 +01:00
},
"file_mail": {
"class": "concurrent_log_handler.ConcurrentRotatingFileHandler",
"formatter": "verbose",
"filename": os.path.join(LOGGING_DIR, "mail.log"),
"maxBytes": LOGROTATE_MAX_SIZE,
2022-02-27 15:26:41 +01:00
"backupCount": LOGROTATE_MAX_BACKUPS,
},
2020-12-03 01:03:56 +01:00
},
2022-02-27 15:26:41 +01:00
"root": {"handlers": ["console"]},
2016-02-27 20:18:50 +00:00
"loggers": {
2022-02-27 15:26:41 +01:00
"paperless": {"handlers": ["file_paperless"], "level": "DEBUG"},
"paperless_mail": {"handlers": ["file_mail"], "level": "DEBUG"},
},
2016-02-27 20:18:50 +00:00
}
###############################################################################
# Task queue #
###############################################################################
TASK_WORKERS = __get_int("PAPERLESS_TASK_WORKERS", 1)
WORKER_TIMEOUT: Final[int] = __get_int("PAPERLESS_WORKER_TIMEOUT", 1800)
# Per django-q docs, timeout must be smaller than retry
# We default retry to 10s more than the timeout to silence the
# warning, as retry functionality isn't used.
WORKER_RETRY: Final[int] = __get_int(
"PAPERLESS_WORKER_RETRY",
WORKER_TIMEOUT + 10,
)
2020-11-16 18:26:54 +01:00
Q_CLUSTER = {
2022-02-27 15:26:41 +01:00
"name": "paperless",
"guard_cycle": 5,
2022-02-27 15:26:41 +01:00
"catch_up": False,
"recycle": 1,
"retry": WORKER_RETRY,
"timeout": WORKER_TIMEOUT,
2022-02-27 15:26:41 +01:00
"workers": TASK_WORKERS,
"redis": os.getenv("PAPERLESS_REDIS", "redis://localhost:6379"),
"log_level": "DEBUG" if DEBUG else "INFO",
}
2020-11-16 18:52:13 +01:00
def default_threads_per_worker(task_workers) -> int:
# always leave one core open
available_cores = max(multiprocessing.cpu_count(), 1)
2020-11-16 18:52:13 +01:00
try:
2022-02-27 15:26:41 +01:00
return max(math.floor(available_cores / task_workers), 1)
2020-11-16 18:52:13 +01:00
except NotImplementedError:
return 1
2022-02-27 15:26:41 +01:00
THREADS_PER_WORKER = os.getenv(
"PAPERLESS_THREADS_PER_WORKER",
default_threads_per_worker(TASK_WORKERS),
2022-02-27 15:26:41 +01:00
)
2020-11-16 18:52:13 +01:00
2020-11-02 21:59:36 +01:00
###############################################################################
# Paperless Specific Settings #
###############################################################################
2016-02-27 20:18:50 +00:00
2020-11-16 18:52:13 +01:00
CONSUMER_POLLING = int(os.getenv("PAPERLESS_CONSUMER_POLLING", 0))
CONSUMER_POLLING_DELAY = int(os.getenv("PAPERLESS_CONSUMER_POLLING_DELAY", 5))
CONSUMER_POLLING_RETRY_COUNT = int(
os.getenv("PAPERLESS_CONSUMER_POLLING_RETRY_COUNT", 5),
)
CONSUMER_INOTIFY_DELAY: Final[float] = __get_float(
"PAPERLESS_CONSUMER_INOTIFY_DELAY",
0.5,
)
CONSUMER_DELETE_DUPLICATES = __get_boolean("PAPERLESS_CONSUMER_DELETE_DUPLICATES")
CONSUMER_RECURSIVE = __get_boolean("PAPERLESS_CONSUMER_RECURSIVE")
# Ignore glob patterns, relative to PAPERLESS_CONSUMPTION_DIR
CONSUMER_IGNORE_PATTERNS = list(
json.loads(
2022-02-27 15:26:41 +01:00
os.getenv(
"PAPERLESS_CONSUMER_IGNORE_PATTERNS",
'[".DS_STORE/*", "._*", ".stfolder/*", ".stversions/*", ".localized/*", "desktop.ini"]', # noqa: E501
),
),
2022-02-27 15:26:41 +01:00
)
CONSUMER_SUBDIRS_AS_TAGS = __get_boolean("PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS")
CONSUMER_ENABLE_BARCODES = __get_boolean(
"PAPERLESS_CONSUMER_ENABLE_BARCODES",
)
CONSUMER_BARCODE_TIFF_SUPPORT = __get_boolean(
"PAPERLESS_CONSUMER_BARCODE_TIFF_SUPPORT",
)
CONSUMER_BARCODE_STRING = os.getenv("PAPERLESS_CONSUMER_BARCODE_STRING", "PATCHT")
2022-02-27 15:26:41 +01:00
OCR_PAGES = int(os.getenv("PAPERLESS_OCR_PAGES", 0))
2020-11-22 12:54:08 +01:00
# The default language that tesseract will attempt to use when parsing
# documents. It should be a 3-letter language code consistent with ISO 639.
OCR_LANGUAGE = os.getenv("PAPERLESS_OCR_LANGUAGE", "eng")
# OCRmyPDF --output-type options are available.
# TODO: validate this setting.
OCR_OUTPUT_TYPE = os.getenv("PAPERLESS_OCR_OUTPUT_TYPE", "pdfa")
# skip. redo, force
# TODO: validate this.
OCR_MODE = os.getenv("PAPERLESS_OCR_MODE", "skip")
OCR_IMAGE_DPI = os.getenv("PAPERLESS_OCR_IMAGE_DPI")
OCR_CLEAN = os.getenv("PAPERLESS_OCR_CLEAN", "clean")
OCR_DESKEW = __get_boolean("PAPERLESS_OCR_DESKEW", "true")
OCR_ROTATE_PAGES = __get_boolean("PAPERLESS_OCR_ROTATE_PAGES", "true")
2022-02-27 15:26:41 +01:00
OCR_ROTATE_PAGES_THRESHOLD = float(
os.getenv("PAPERLESS_OCR_ROTATE_PAGES_THRESHOLD", 12.0),
2022-02-27 15:26:41 +01:00
)
OCR_MAX_IMAGE_PIXELS: Optional[int] = None
if os.environ.get("PAPERLESS_OCR_MAX_IMAGE_PIXELS") is not None:
OCR_MAX_IMAGE_PIXELS: int = int(os.environ.get("PAPERLESS_OCR_MAX_IMAGE_PIXELS"))
OCR_USER_ARGS = os.getenv("PAPERLESS_OCR_USER_ARGS", "{}")
# GNUPG needs a home directory for some reason
2016-02-27 20:18:50 +00:00
GNUPG_HOME = os.getenv("HOME", "/tmp")
# Convert is part of the ImageMagick package
2017-01-01 22:44:04 +00:00
CONVERT_BINARY = os.getenv("PAPERLESS_CONVERT_BINARY", "convert")
CONVERT_TMPDIR = os.getenv("PAPERLESS_CONVERT_TMPDIR")
CONVERT_MEMORY_LIMIT = os.getenv("PAPERLESS_CONVERT_MEMORY_LIMIT")
GS_BINARY = os.getenv("PAPERLESS_GS_BINARY", "gs")
2020-11-25 19:30:11 +01:00
2016-01-10 13:40:26 +00:00
# Pre-2.x versions of Paperless stored your documents locally with GPG
# encryption, but that is no longer the default. This behaviour is still
# available, but it must be explicitly enabled by setting
# `PAPERLESS_PASSPHRASE` in your environment or config file. The default is to
# store these files unencrypted.
#
# Translation:
# * If you're a new user, you can safely ignore this setting.
# * If you're upgrading from 1.x, this must be set, OR you can run
# `./manage.py change_storage_type gpg unencrypted` to decrypt your files,
# after which you can unset this value.
2016-02-27 20:18:50 +00:00
PASSPHRASE = os.getenv("PAPERLESS_PASSPHRASE")
2016-03-28 19:47:11 +01:00
# Trigger a script after every successful document consumption?
PRE_CONSUME_SCRIPT = os.getenv("PAPERLESS_PRE_CONSUME_SCRIPT")
POST_CONSUME_SCRIPT = os.getenv("PAPERLESS_POST_CONSUME_SCRIPT")
# Specify the default date order (for autodetected dates)
DATE_ORDER = os.getenv("PAPERLESS_DATE_ORDER", "DMY")
FILENAME_DATE_ORDER = os.getenv("PAPERLESS_FILENAME_DATE_ORDER")
# Maximum number of dates taken from document start to end to show as suggestions for
# `created` date in the frontend. Duplicates are removed, which can result in
# fewer dates shown.
NUMBER_OF_SUGGESTED_DATES = __get_int("PAPERLESS_NUMBER_OF_SUGGESTED_DATES", 3)
# Transformations applied before filename parsing
FILENAME_PARSE_TRANSFORMS = []
for t in json.loads(os.getenv("PAPERLESS_FILENAME_PARSE_TRANSFORMS", "[]")):
FILENAME_PARSE_TRANSFORMS.append((re.compile(t["pattern"]), t["repl"]))
# Specify the filename format for out files
Feature: Dynamic document storage pathes (#916) * Added devcontainer * Add feature storage pathes * Exclude tests and add versioning * Check escaping * Check escaping * Check quoting * Echo * Escape * Escape : * Double escape \ * Escaping * Remove if * Escape colon * Missing \ * Esacpe : * Escape all * test * Remove sed * Fix exclude * Remove SED command * Add LD_LIBRARY_PATH * Adjusted to v1.7 * Updated test-cases * Remove devcontainer * Removed internal build-file * Run pre-commit * Corrected flak8 error * Adjusted to v1.7 * Updated test-cases * Corrected flak8 error * Adjusted to new plural translations * Small adjustments due to code-review backend * Adjusted line-break * Removed PAPERLESS prefix from settings variables * Corrected style change due to search+replace * First documentation draft * Revert changes to Pipfile * Add sphinx-autobuild with keep-outdated * Revert merge error that results in wrong storage path is evaluated * Adjust styles of generated files ... * Adds additional testing to cover dynamic storage path functionality * Remove unnecessary condition * Add hint to edit storage path dialog * Correct spelling of pathes to paths * Minor documentation tweaks * Minor typo * improving wrapping of filter editor buttons with new storage path button * Update .gitignore * Fix select border radius in non input-groups * Better storage path edit hint * Add note to edit storage path dialog re document_renamer * Add note to bulk edit storage path re document_renamer * Rename FILTER_STORAGE_DIRECTORY to PATH * Fix broken filter rule parsing * Show default storage if unspecified * Remove note re storage path on bulk edit * Add basic validation of filename variables Co-authored-by: Markus Kling <markus@markus-kling.net> Co-authored-by: Trenton Holmes <holmes.trenton@gmail.com> Co-authored-by: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Co-authored-by: Quinn Casey <quinn@quinncasey.com>
2022-05-19 23:42:25 +02:00
FILENAME_FORMAT = os.getenv("PAPERLESS_FILENAME_FORMAT")
# If this is enabled, variables in filename format will resolve to
# empty-string instead of 'none'.
Feature: Dynamic document storage pathes (#916) * Added devcontainer * Add feature storage pathes * Exclude tests and add versioning * Check escaping * Check escaping * Check quoting * Echo * Escape * Escape : * Double escape \ * Escaping * Remove if * Escape colon * Missing \ * Esacpe : * Escape all * test * Remove sed * Fix exclude * Remove SED command * Add LD_LIBRARY_PATH * Adjusted to v1.7 * Updated test-cases * Remove devcontainer * Removed internal build-file * Run pre-commit * Corrected flak8 error * Adjusted to v1.7 * Updated test-cases * Corrected flak8 error * Adjusted to new plural translations * Small adjustments due to code-review backend * Adjusted line-break * Removed PAPERLESS prefix from settings variables * Corrected style change due to search+replace * First documentation draft * Revert changes to Pipfile * Add sphinx-autobuild with keep-outdated * Revert merge error that results in wrong storage path is evaluated * Adjust styles of generated files ... * Adds additional testing to cover dynamic storage path functionality * Remove unnecessary condition * Add hint to edit storage path dialog * Correct spelling of pathes to paths * Minor documentation tweaks * Minor typo * improving wrapping of filter editor buttons with new storage path button * Update .gitignore * Fix select border radius in non input-groups * Better storage path edit hint * Add note to edit storage path dialog re document_renamer * Add note to bulk edit storage path re document_renamer * Rename FILTER_STORAGE_DIRECTORY to PATH * Fix broken filter rule parsing * Show default storage if unspecified * Remove note re storage path on bulk edit * Add basic validation of filename variables Co-authored-by: Markus Kling <markus@markus-kling.net> Co-authored-by: Trenton Holmes <holmes.trenton@gmail.com> Co-authored-by: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Co-authored-by: Quinn Casey <quinn@quinncasey.com>
2022-05-19 23:42:25 +02:00
# Directories with 'empty names' are omitted, too.
FILENAME_FORMAT_REMOVE_NONE = __get_boolean(
"PAPERLESS_FILENAME_FORMAT_REMOVE_NONE",
"NO",
)
2022-02-27 15:26:41 +01:00
THUMBNAIL_FONT_NAME = os.getenv(
"PAPERLESS_THUMBNAIL_FONT_NAME",
"/usr/share/fonts/liberation/LiberationSerif-Regular.ttf",
)
# Tika settings
TIKA_ENABLED = __get_boolean("PAPERLESS_TIKA_ENABLED", "NO")
TIKA_ENDPOINT = os.getenv("PAPERLESS_TIKA_ENDPOINT", "http://localhost:9998")
TIKA_GOTENBERG_ENDPOINT = os.getenv(
"PAPERLESS_TIKA_GOTENBERG_ENDPOINT",
"http://localhost:3000",
)
if TIKA_ENABLED:
2021-01-08 13:27:57 +01:00
INSTALLED_APPS.append("paperless_tika.apps.PaperlessTikaConfig")
def _parse_ignore_dates(
env_ignore: str,
date_order: str = DATE_ORDER,
) -> Set[datetime.datetime]:
"""
If the PAPERLESS_IGNORE_DATES environment variable is set, parse the
user provided string(s) into dates
Args:
env_ignore (str): The value of the environment variable, comma separated dates
date_order (str, optional): The format of the date strings.
Defaults to DATE_ORDER.
Returns:
Set[datetime.datetime]: The set of parsed date objects
"""
import dateparser
ignored_dates = set()
for s in env_ignore.split(","):
d = dateparser.parse(
s,
settings={
"DATE_ORDER": date_order,
},
)
if d:
ignored_dates.add(d.date())
return ignored_dates
# List dates that should be ignored when trying to parse date from document text
IGNORE_DATES: Set[datetime.date] = set()
if os.getenv("PAPERLESS_IGNORE_DATES") is not None:
IGNORE_DATES = _parse_ignore_dates(os.getenv("PAPERLESS_IGNORE_DATES"))
2022-04-01 07:22:55 -07:00
ENABLE_UPDATE_CHECK = os.getenv("PAPERLESS_ENABLE_UPDATE_CHECK", "default")
if ENABLE_UPDATE_CHECK != "default":
2022-04-04 07:05:00 -07:00
ENABLE_UPDATE_CHECK = __get_boolean("PAPERLESS_ENABLE_UPDATE_CHECK")