James R. Barlow and James R. Barlow
f4cb424451
Support input/output streams at API level
2020-06-22 02:02:18 -07:00
James R. Barlow
f656c00f41
docs: Note about OCRmyPDF speed
2020-05-18 01:27:45 -07:00
James R. Barlow
03da34ee24
Test files needed!
2020-05-16 17:04:44 -07:00
James R. Barlow
9bccff4f88
Move Tesseract specific arguments to plugin
2020-05-16 03:24:31 -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
41eb54cc0a
Standardize tesseract.generate_hocr and _pdf parameters
2020-05-14 03:23:25 -07:00
James R. Barlow
12a2f78c4d
Fix validation of languages not using tesseract_env
...
And some related issues.
2020-05-14 03:19:22 -07:00
James R. Barlow
d372f1f7fa
Remove "skip page" from tesseract interface
...
Breaks tests/test_main.py::test_tesseract_missing_tessdata because
conftest.py does not update options.tesseract_env before testing options
for some reason, and tesseract.has_textonly_pdf raises an exception
instead of returning False as the test assumes.
2020-05-12 04:09:42 -07:00
James R. Barlow
6f5b75bcd0
Remove lru_cache on get_version
...
Does not play well with forking.
2020-05-12 03:51:48 -07:00
James R. Barlow
a2d3e0b53e
Convert remaining imports to absolute
2020-05-12 02:12:08 -07:00
James R. Barlow
7f67556995
ocrmypdf.__init__: Hide _HookimplMarker
2020-05-12 01:35:45 -07:00
James R. Barlow
db8c37e58c
Refactor ocrmypdf.exec.__init__.py
2020-05-12 01:34:10 -07:00
James R. Barlow
a87c81a64f
helpers: remove unnecessary isinstance test
2020-05-12 01:28:50 -07:00
James R. Barlow
4b986a5943
cli: make ArgumentParser._api_mode private
2020-05-12 01:28:36 -07:00
James R. Barlow
2fae9b655e
Remove **kwargs from check_external_program; deprecated
2020-05-12 01:07:01 -07:00
James R. Barlow
2541f6cf89
Fix missing jbig2enc reported as error with -O3 instead of warning
...
Fixes #558
2020-05-12 01:05:57 -07:00
James R. Barlow
33b68454f3
watcher: cleanup getenv casting
2020-05-08 03:49:49 -07:00
James R. Barlow
977665d2b6
Delint some tests
2020-05-08 03:49:33 -07:00
James R. Barlow
fd7497f00d
Remove old function tesseract.v4()
2020-05-08 03:44:39 -07:00
James R. Barlow
790ff58f67
Add fix for bug in Windows Python 3.6/3.7
...
TypeError: argument of type 'WindowsPath' is not iterable
2020-05-07 22:19:21 -07:00
James R. Barlow
4b98ce391b
docs: rename security->pdfsecurity so github won't misinterpret it
2020-05-07 03:54:27 -07:00
James R. Barlow
417dbd43f6
docs: plugin documentation
2020-05-07 03:53:37 -07:00
James R. Barlow
7a12908db9
Relocate example plugin
2020-05-07 03:27:39 -07:00
James R. Barlow
9462f0a28f
graft: more refactoring
2020-05-07 02:59:24 -07:00
James R. Barlow
e760622a5c
graft: refactor
2020-05-07 02:03:42 -07:00
James R. Barlow
1b086f60a9
tesseract.py: api cleanup
2020-05-06 12:37:44 -07:00
James R. Barlow
85cbf94a6e
Convert many uses of str paths to Path
2020-05-06 02:53:47 -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
dd361ecd05
Support importing plugin by filename
2020-05-06 00:44:40 -07:00
James R. Barlow
32759c9025
Change argument from --plugins to --plugin
2020-05-06 00:43:40 -07:00
James R. Barlow
59440448ee
Merge branch 'master' of github.com:jbarlow83/OCRmyPDF
2020-05-04 01:38:26 -07:00
James R. Barlow
1f3665f614
docs: remove reference to brewfile
2020-05-03 16:10:26 -07:00
James R. Barlow
75c34b873a
optimize: convert from executor to progress pool
2020-05-03 02:04:57 -07:00
James R. Barlow
fe4296c53b
safe_symlink: remove deprecated params
2020-05-03 00:53:47 -07:00
James R. Barlow
c85278b31d
Delinting
2020-05-03 00:53:29 -07:00
James R. Barlow
5dbc080fa0
Rename PDFContext->PdfContext
2020-05-02 04:32:46 -07:00
James R. Barlow
e02f6c1e97
Support plugin invocation with API
2020-05-02 03:34:31 -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
James R. Barlow
5eb4fe0052
Refactor plugin setup to get_plugin_manager
2020-05-01 02:18:31 -07:00
James R. Barlow
d8ff4485f8
Move samefile to helpers
2020-05-01 02:18:11 -07:00
James R. Barlow
82bce463ae
Start pluggy-based plugin system
2020-05-01 02:15:23 -07:00
James R. Barlow
016dfd420c
Add warning if problematic --tesseract-pagesegmode is selected
...
Fixes #549
2020-04-30 04:12:11 -07:00
James R. Barlow
b59e761a14
v9.8.0 release notes
2020-04-28 02:40:17 -07:00
James R. Barlow
17cd655752
Don't utf-8 decode tesseract --print-parameters
...
Output not guaranteed to be UTF-8.
Fixes #543 .
2020-04-28 02:37:17 -07:00
James R. Barlow
b840b16c82
Remove tesseract_badutf8.py
...
Should have been removed in 9db01c7
2020-04-28 02:35:23 -07:00
James R. Barlow
8f5c95f0f4
Remove last vestiges of command line usage of qpdf - change to check_pdf
2020-04-26 05:33:26 -07:00
James R. Barlow
168fc60774
Update release notes with v10 changes
2020-04-26 05:14:59 -07:00
James R. Barlow
c84d0f606d
ghostscript: remove deprecated argument from generate_pdfa
2020-04-26 05:11:11 -07:00
James R. Barlow
8b54ce338f
setup: remove deprecated message about removeal of --force parameter
2020-04-26 05:09:42 -07:00
James R. Barlow
18c4aa10bf
Adjust number of workers for concurrent page scanning
2020-04-26 04:21:15 -07:00
James R. Barlow
991db17fde
Remove Ghostscript-based text extraction
...
While faster than Python based methods, we've outgrown the limited
amount of information Ghostscript provides with this feature, and it
repeats an analysis we have to do anyway to learn what images are
present.
2020-04-26 04:02:07 -07:00
James R. Barlow
2c07515907
macOS - use spawn for multiprocessing
...
See bpo-33725. This is the default for 3.8, opt-in for 3.7 and older.
2020-04-26 03:49:40 -07:00
James R. Barlow
27a3b80376
Use once-per-worker pikepdf init
2020-04-26 03:49:20 -07:00
James R. Barlow
8c381a0227
Replace task_initargs with use of partial()
2020-04-26 03:49:20 -07:00
James R. Barlow
86145a8c76
Some wrong with forking worker_pdf, just open it once per page for now
2020-04-26 03:49:20 -07:00
James R. Barlow
7513f5425c
Fix some broken tests
2020-04-26 03:49:20 -07:00
James R. Barlow
af3c3c6466
Further refactoring of concurrency concerns
2020-04-26 03:49:20 -07:00
James R. Barlow
db3e75e33e
Refactor multiprocessing pool
2020-04-26 03:49:13 -07:00
James R. Barlow
ce49fc26dd
Do pikepdf.open() once instead of per worker
2020-04-26 03:42:13 -07:00
James R. Barlow
d0d0a98dca
First cut at concurrent page scan
...
Improvement appears on 168 page file. Needs refactoring
2020-04-26 03:42:13 -07:00
James R. Barlow
3834d1a0bf
azure: use brew python instead
2020-04-26 00:58:38 -07:00
James R. Barlow
33e982b3fd
azure: add certifi, openssl for macOS
2020-04-26 00:37:14 -07:00
James R. Barlow
43d650e78c
Fix issue where only first PNG-style image would be optimized
2020-04-25 03:50:11 -07:00
James R. Barlow
b4c65c5781
Update requirements
2020-04-25 03:49:34 -07:00
James R. Barlow
d96867e6ab
watcher: add polling and log level adjustment
2020-04-24 04:14:44 -07:00
James R. Barlow
0a5108e704
install: clarify that old ocrmypdf should be removed from Ubuntu 18.04
...
Closes #526
2020-04-24 04:14:19 -07:00
James R. Barlow
94c52a6fa3
Refactor 'xyres' into Resolution
2020-04-24 04:12:05 -07:00
James R. Barlow
57771f06a3
Refactor xy-pair for resolution to tuple
2020-04-16 15:38:33 -07:00
James R. Barlow
58abb5785c
pytest picky about list vs tuple
2020-04-15 03:16:51 -07:00
James R. Barlow
509e75eaff
v9.7.2 release notes
2020-04-15 02:56:46 -07:00
James R. Barlow
0c50eedb2a
Support pdfminer.six 20200402
2020-04-15 02:55:22 -07:00
James R. Barlow
4581027246
Drop support for pdfminer.six 20181108
...
This version required a patch that has since been mainlined, and also did not
declare its dependency on chardet
correctly. We can remove both hacks now.
2020-04-15 02:50:36 -07:00
James R. Barlow
31b5f63f85
hocrtransform: cleanup/PEP8
...
Some API breaking changes.
2020-04-15 02:48:56 -07:00
James R. Barlow
957fb1494e
pytest picky about list vs tuple
2020-04-15 02:26:20 -07:00
James R. Barlow
9e3e4f2687
Improve help text about aborting due to text
2020-04-15 02:17:55 -07:00
James R. Barlow
2155bcacb4
Loosen test language requirements - eng/deu
2020-04-15 00:30:38 -07:00
James R. Barlow
346da95899
Suppress loglevel since we have color now
2020-04-15 00:09:36 -07:00
James R. Barlow
f4f7946a0c
Add colored logs
2020-04-15 00:05:38 -07:00
James R. Barlow
c2919f2e1c
Reinstate logging of page numbers
2020-04-15 00:05:23 -07:00
James R. Barlow
a63d624052
Improve logging of subprocess output
2020-04-15 00:04:43 -07:00
James R. Barlow
af91489376
Remove safe_symlink log= warning
2020-04-14 23:59:33 -07:00
James R. Barlow
d146d2b65c
The Great Logging Refactor
...
Remove all instances of logger object being passed as parameters.
This was a holdover from ruffus, and complicated a lot of simple things.
2020-04-14 23:59:33 -07:00
James R. Barlow
4ff4ed24a8
Refactor Windows executable shims
2020-04-14 23:59:33 -07:00
James R. Barlow
c38ff90081
Merge branch 'master' of github.com:jbarlow83/OCRmyPDF
2020-04-14 23:55:01 -07:00
James R. Barlow
4c029e973f
Fix isinstance(..,str)
2020-04-14 23:53:52 -07:00
James R. Barlow
4a640b8dcd
Fix language argument not working as list
...
Fixes #523
2020-04-14 23:18:52 -07:00
James R. Barlow
9471bc8921
Fix versions with leading v, e.g. v5.0
2020-04-10 13:42:33 -07:00
James R. Barlow
7fe06c64fc
v9.7.1 release notes
2020-04-10 13:00:19 -07:00
James R. Barlow
d13d70fd56
Fix version checker failing for qpdf 10.0.0
...
Fixes #527
2020-04-10 13:00:19 -07:00
James R. Barlow
58ec56180a
Add a few more type annotations to public APIs
2020-04-10 13:00:19 -07:00
James R. Barlow
32a88f1bad
docs: warn that AWS Lambda doesn't work
2020-04-10 13:00:19 -07:00
James R. Barlow
99ef42940c
docs: warn that Windows users should use an ifmain guard
2020-04-10 13:00:19 -07:00
James R. Barlow
8de0f9b86f
v9.7.0 release notes
2020-03-29 22:45:25 -07:00
James R. Barlow
23bc3d3a29
tests: workaround for Ghostscript 9.52 txtwrite problem
2020-03-29 22:45:16 -07:00