Compare commits

...
4 Commits
4 changed files with 14 additions and 6 deletions
+4 -1
View File
@@ -134,7 +134,6 @@ jobs:
ghostscript \ ghostscript \
jbig2enc \ jbig2enc \
openjpeg \ openjpeg \
openssl \
pngquant \ pngquant \
tesseract tesseract
@@ -162,6 +161,8 @@ jobs:
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v4 uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with: with:
files: ./coverage.xml files: ./coverage.xml
env_vars: OS,PYTHON env_vars: OS,PYTHON
@@ -205,6 +206,8 @@ jobs:
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v4 uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with: with:
files: ./coverage.xml files: ./coverage.xml
env_vars: OS,PYTHON env_vars: OS,PYTHON
+6
View File
@@ -30,6 +30,12 @@ OCRmyPDF typically supports the three most recent Python versions.
.. |OCRmyPDF PyPI| image:: https://img.shields.io/pypi/v/ocrmypdf.svg .. |OCRmyPDF PyPI| image:: https://img.shields.io/pypi/v/ocrmypdf.svg
v16.3.1
=======
- Fixed a test suite failure with Ghostscript 10.03.0+. :issue:`1316`
- Fixed an issue with the presentation of the "OCR" progress bar. :issue:`1313`
v16.3.0 v16.3.0
======= =======
+3 -4
View File
@@ -103,14 +103,14 @@ def exec_concurrent(context: PdfContext, executor: Executor) -> Sequence[str]:
try: try:
set_thread_pageno(result.pageno + 1) set_thread_pageno(result.pageno + 1)
sidecars[result.pageno] = result.text sidecars[result.pageno] = result.text
pbar.update() pbar.update(0.5)
ocrgraft.graft_page( ocrgraft.graft_page(
pageno=result.pageno, pageno=result.pageno,
image=result.pdf_page_from_image, image=result.pdf_page_from_image,
textpdf=result.ocr, textpdf=result.ocr,
autorotate_correction=result.orientation_correction, autorotate_correction=result.orientation_correction,
) )
pbar.update() pbar.update(0.5)
finally: finally:
set_thread_pageno(None) set_thread_pageno(None)
@@ -118,10 +118,9 @@ def exec_concurrent(context: PdfContext, executor: Executor) -> Sequence[str]:
use_threads=options.use_threads, use_threads=options.use_threads,
max_workers=max_workers, max_workers=max_workers,
progress_kwargs=dict( progress_kwargs=dict(
total=(2 * len(context.pdfinfo)), total=len(context.pdfinfo),
desc='OCR' if options.tesseract_timeout > 0 else 'Image processing', desc='OCR' if options.tesseract_timeout > 0 else 'Image processing',
unit='page', unit='page',
unit_scale=0.5,
disable=not options.progress_bar, disable=not options.progress_bar,
), ),
worker_initializer=partial(worker_init, PIL.Image.MAX_IMAGE_PIXELS), worker_initializer=partial(worker_init, PIL.Image.MAX_IMAGE_PIXELS),
+1 -1
View File
@@ -23,4 +23,4 @@ def test_semfree(resources, outpdf):
'--plugin', '--plugin',
'tests/plugins/tesseract_noop.py', 'tests/plugins/tesseract_noop.py',
) )
assert exitcode == ExitCode.ok assert exitcode in (ExitCode.ok, ExitCode.pdfa_conversion_failed)