189 Commits

Author SHA1 Message Date
Trenton Holmes
7fbcc4f97e Fixes up some minor warnings from test code 2023-02-11 14:35:16 -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
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
shamoon
779fded0e3 Merge pull request #1998 from paperless-ngx/fix/1993-date-overflow
Bugfix: Don't allow exceptions during date parsing to fail consume
2022-11-17 14:31:46 -08:00
Trenton H
cdfcbff529 Don't allow an exception when trying to parse a date cause complete failure 2022-11-17 13:37:37 -08:00
Trenton H
32355e859f Don't do decoding work if not needed 2022-11-11 10:09:56 -08:00
Trenton H
2228cc292d Adds further testing to cover scripts with non-zero exit codes 2022-11-11 08:58:49 -08:00
Trenton H
7a0763a128 Fixes stderr appearing to have content when it doesn't 2022-11-10 19:01:54 -08:00
Trenton Holmes
81c98103a8 Captures the stdout and stderr of the pre/post scripts into the log 2022-11-10 17:26:47 -08:00
Trenton H
cce0d363e4 Refresh the instance from the database before doing any file handling with it 2022-11-03 11:32:27 -07:00
Michael Shamoon
5c39f058ad add id to document duplicate error message 2022-10-02 10:27:45 -07:00
Trenton Holmes
a19fbf919d When a document is a duplicate, include the title of the existing document in the fail message 2022-10-02 10:27:45 -07:00
Trenton Holmes
fd23599856 Also provide the original file name to the post consumption script 2022-08-21 16:16:28 -07:00
Gwyn Hannay
b8b0d18b25 format code 2022-08-20 14:31:30 -07:00
Gwyn Hannay
7e8183769b update files and model to include new field 2022-08-20 14:30:14 -07:00
Trenton Holmes
024fd8bc9b When raising an exception during exception handling, chain them together for slightly cleaner logs 2022-08-03 09:00:56 -07:00
Trenton Holmes
1b897992a2 Re-adds the script arguments 2022-07-14 08:50:00 -07:00
ziprandom
b389b50fd5 POST_CONSUME_SCRIPT: add documents archive_path 2022-06-22 14:00:20 +00:00
ziprandom
8019cf145e POST_CONSUME_SCRIPT: add document dates to env 2022-06-22 13:58:16 +00:00
ziprandom
910b9a4888 use env variables in pre-|post-consume scripts
+ instead of positional arguments because it's easier to use in the
shell script and easier to read in the python code.
2022-06-22 13:56:59 +00:00
Trenton Holmes
ef6ebf9888 Entirely removes the optipng, updates ghostscript fall back to also use WebP. Updates the conversion to use a multiprocessing pool 2022-06-11 08:38:49 -07:00
Philipp
87866bcab0 Add "Created" as additional (optional) parameter for post_documents (#965)
* Added "created" as optional parameter for post_documents.

* Fixed Conflict

* After Black Reformatting

* Run "add-trailing-comma"

* The right order between black and trailing comma is important....

* Added required=False

* Adds unit test for optional created in document api POST

* Fixes adding of settings override

* And a mis-added print, sigh

Co-authored-by: Philipp <philipp@invalid.invalid>
Co-authored-by: Trenton Holmes <holmes.trenton@gmail.com>
2022-05-18 02:56:32 -07:00
shamoon
3ccf143c0b Merge pull request #721 from paperless-ngx/bug-fix-date-ignore
Fix Ignore Date Parsing
2022-05-10 16:45:58 -07:00
Trenton Holmes
2761a9e7cf Fixes missing f on an f-string 2022-05-08 16:57:35 -07:00
Trenton Holmes
a944ef1ca6 Adds additional testing for both date parsing and consumed document created date 2022-05-08 16:57:35 -07:00
Trenton Holmes
f62193099c Runs pyupgrade to Python 3.8+ and adds a hook for it 2022-05-06 09:04:08 -07:00
Trenton Holmes
6635fa5f0d Runs the pre-commit hooks over all the Python files 2022-03-11 11:34:28 -08:00
kpj
c56cb25b5f Format Python code with black 2022-02-27 15:26:41 +01:00
jonaswinkler
56bbe644b8 codestyle 2021-05-19 20:26:12 +02:00
jonaswinkler
5d5afb210a delete macOS specific files 2021-05-19 20:02:47 +02:00
Jonas Winkler
dc565bd035 correct file mode 2021-05-16 01:22:51 +02:00
jonaswinkler
d7bf3bb141 logging before executing pre and post consume scripts 2021-04-05 00:22:11 +02:00
jonaswinkler
d85a0f950f better exception logging 2021-03-22 23:00:15 +01:00
jonaswinkler
b04d91d68c fix a bug with thumbnail generation when TIKA was enabled 2021-02-09 22:12:43 +01:00
jonaswinkler
7cdc867307 archive filenames are now stored in the database and checked for collisions just as original filenames as well, unified method for archive version checking 2021-02-09 19:46:19 +01:00
jonaswinkler
a8355b6aae fix some logging messages 2021-02-06 15:30:47 +01:00
jonaswinkler
e5a7dc0cc7 rework most of the logging 2021-02-05 01:10:29 +01:00
jonaswinkler
fce76d0671 Merge branch 'dev' into feature-websockets-status 2021-01-30 16:08:50 +01:00
jonaswinkler
a37e41ef0c centralized classifier loading, better error handling, no error messages when auto matching is not used 2021-01-30 14:22:23 +01:00
jonaswinkler
5f7d817d69 localization for websockets 2021-01-28 22:06:02 +01:00
jonaswinkler
14c61d72f3 better error messages 2021-01-27 17:56:06 +01:00
jonaswinkler
c0f185fe7e bug fixes, test case fixes 2021-01-26 15:19:56 +01:00
jonaswinkler
c1136ac83c i18n, better error handling 2021-01-26 15:02:46 +01:00
jonaswinkler
2e112fe7b1 fix status reports for consumption directory status messages 2021-01-26 01:15:27 +01:00
jonaswinkler
de2f3fea59 task ids 2021-01-26 00:51:20 +01:00