James R. Barlow
b159e02110
Convert deskew to use degrees, since all our other angles are in degrees
2021-11-12 16:40:51 -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
25d046ae95
Modernize OrientationConfidence definition
2021-11-10 00:55:23 -08:00
James R. Barlow
cb6c1939e9
typing: fix runtime issues
2021-08-27 02:18:54 -07:00
James R. Barlow
f2545d4496
typing: remove deprecated abstractstaticmethod
2021-08-26 23:51:11 -07:00
James R. Barlow
6f9b948064
typing: fix some trivial issues
2021-08-26 23:46:44 -07:00
James R. Barlow
173a80864d
Delinting
2021-04-07 02:09:45 -07:00
James R. Barlow
a48ca556c7
Add filter_pdf_page hook
2021-02-14 01:22:33 -08:00
James R. Barlow
206c675df6
docs: api
2021-01-31 19:26:35 -08: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
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
James R. Barlow
ce0e0ecd4d
Decouple tqdm from progressbar setup
2020-12-04 13:20:28 -08:00
James R. Barlow
b5ccbfdf25
Fix hookspec of rasterize_pdf_page to remove default parameters
2020-10-24 02:35:18 -07:00
James R. Barlow
8b5b02e0d8
Expand documentation of filter_page_image
2020-09-14 14:36:17 -07:00
James R. Barlow
aa0ec40102
Change license of all GPLv3 files to MPL-2.0
...
https://github.com/jbarlow83/OCRmyPDF/issues/600
2020-08-05 00:44:42 -07:00
James R. Barlow
1558e068f1
docs: explain firstresult hook behavior
2020-07-16 00:01:59 -07:00
James R. Barlow
62924ee280
Improve API documentation
2020-06-30 04:20:14 -07:00
James R. Barlow
698aab4f75
Add a lot of type annotations
2020-06-15 15:20:50 -07:00
James R. Barlow
9d127d354c
docs: improve description of plugins
2020-06-15 12:51:49 -07:00
James R. Barlow
64891c2fc3
Pre-release delinting
2020-06-09 15:27:14 -07:00
James R. Barlow
c22f245606
Plugins must return not-None if they intend to stop builtin
2020-06-08 23:48:45 -07:00
James R. Barlow
7b9025f397
Convert generate_pdfa to plugin
2020-06-08 22:28:38 -07:00
James R. Barlow
b109445215
Move Ghostscript rasterize_pdf to plugin
2020-06-08 17:10:27 -07:00
James R. Barlow
aa060db5bc
Refactor tesseract_env variable into the plugin
...
Removed all cases except one in api.py, which isn't worth solving because
it should be removed anyway.
This also fixes a logic error in the OMP_THREAD_LIMIT decision, api.py
did not use pass kwargs correctly so they never worked before.
2020-05-26 02:14:06 -07:00
James R. Barlow
a0f9ca3a30
Move Tesseract options validation into plugin
2020-05-25 01:31:46 -07:00
James R. Barlow
2bd586e093
Compare requested languages to OCR engine instead of tesseract directly
...
Also refactoring to facilitating validation needing the plugin manager.
2020-05-16 01:50:37 -07:00
James R. Barlow
9af94ac9b7
pipeline: use OCR engine abstraction instead of Tesseract
2020-05-16 01:28:56 -07:00
James R. Barlow
8174089c8b
Begin transforming Tesseract into pluggable OCR engine
2020-05-14 03:54:21 -07:00
James R. Barlow
417dbd43f6
docs: plugin documentation
2020-05-07 03:53:37 -07:00
James R. Barlow
6f4286e1b1
New hook: filter_page_image
2020-05-06 02:24:07 -07:00
James R. Barlow
39888ae8c9
Rename install_cli to add_options
2020-05-06 01:10:09 -07:00
James R. Barlow
8c9a8fc85c
pluginspec: avoid circular reference
2020-05-02 03:32:55 -07:00
James R. Barlow
23d558ad8c
Allow plugins to add command line arguments
2020-05-02 01:37:24 -07:00
James R. Barlow
be107b4fed
Set up filter_ocr_image hook
2020-05-01 02:56:41 -07:00
James R. Barlow
8d2535e327
Get pluggy to work with forking workers
2020-05-01 02:39:50 -07:00