Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Python 2 has been out of extended support for over a year and I did some minor changes so that the source is compatible with Python 3 (without breaking backward compatibility).
The changes are truly minor. I ran
2to3
on the source and it only replaced the print statements with calls to the print function. I also changed the binary topython
since it is now compatible with both Python 2 and Python 3.I added a poetry file that lists sexpdata as a dependency. This can be used to publish
dpsprep
to Pypi so that it can be installed via pip, poetry and other tools.I cannot list binaries as dependencies, however I added checks for whether the required binaries (
djvu2hocr
,ddjvu
,ddjvused
andpdftk
) are present.There is also work done to port ocrodjvu to Python 3 (jwilk-archive/ocrodjvu#39), however
djvu2hocr
from ocrodjvu it is run as a binary and hence it is irrelevant what language it is written in.I tested the script with several books and it did what it is intended to do.
Feel free to cherry-pick only the commits that seem meaningful to you.