Commit 7340078f authored by Anton Akhmerov's avatar Anton Akhmerov

actually fix the reported page number

parent 610f1ae0
......@@ -102,7 +102,8 @@ def process_pdf(pdf_id, data_directory):
if failures:
processed = len(images) - len(failures)
# images are named like '-nnnnn.jpg'
failures = [int(os.path.basename(im)[1:-4]) for im in failures]
failures = [1 + int(os.path.basename(im)[1:-len('.jpg')])
for im in failures]
f'Processed {processed} / {len(images)} pages. '
f'Failed on pages: {failures}'
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment