James R. Barlow
2ad8961d0b
Require pngquant 2.13.1 or newer
2023-09-21 00:05:39 -07:00
James R. Barlow
eec8a2b574
Change minimum Ghostscript version to 9.55
2023-09-21 00:05:39 -07:00
James R. Barlow
ec1c377532
Drop Python 3.8 too
...
(cherry picked from commit a8cdc5a191bdf1fe401e96c2dc9a5fba39b90d79)
2023-09-21 00:05:39 -07:00
James R. Barlow
06a5e0c3f6
docs: various updates
2023-08-14 00:13:17 -07:00
James R. Barlow
19045c4f21
Replace coloredlogs and tqdm with rich
2023-08-11 01:47:42 -07:00
James R. Barlow
e8ed510543
Add stop on soft render errors and option to override
2023-06-01 23:49:34 -07:00
James R. Barlow
3731fdfd72
Add --tesseract-downsample-above X
2023-04-16 01:41:19 -07:00
James R. Barlow
f2fc37b257
Merge feature to downsample very large images
2023-04-14 13:09:15 -07:00
James R. Barlow
33b70be7d5
ruff: more fixes, mainly missing docstrings
2023-04-14 02:16:38 -07:00
James R. Barlow
4924b11b6b
Additional ruff fixes
2023-04-14 01:25:16 -07:00
James R. Barlow
9b8d14d16e
Accept most of ruff's delinting
2023-04-14 00:45:34 -07:00
James R. Barlow
1b2849ec0a
Add different timeout control for non-OCR
...
This is mainly to permit the use of --tesseract-timeout 0 as a way of
disabling OCR but still allowing deskew and orientation detection to work.
The better solution will be introducing an explicit argument to
"don't ocr my pdf", but that will take more rework.
2023-04-13 23:59:58 -07:00
James R. Barlow
4f604591b4
Convert to image size based
2023-04-13 23:49:12 -07:00
James R. Barlow
01dc8e23ff
As you were
2023-04-13 23:27:58 -07:00
James R. Barlow
b432770cfc
Add different timeout control for non-OCR
...
This is mainly to permit the use of --tesseract-timeout 0 as a way of
disabling OCR but still allowing deskew and orientation detection to work.
The better solution will be introducing an explicit argument to
"don't ocr my pdf", but that will take more rework.
2023-04-13 22:58:12 -07:00
Kian-Meng Ang and GitHub
ba10c5345b
Fix typos ( #1087 )
...
Found via `codespell -S tests,LICENSES -L flate`
2023-03-29 21:57:32 -07:00
James R. Barlow
7da4e6ca7f
Address some linter warnings
2022-09-21 00:05:12 -07:00
James R. Barlow
acc70036cc
Set minimum Tesseract to 4.1.1
2022-08-02 15:20:29 -07:00
James R. Barlow
67773da309
Drop support for Ghostscript <9.50
2022-08-02 15:01:10 -07:00
James R. Barlow
80ed2117cc
Change to SPDX license tracking
2022-07-28 01:10:07 -07:00
James R. Barlow
dc6f1a266a
Modernize type annotations
2022-07-23 00:39:24 -07:00
James R. Barlow and H. Felix Wittmann
6b425aaebe
Add shim for cancel_futures in older Pythons
...
Thanks @hfwittmann
Closes #993
Co-authored-by: H. Felix Wittmann <hfwittmann@users.noreply.github.com >
2022-07-17 16:02:45 -07:00
James R. Barlow
e4c45e3d3b
Plugins should ideally not import from ocrmypdf._*
2022-06-18 16:03:55 -07:00
James R. Barlow
17a5b8b43c
Refactor reporting of optimization failures
2022-06-13 01:30:15 -07:00
James R. Barlow
13d11e76e5
optimize plugin: solve linearization and "is optimization enabled?" issues
2022-06-13 00:59:41 -07:00
James R. Barlow
61069660a2
Move optimization options to plugin
2022-06-12 02:42:16 -07:00
James R. Barlow
685a06c93d
Move optimize into a builtin plugin
2022-06-12 02:23:13 -07:00
James R. Barlow
b17fb61389
Configure pylint in pyproject and delint
2022-06-12 00:30:44 -07:00
James R. Barlow
1a58abcc6a
concurrency: fix extra update of progressbar
2021-12-19 11:34:09 -08:00
James R. Barlow
7035002c03
Order of operations suppressed detailed Ghostscript missing error message
2021-12-18 01:27:39 -08:00
James R. Barlow
9de06f62ee
Use Python executors instead of pools
...
ProcessPool/ThreadPool don't have the ability to notice when a child worker
was terminated. ProcessPoolExecutor and ThreadPoolExecutor do notice and
provide better error messages.
Add tests to check.
2021-12-06 15:38:27 -08:00
James R. Barlow
f91faf9795
Add new argument --tesseract-thresholding to control tesseract thresholding where available
...
Also add missing test for --tesseract-oem
2021-12-06 15:38:14 -08:00
James R. Barlow
a55ab05d16
Replace leptonica deskew with tesseract find skew and pillow rotate
...
Also rebuild the cache.
2021-11-12 16:35:08 -08:00
James R. Barlow
c725bf79da
flake8 delinting
2021-09-21 16:37:03 -07:00
James R. Barlow
0956fc81aa
typing: improvements for concurrency files
2021-08-26 23:47:53 -07:00
James R. Barlow
8f8aaa93ed
Refactor removing log handlers
2021-04-13 13:16:21 -07:00
James R. Barlow
a90b9e669f
Add reminder to not mess with pool/listener order
2021-04-09 13:22:48 -07:00
James R. Barlow
a5852ba199
Remove parent process's log handlers properly
2021-04-08 21:39:18 -07:00
James R. Barlow
9de38afb13
Fix Tesseract version for ubuntu 18.04
2021-04-08 13:07:13 -07:00
James R. Barlow
336d274a54
Drop remnants of support for Tesseract without has_textonly_pdf
...
Also improve Tesseract version checking so it can compare all of their
weird conventions.
2021-04-07 23:05:21 -07:00
James R. Barlow
173a80864d
Delinting
2021-04-07 02:09:45 -07:00
James R. Barlow
2e155c31bf
Ensure builtin module registration is deterministic
2021-04-01 16:30:42 -07:00
James R. Barlow
e09ae9c68a
Fix test suite failure if filter_pdf_page is missing
2021-04-01 16:25:40 -07:00
James R. Barlow
85c6a974ca
Fix calls to hook.get_executor
2021-01-31 02:46:44 -08:00
James R. Barlow
b1da09f141
Add plugin for setting logging console
...
So that we are not tied to tqdm.
2021-01-31 02:29:11 -08:00
James R. Barlow
16bda74974
Refactor - decouple progressbar from executor
2021-01-30 20:42:00 -08:00
James R. Barlow
d274d88929
Refactor to eliminate global state in _concurrent
2021-01-30 17:36:30 -08:00
James R. Barlow
386cabff00
Make progress pool common rather than plugin-specific
2021-01-24 23:56:09 -08:00
James R. Barlow
173c0d1274
concurrency: lock progress pool
...
For API sanity and to communicate expectations. One progress pool at
a time is plenty of complexity.
2021-01-24 23:46:33 -08:00
James R. Barlow
26b4d9bb4b
Refactor concurrency so that it is pluggable
...
However, this may not be the best idea because it involves global
state that could be overridden by a parallel call to ocrmypdf.ocr.
2021-01-24 23:46:29 -08:00