233 Commits

Author SHA1 Message Date
Freddy0
dd8f8fa42b Enhancement: include owner username in post-consumption variables (#7270) 2024-07-16 15:23:29 -07:00
shamoon
be17c2b471 Fix: include trashed docs in existing doc check (#7229) 2024-07-12 16:45:35 -07:00
shamoon
72c27955dd Fix: include documents in trash for existing asn check (#7189) 2024-07-08 16:28:40 +00:00
Trenton H
2d73a46666 Resolves test issues with Python 3.12 (#6902) 2024-06-03 12:33:46 -07:00
Trenton H
a6a51e4a98 Chore: Convert the consumer to a plugin (#6361) 2024-04-18 02:59:14 +00:00
Trenton H
75bc6b3ba8 Chore: Standardize subprocess running and logging (#6275) 2024-04-04 13:11:43 -07:00
Elias Probst
2985ff73cb Enhancement: add ASN to consume rejection message (#6217) 2024-03-28 19:38:29 -07:00
shamoon
5bfb03de59 Feature: workflow removal action (#5928)
---------

Co-authored-by: Trenton H <797416+stumpylog@users.noreply.github.com>
2024-03-04 17:37:42 +00:00
shamoon
7c4d2fc61d Fix: ensure document title always limited to 128 chars (#5934) 2024-02-28 07:05:19 -08:00
Trenton H
1d3f525f92 Ensure all creations of directories create the parents too (#5711) 2024-02-10 11:02:40 -08:00
Trenton H
f6035bb690 Refactor file consumption task to allow beginnings of a plugin system (#5367) 2024-01-13 16:11:14 +00:00
shamoon
aabe4c48fc Enhancement: title assignment placeholder error handling, fallback (#5282) 2024-01-10 10:18:55 -08:00
Trenton H
eb2caa5118 Fix: Allows pre-consume scripts to modify the working path again (#5260)
* Allows pre-consume scripts to modify the working path again and generally cleans up some confusion about working copy vs original
2024-01-05 21:01:57 -08:00
shamoon
1141b767a0 Feature: Workflows (#5121) 2024-01-03 08:19:19 +00:00
Trenton H
c8a62715ec Feature: Allow setting backend configuration settings via the UI (#5126)
* Saving some start on this

* At least partially working for the tesseract parser

* Problems with migration testing need to figure out

* Work around that error

* Fixes max m_pixels

* Moving the settings to main paperless application

* Starting some consumer options

* More fixes and work

* Fixes these last tests

* Fix max_length on OcrSettings.mode field

* Fix all fields on Common & Ocr settings serializers

* Umbrellla config view

* Revert "Umbrellla config view"

This reverts commit fbaf9f4be30f89afeb509099180158a3406416a5.

* Updates to use a single configuration object for all settings

* Squashed commit of the following:

commit 8a0a49dd5766094f60462fbfbe62e9921fbd2373
Author: shamoon <4887959+shamoon@users.noreply.github.com>
Date:   Tue Dec 19 23:02:47 2023 -0800

    Fix formatting

commit 66b2d90c507b8afd9507813ff555e46198ea33b9
Author: shamoon <4887959+shamoon@users.noreply.github.com>
Date:   Tue Dec 19 22:36:35 2023 -0800

    Refactor frontend data models

commit 5723bd8dd823ee855625e250df39393e26709d48
Author: Adam Bogdał <adam@bogdal.pl>
Date:   Wed Dec 20 01:17:43 2023 +0100

    Fix: speed up admin panel for installs with a large number of documents (#5052)

commit 9b08ce176199bf9011a6634bb88f616846150d2b
Author: shamoon <4887959+shamoon@users.noreply.github.com>
Date:   Tue Dec 19 15:18:51 2023 -0800

    Update PULL_REQUEST_TEMPLATE.md

commit a6248bec2d793b7690feed95fcaf5eb34a75bfb6
Author: shamoon <4887959+shamoon@users.noreply.github.com>
Date:   Tue Dec 19 15:02:05 2023 -0800

    Chore: Update Angular to v17 (#4980)

commit b1f6f52486d5ba5c04af99b41315eb6428fd1fa8
Author: shamoon <4887959+shamoon@users.noreply.github.com>
Date:   Tue Dec 19 13:53:56 2023 -0800

    Fix: Dont allow null custom_fields property via API (#5063)

commit 638d9970fd468d8c02c91d19bd28f8b0796bdcb1
Author: shamoon <4887959+shamoon@users.noreply.github.com>
Date:   Tue Dec 19 13:43:50 2023 -0800

    Enhancement: symmetric document links (#4907)

commit 5e8de4c1da6eb4eb8f738b20962595c7536b30ec
Author: shamoon <4887959+shamoon@users.noreply.github.com>
Date:   Tue Dec 19 12:45:04 2023 -0800

    Enhancement: shared icon & shared by me filter (#4859)

commit 088bad90306025d3f6b139cbd0ad264a1cbecfe5
Author: Trenton H <797416+stumpylog@users.noreply.github.com>
Date:   Tue Dec 19 12:04:03 2023 -0800

    Bulk updates all the backend libraries (#5061)

* Saving some work on frontend config

* Very basic but dynamically-generated config form

* Saving work on slightly less ugly frontend config

* JSON validation for user_args field

* Fully dynamic config form

* Adds in some additional validators for a nicer error message

* Cleaning up the testing and coverage more

* Reverts unintentional change

* Adds documentation about the settings and the precedence

* Couple more commenting and style fixes

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2023-12-29 15:42:56 -08:00
TTT7275
e387fbf7da Enhancement: Add {original_filename}, {added_time} to title placeholders (#4972)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2023-12-17 21:38:24 -08:00
shamoon
084c31b37a Enhancement: support assigning custom fields via consumption templates (#4727) 2023-12-03 15:35:30 -08:00
Trenton H
dc5ea43aed Use the original image file for the checksum, not the maybe alpha removed version (#4781) 2023-12-02 16:18:06 -08:00
Armin Gruner
b176fffb23 Fix: Typo invalidates precondition for doctype, resulting in Exception (#4668)
Co-authored-by: Armin Gruner <agmuc.de>
2023-11-23 11:19:11 -08:00
Trenton H
dc642152d1 Standarizes the imports across all the files and modules (#4248) 2023-09-23 20:17:01 -07:00
shamoon
54783f706f Feature: consumption templates (#4196)
* Initial implementation of consumption templates

* Frontend implementation of consumption templates

Testing

* Support consumption template source

* order templates, automatically add permissions

* Support title assignment in consumption templates

* Refactoring, filters to and, show sources on list

Show sources on template list, update some translation strings

Make filters and

minor testing

* Update strings

* Only update django-multiselectfield

* Basic docs, document some methods

* Improve testing coverage, template multi-assignment merges
2023-09-22 16:53:13 -07:00
Trenton Holmes
34b80a4d8e Removes support for Python 3.8 and lower from the code base 2023-09-10 11:42:59 -07:00
Trenton H
128890a350 Merge pull request #4037 from andreheuer/dev
Enhancement: add task id to pre/post consume script as env
2023-09-08 10:00:05 -07:00
shamoon
516d1fcb38 Fix consumer error typo 2023-09-01 00:11:32 -07:00
shamoon
9ed9dbb369 Fix: ghostscript rendering error doesnt trigger frontend failure message (#4092)
* Raise ParseError from gs rendering error

* catch all parser errors as generic exception

* Differentiate generic vs parse errors during consumption
2023-08-31 19:49:00 -07:00
André Heuer
7d53f8d7d3 Removed parameter, added documentation 2023-08-29 23:09:47 -07:00
André Heuer
d8ff6dc692 Added task id to pre/post consume script as env 2023-08-29 23:09:47 -07:00
shamoon
570d7d38fb Restrict status messages by owner if set 2023-08-08 20:39:55 -07:00
Trenton Holmes
41839728fe Small improvement to the consumer status with stronger typing 2023-07-26 07:03:43 -07:00
Trenton H
e160580c8b Fixes issues with copy2 or copystat and SELinux see #3665 2023-07-22 06:27:49 -07:00
Trenton H
9bc0f1e367 Ignore errors when trying to copy the original file's stats 2023-06-21 07:54:27 -07:00
Trenton H
e83be2e540 In cases where a temporary file is created or used, copy the original file stats to it 2023-06-07 09:02:19 -07:00
Trenton H
a12e1b351a Small improvements to coverage 2023-06-06 13:18:13 -07:00
chrisblech
d5db39d553 consumer.py: read create_date from original file (instead of temp copy)
In line 328, `self.path` is set to a fresh written copy of the source file. This copy has a different timestamp (=now).

When using the source file's timestamp as `create_date`, it makes much more sense to ask for the timestamp from `self.original_path`
2023-05-26 14:16:27 -07:00
Trenton H
bad8d304cb Improves the logging mixin and allows it to be typed better 2023-05-23 17:16:39 -07:00
Trenton H
aabcc9a1c4 Upgrades black to v23, upgrades ruff 2023-04-26 09:35:27 -07:00
Trenton H
30655f1b73 Fixes ruff not running isort against the codebase 2023-04-26 09:35:27 -07:00
Trenton H
d2c02b9102 Configures ruff as the one stop linter and resolves warnings it raised 2023-04-01 17:03:52 -07:00
Trenton H
36a6df0bae Creates a data model for the document consumption, allowing stronger typing of arguments and setting of some information about the file only once 2023-04-01 11:05:34 -07:00
shamoon
1332d9a389 Merge branch 'dev' into feature-permissions 2023-02-14 11:32:37 -08:00
Trenton Holmes
7fbcc4f97e Fixes up some minor warnings from test code 2023-02-11 14:35:16 -08:00
shamoon
e6d6efa903 Merge branch 'dev' into feature-permissions 2023-02-03 14:23:50 -08:00
Trenton H
cdd213b0e6 Detect and reset invalid ASNs to 0 during indexing with a loud error to the user 2023-02-03 08:31:45 -08:00
Trenton H
5941c22c33 Changes the consumer to work on a temporary copy and provies that copy to the pre-consume script for modifications 2023-01-29 08:37:32 -08:00
Michael Shamoon
9812e38bc5 Merge branch 'dev' into feature-permissions 2023-01-24 14:10:45 -08:00
Trenton H
83c5e051fd Adjust the barcode to ASN range check and add test case to cover the check 2023-01-24 10:30:32 -08:00
Trenton H
f1da573a41 Also validate the ASN value is within a range the Whoosh schema can support 2023-01-24 09:43:52 -08:00
Peter Kappelt
91b40710f1 Fail consumption when duplicate ASN is given
(rather than just logging warning)
2023-01-24 09:43:52 -08:00
Peter Kappelt
147293a2cc Proper code formatting 2023-01-24 09:43:52 -08:00
Peter Kappelt
099b8b8161 Feature: Parse ASN from barcode
ASN-Barcodes are identified by a configurable prefix
2023-01-24 09:43:52 -08:00