Command-Line Interface

Contents

Command-Line Interface#

Camelot comes with a command-line interface.

You can print the help for the interface by typing camelot --help in your favorite terminal program, as shown below. Furthermore, you can print the help for each command by typing camelot <command> --help. Try it out!

camelot#

Camelot: PDF Table Extraction for Humans.

camelot [OPTIONS] COMMAND [ARGS]...

Options

--version#

Show the version and exit.

-q, --quiet <quiet>#

Suppress logs and warnings.

-p, --pages <pages>#

Comma-separated page numbers. Example: 1,3,4 or 1,4-end or all.

--parallel#

Read pdf pages in parallel using all CPU cores.

-pw, --password <password>#

Password for decryption.

-o, --output <output>#

Output file path.

-f, --format <format>#

Output file format.

Options:

csv | excel | html | json | markdown | sqlite

-z, --zip#

Create ZIP archive.

-split, --split_text#

Split text that spans across multiple cells.

-flag, --flag_size#

Flag text based on font size. Useful to detect super/subscripts.

-strip, --strip_text <strip_text>#

Characters that should be stripped from a string before assigning it to a cell.

-M, --margins <margins>#

PDFMiner char_margin, line_margin and word_margin.

Commands

hybrid

Combines the strengths of both the Network…

lattice

Use lines between text to parse the table.

network

Use text alignments to parse the table.

stream

Use spaces between text to parse the table.