In its current form the pipeline is not re-entrant -- it is assembled based on command line arguments prior to main() and cannot be changed after that. As such, there is no value to "import ocrmypdf".
Also, all test cases need to run in a subprocess which is not ideal for inspecting test failures.
A re-entrant pipeline would make it possible to customize the pipeline if ocrmypdf were used as a library.
In its current form the pipeline is not re-entrant -- it is assembled based on command line arguments prior to main() and cannot be changed after that. As such, there is no value to "import ocrmypdf".
Also, all test cases need to run in a subprocess which is not ideal for inspecting test failures.
A re-entrant pipeline would make it possible to customize the pipeline if ocrmypdf were used as a library.