mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-11-07 03:36:09 -06:00
Squashed commit of the following:
commita4709b1175Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:36:13 2022 -0700 Update stale.yml [skip ci] commit3a031084f3Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:24:23 2022 -0700 Update changelog.md commit0c517e5351Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:18:49 2022 -0700 v1.8.0 version strings commit5fe435048bMerge:278cedf3a722bfd0Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:17:30 2022 -0700 Merge pull request #1240 from paperless-ngx/beta [Beta] Paperless-ngx v1.8.0 Release Candidate 1 commita722bfd099Author: Paperless-ngx Translation Bot [bot] <99855517+paperless-l10n@users.noreply.github.com> Date: Thu Jul 28 07:46:12 2022 -0700 New Crowdin updates (#1291) * New translations django.po (French) [ci skip] * New translations messages.xlf (French) [ci skip] * New translations django.po (French) [ci skip] * New translations messages.xlf (French) [ci skip] * New translations messages.xlf (Turkish) [ci skip] * New translations django.po (Turkish) [ci skip] commitf3d99a5fdbMerge:ca33477079de0989Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 11:21:42 2022 -0700 Merge pull request #1277 from paperless-ngx/fix/redo-ocr-button-on-edit Fix/feature: add redo ocr button to document edit view commit79de0989d5Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:54:05 2022 -0700 fix button icon spacing on mobile commitca334770b7Author: Paperless-ngx Translation Bot [bot] <99855517+paperless-l10n@users.noreply.github.com> Date: Tue Jul 26 09:45:21 2022 -0700 New Crowdin updates (#1242) * New translations messages.xlf (Turkish) [ci skip] * New translations messages.xlf (German) [ci skip] * New translations django.po (German) [ci skip] * New translations messages.xlf (Italian) [ci skip] * New translations messages.xlf (Italian) [ci skip] * New translations messages.xlf (Finnish) [ci skip] * New translations messages.xlf (Finnish) [ci skip] commit1071357505Merge:f32dfe02ef790ca6Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:44:42 2022 -0700 Merge pull request #1268 from paperless-ngx/bugfix-db-locked Bugfix: Adds configuration for database timeout, fixing database locked error commitf32dfe0278Merge:611707a34e78ca5dAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon Jul 25 12:59:31 2022 -0700 Merge pull request #1261 from paperless-ngx/fix/b1.8.0-ng-select-dropdowns Fix: dropdown selected items not visible again commit278cedf3d0Merge:b141671decc4553eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon Jul 25 09:25:52 2022 -0700 Merge pull request #1272 from paperless-ngx/fix-1263 Documentation: fix occasional code block color legibility commit45a6b5a436Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 20:15:26 2022 -0700 Add redo OCR button to document edit commit611707a3d1Merge:2d88638db4d20d9bAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 19:59:30 2022 -0700 Merge pull request #1276 from paperless-ngx/bugfix-webp-import Bugfix: Document import doesn't convert thumbnails to WebP commitb4d20d9b9aAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Sun Jul 24 10:22:53 2022 -0700 Fixes document import copying PNG files to .webp extensions without actual conversion commitecc4553e67Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 15:10:33 2022 -0700 fix occasional code block color legibility commitef790ca6f4Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 11:08:52 2022 -0700 Fixes the copy and paste of the log line commit2d88638da7Merge:0e2e5f3491ba0bd0Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 10:45:53 2022 -0700 Merge pull request #1269 from paperless-ngx/beta-deps-final Chore: Locks dependencies to the final versions for the beta commit91ba0bd0afAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 08:53:02 2022 -0700 Locks dependencies to the final versions for the beta commit0e2e5f3413Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 13:57:00 2022 -0700 Creates utiliy to ensure all paths in settings are normalized and absolute commit7a99dcf693Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Thu Jul 21 08:02:11 2022 -0700 Adds configuration for database timeout, documentation and troubleshotting suggestion commit4e78ca5d82Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 11:15:35 2022 -0700 remove merge error ng-select css commit83de38e56fMerge:f4be2e4fb1b6d50aAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 08:26:12 2022 -0700 Merge pull request #1247 from paperless-ngx/bugfix-pikepdf-ocrmypdf-warnings Bugfix: Adds pngquant and jbig2dec to Docker image commitf4be2e4fe7Merge:4444925d16b0f7f9Author: Quinn Casey <quinn@quinncasey.com> Date: Tue Jul 19 21:03:16 2022 -0700 Merge pull request #1259 from paperless-ngx/chore-add-ci-hadolint Chore: Add Hadolint job to CI commit16b0f7f9eeAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:18:47 2022 -0700 Removes a Dockerfile I can't find referenced anywhere commit27721aef71Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:01:47 2022 -0700 Fixes and updates the Hadolint action version commit329a317fdfAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 13:54:33 2022 -0700 Configure Hadolint in a single location for both hooks and CI commitdaad634894Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 15 13:45:23 2022 -0700 Adds a CI job for hadolint over all the Dockerfiles, fixes the minor thing it complained about commit4444925deaMerge:4c697ab59c1ae96dAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon Jul 18 15:55:29 2022 -0700 Merge pull request #1249 from paperless-ngx/fix-generated-changelog [CI] Fix automatic changelog generation on release commit9c1ae96d33Author: Quinn Casey <quinn@quinncasey.com> Date: Mon Jul 18 09:48:03 2022 -0700 Create PR for changelog instead of direct commit commitb1b6d50af6Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Mon Jul 18 09:46:31 2022 -0700 Adds a couple packages to the Docker image for ocrmypdf and pikepdf commit4c697ab50eAuthor: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 15:23:28 2022 -0700 Bump version to beta commitb141671d90Merge:48dfbbeb2ab2d912Author: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 13:18:57 2022 -0700 Merge pull request #1237 from tooomm/patch-1 chore: Run stale bot only on certain labels commit2ab2d9127dAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 15 20:19:28 2022 -0700 Use cant-reproduce for stale commit278453451eAuthor: tooomm <tooomm@users.noreply.github.com> Date: Fri Jul 15 21:18:38 2022 +0200 only run on certain labels commit48dfbbebc6Merge:8efb97efe568b300Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 3 07:42:20 2022 -0700 Merge pull request #1110 from paperless-ngx/update-issue-form commit8efb97ef4eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 19:06:32 2022 -0700 Update stale.yml [ci skip] commitd8cda7fc1bAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 17:51:39 2022 -0700 Use any-of-labels for stalebot [ci skip] commit68f0cf419bMerge:666b938526b12512Author: Felix E <felix@eckhofer.com> Date: Mon Jun 20 14:25:59 2022 +0200 Merge pull request #1148 from pReya/patch-1 fix: update scanner capability commit26b12512b1Author: Moritz Stückler <moritz.stueckler@gmail.com> Date: Mon Jun 20 12:06:54 2022 +0200 fix: update scanner capability The Brother ADS-A1700W does indeed support SFTP. I've just bought it, and set it up like this. commite568b3000eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jun 7 15:28:49 2022 -0700 Add lsio to issue form commit666b938550Merge:de5eaf1c163231d3Author: Quinn Casey <quinn@quinncasey.com> Date: Thu May 19 17:23:23 2022 -0700 Merge pull request #990 from tooomm/patch-2 Docs: Fix headings and add links to PRs in changelog commit163231d307Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 23:12:40 2022 +0200 Link issues, capitalization and minor fixes commite530750fc6Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 22:05:43 2022 +0200 update heading levels for v1.7.0
This commit is contained in:
@@ -4,6 +4,7 @@ import math
|
||||
import multiprocessing
|
||||
import os
|
||||
import re
|
||||
import tempfile
|
||||
from typing import Final
|
||||
from typing import Optional
|
||||
from typing import Set
|
||||
@@ -56,6 +57,13 @@ def __get_float(key: str, default: float) -> float:
|
||||
return float(os.getenv(key, default))
|
||||
|
||||
|
||||
def __get_path(key: str, default: str) -> str:
|
||||
"""
|
||||
Return a normalized, absolute path based on the environment variable or a default
|
||||
"""
|
||||
return os.path.abspath(os.path.normpath(os.environ.get(key, default)))
|
||||
|
||||
|
||||
# NEVER RUN WITH DEBUG IN PRODUCTION.
|
||||
DEBUG = __get_boolean("PAPERLESS_DEBUG", "NO")
|
||||
|
||||
@@ -66,14 +74,14 @@ DEBUG = __get_boolean("PAPERLESS_DEBUG", "NO")
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
STATIC_ROOT = os.getenv("PAPERLESS_STATICDIR", os.path.join(BASE_DIR, "..", "static"))
|
||||
STATIC_ROOT = __get_path("PAPERLESS_STATICDIR", os.path.join(BASE_DIR, "..", "static"))
|
||||
|
||||
MEDIA_ROOT = os.getenv("PAPERLESS_MEDIA_ROOT", os.path.join(BASE_DIR, "..", "media"))
|
||||
MEDIA_ROOT = __get_path("PAPERLESS_MEDIA_ROOT", os.path.join(BASE_DIR, "..", "media"))
|
||||
ORIGINALS_DIR = os.path.join(MEDIA_ROOT, "documents", "originals")
|
||||
ARCHIVE_DIR = os.path.join(MEDIA_ROOT, "documents", "archive")
|
||||
THUMBNAIL_DIR = os.path.join(MEDIA_ROOT, "documents", "thumbnails")
|
||||
|
||||
DATA_DIR = os.getenv("PAPERLESS_DATA_DIR", os.path.join(BASE_DIR, "..", "data"))
|
||||
DATA_DIR = __get_path("PAPERLESS_DATA_DIR", os.path.join(BASE_DIR, "..", "data"))
|
||||
|
||||
TRASH_DIR = os.getenv("PAPERLESS_TRASH_DIR")
|
||||
|
||||
@@ -83,15 +91,18 @@ MEDIA_LOCK = os.path.join(MEDIA_ROOT, "media.lock")
|
||||
INDEX_DIR = os.path.join(DATA_DIR, "index")
|
||||
MODEL_FILE = os.path.join(DATA_DIR, "classification_model.pickle")
|
||||
|
||||
LOGGING_DIR = os.getenv("PAPERLESS_LOGGING_DIR", os.path.join(DATA_DIR, "log"))
|
||||
LOGGING_DIR = __get_path("PAPERLESS_LOGGING_DIR", os.path.join(DATA_DIR, "log"))
|
||||
|
||||
CONSUMPTION_DIR = os.getenv(
|
||||
CONSUMPTION_DIR = __get_path(
|
||||
"PAPERLESS_CONSUMPTION_DIR",
|
||||
os.path.join(BASE_DIR, "..", "consume"),
|
||||
)
|
||||
|
||||
# This will be created if it doesn't exist
|
||||
SCRATCH_DIR = os.getenv("PAPERLESS_SCRATCH_DIR", "/tmp/paperless")
|
||||
SCRATCH_DIR = __get_path(
|
||||
"PAPERLESS_SCRATCH_DIR",
|
||||
os.path.join(tempfile.gettempdir(), "paperless"),
|
||||
)
|
||||
|
||||
###############################################################################
|
||||
# Application Definition #
|
||||
@@ -327,6 +338,13 @@ if os.getenv("PAPERLESS_DBHOST"):
|
||||
if os.getenv("PAPERLESS_DBPORT"):
|
||||
DATABASES["default"]["PORT"] = os.getenv("PAPERLESS_DBPORT")
|
||||
|
||||
if os.getenv("PAPERLESS_DB_TIMEOUT") is not None:
|
||||
_new_opts = {"timeout": float(os.getenv("PAPERLESS_DB_TIMEOUT"))}
|
||||
if "OPTIONS" in DATABASES["default"]:
|
||||
DATABASES["default"]["OPTIONS"].update(_new_opts)
|
||||
else:
|
||||
DATABASES["default"]["OPTIONS"] = _new_opts
|
||||
|
||||
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from typing import Final
|
||||
from typing import Tuple
|
||||
|
||||
__version__: Final[Tuple[int, int, int]] = (1, 7, 1)
|
||||
__version__: Final[Tuple[int, int, int]] = (1, 8, 0)
|
||||
# Version string like X.Y.Z
|
||||
__full_version_str__: Final[str] = ".".join(map(str, __version__))
|
||||
# Version string like X.Y
|
||||
|
||||
Reference in New Issue
Block a user