James R. Barlow
8916955f45
Convert many run_ocrmypdf -> run_ocrmypdf_api
2023-10-24 00:54:31 -07:00
James R. Barlow
82bef40aa6
Eliminate more run_ocrmypdf calls
2023-10-24 00:54:31 -07:00
James R. Barlow
1c45f32941
tests: replace many run_ocrmypdf -> run_ocrmypdf_api
2023-10-24 00:54:31 -07:00
James R. Barlow
fadc0cf69b
Replace cryptic test error messages with more informative ones
2023-10-24 00:54:31 -07:00
James R. Barlow
7ce9d08b2d
Define progress bar plugins formally instead of "tqdm-like"
2023-10-24 00:54:31 -07:00
James R. Barlow
eb3a51e33a
Prefer pikepdf's newer Page.mediabox accessor over .MediaBox
2023-10-24 00:54:31 -07:00
James R. Barlow
f3dd733773
optimize: explore page container as objects instead of page helpers
2023-10-24 00:54:31 -07:00
James R. Barlow
4dbc5e1dba
Fix some typing issues
2023-10-24 00:54:31 -07:00
James R. Barlow
c0637c287e
vscode isn't ready for black py312, revert
2023-10-24 00:54:31 -07:00
James R. Barlow
6127f7abd6
tqdm_kwargs to progress_kwargs
2023-10-24 00:54:31 -07:00
James R. Barlow
a4059762e6
Fix hocrtransform test to generate blank hocr
2023-10-24 00:54:31 -07:00
James R. Barlow
40afcd68a7
pluginspec: spacing
2023-10-24 00:54:31 -07:00
James R. Barlow
f238e721ed
Improve documentation of new public hOCR APIs
2023-10-24 00:54:31 -07:00
James R. Barlow
16eb5627a7
Fix unused imports and other trivia
2023-10-24 00:54:31 -07:00
James R. Barlow
fbf0674189
hocr_to_ocr_pdf: handle missing hocr json file
2023-10-24 00:54:31 -07:00
James R. Barlow
62c4f65fc3
Remove duplicate thread local storage of page numbers
2023-10-24 00:54:31 -07:00
James R. Barlow
e400112f32
Improve ._pipelines naming
2023-10-24 00:54:31 -07:00
James R. Barlow
7935914f55
Use empty .hocr file instead of dummy template for symmetry with sandwich
2023-10-24 00:54:31 -07:00
James R. Barlow
ad3a1dbbad
deps: update PyMuPDF req
2023-10-24 00:54:31 -07:00
James R. Barlow
0655f8e7ae
Add py312 to black coverage
2023-10-24 00:54:30 -07:00
James R. Barlow
04a9372584
docs: some copyediting
2023-10-24 00:54:30 -07:00
James R. Barlow
b9646b6f85
Enable multiprocessing freeze_support (for Windows) and enable forkserver
...
Since we use a thread for logging among other possibilities, we were
never able to use threads safely when forking. forkserver will do the job.
2023-10-24 00:54:30 -07:00
James R. Barlow
53c953a561
Fix use_threads logic for get_pdfinfo
...
Some debug code was level in place that forced pdfinfo to run with only
one worker when --use-threads was issued. That is how it ought to be,
since threaded pdfinfo workers just fight over the GIL and there is no
sense in parallelizing them.
Also, the user's --use-threads or --no-use-threads would be ignored in
the case of pdfinfo. By setting max_workers=1 we disabled worker processes.
This fixes how that decision is made (putting it in the relevant code, which
knows its constraints) and allows the user to influence the
thread/process decision again.
2023-10-24 00:54:30 -07:00
James R. Barlow
c278fecb34
Rename post_process -> postprocess
...
For consistency with preprocess
2023-10-24 00:54:30 -07:00
James R. Barlow
23951c9e38
Working HOCR folder to PDF converter
2023-10-24 00:54:30 -07:00
James R. Barlow
e8ae370ceb
Eliminate api= kwarg and implicit creation of pluginmanager
2023-10-24 00:54:30 -07:00
James R. Barlow
67be4d1904
Refactor CLI exception handling
2023-10-24 00:54:30 -07:00
James R. Barlow
6f82097d14
Refactor setup_pipeline to decouple manage_work_folder
2023-10-24 00:54:30 -07:00
James R. Barlow
fc6f959d21
Refactor debug log and work folder context cleanup
2023-10-24 00:54:30 -07:00
James R. Barlow
e38d569d8f
languages: kwargs are overkill
2023-10-24 00:54:30 -07:00
James R. Barlow
0856750ee2
Fix exit code error on Ghostscript failure
2023-10-24 00:54:30 -07:00
James R. Barlow
05721ba84a
Fix error on no languages available
2023-10-24 00:54:30 -07:00
James R. Barlow
38c3422e5e
Automatically set document language to OCR language
2023-10-24 00:54:30 -07:00
James R. Barlow
d153a6f6df
Refactor metadata handling
2023-10-24 00:54:30 -07:00
James R. Barlow
1a7738a925
Refactor -migrate metadata repair to new module
2023-10-24 00:54:30 -07:00
James R. Barlow
8985c0dfe9
Refactor setup_pipeline to context manager
2023-10-24 00:52:31 -07:00
James R. Barlow
ebfe008432
Refactor logging record thread local storage
2023-10-24 00:52:31 -07:00
James R. Barlow
1f16eb6f50
Refactor main pipeline into discrete pipelines
...
- test_ghostscript_pdfa_failure fails
- haven't dealt with logging record factories
Further refactoring and duplicate elimination
2023-10-24 00:52:31 -07:00
James R. Barlow
cbb0868ae3
Add hocr to ocr pdf pipeline
2023-10-24 00:52:31 -07:00
James R. Barlow
68bb38d0ad
pdf_to_hocr: improve plugin handling
2023-10-24 00:52:31 -07:00
James R. Barlow
0443e87345
Introduce pdf_to_hocr API
2023-10-24 00:52:31 -07:00
James R. Barlow
b3de5833d3
Refactor conversion of ocrmypdf.ocr() arguments to cmdline
2023-10-24 00:52:31 -07:00
James R. Barlow
95b14ee282
Refactor lossless reconstruction setter into separate function
...
Still messy but good enough as a start.
2023-10-24 00:52:31 -07:00
James R. Barlow
07b89e6a19
Plugin manager: set reasonable default when called without params
2023-10-24 00:52:31 -07:00
James R. Barlow
8991d2cb33
Refactor main pipeline and start hocr pipeline
2023-10-24 00:52:31 -07:00
James R. Barlow
86a20c4130
Refactor exec_page_sync to outputs
2023-10-24 00:52:31 -07:00
James R. Barlow
6827a6efe8
Refactor exec_page_sync -> extract _process_page
2023-10-24 00:52:31 -07:00
James R. Barlow
c6b5332699
Test on release py312 not py312-rc
v15.3.0
2023-10-21 15:17:07 -07:00
Michael Flagg and GitHub
68610046c6
Correct the archive dir name in Watched folders with Docker ( #1173 )
2023-10-21 14:59:33 -07:00
James R. Barlow
880326868d
v15.3.0 release notes
2023-10-21 14:59:09 -07:00