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

pdf2csv: errors handling + formatting args on the CLI #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nojhan
Copy link

@nojhan nojhan commented May 31, 2013

feature: formatting args to the CSV writer from the CLI

This permits to call the script with formatting options to be passed to the CSV writer.
Use the form "name=value" after the pdf file name.
For example, to change the delimiter:
    ./pdf2csv.py my_file.pdf delimiter=@
May not work with arguments expecting something different than a string.

bugfix: do not crash on empty lists
bugfix: catch decode error and write "?"s instead

nojhan added 3 commits May 31, 2013 14:16
Sometimes, the decoder is unable to read in unicode.
This patch catch those errors and write a bunch of "?" instead of crashing.
It writes as many "?" as there was characters to be written.
If lst is empty in filterclose, just return it.
This permits to call the script with formatting options to be passed to the CSV writer.
Use the form "name=value" after the pdf file name.
For example, to change the delimiter:
    ./pdf2csv.py my_file.pdf delimiter=@
May not work with arguments expecting something different than a string.
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

Successfully merging this pull request may close these issues.

1 participant