Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behave more like a UNIX tool #15

Open
ole-tange opened this issue Mar 4, 2023 · 0 comments
Open

Behave more like a UNIX tool #15

ole-tange opened this issue Mar 4, 2023 · 0 comments

Comments

@ole-tange
Copy link

You clearly know pnmtools. One of the great things about pnmtools is that it can be used in a pipe.

I suggest changing pdf2odt so this is possible:

    cat example.pdf | pdf2odt | tee example.odt | wc

This should effectively run something like:

    cat example.pdf |
      (cat > tmpfile.pdf; pdf2odt --pdf tmpfile.pdf tmpfile.odt; cat tmpfile.odt; rm tmpfile*) |
      tee example.odt | wc

but should be written directly in Python.

    pdf2odt example.pdf

should effectively run:

    pdf2odt --pdf example.pdf example.odt
    pdf2odt example.pdf - | wc

should effectively run:

    (pdf2odt --pdf example.pdf tmpfile.odt; cat tmpfile.odt; rm tmpfile.odt) |wc

but written in Python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant