atlanhq / camelot

Camelot: PDF Table Extraction for Humans
https://camelot-py.readthedocs.io
Other
3.62k stars 350 forks source link

Is it possible to print the table to stdout? #320

Closed crotoc closed 5 years ago

crotoc commented 5 years ago

Hi there, Thanks very much for your great project and save me a lot of time! Now I want to build a pipeline using camelot and need to know how to print the output to the stdout. Please let me know if there is a way!

Thanks, Rui

vinayak-mehta commented 5 years ago

What kind of pipeline are you looking to build? There is no option inside the library that'll print the table to stdout but you should be able to save the table in a CSV file using the CLI and then do a cat on that file.

crotoc commented 5 years ago

I want to use the output of camelot to directly as a input of another cmd like perl. Anyway, thanks!

vinayak-mehta commented 5 years ago

Do you want the supported formats (csv, json, html) printed to stdout?

crotoc commented 5 years ago

Yes, if this can be implemented, that would be great of help! Thanks!

vinayak-mehta commented 5 years ago

Closing in favor of https://github.com/camelot-dev/camelot/issues/24.

satheeshkatipomu commented 4 years ago

I think we can use tables[0].df.to_csv(sys.stdout) for this