Remove ncols
parent
8e8f5bbb3b
commit
4a87a77003
|
|
@ -377,8 +377,7 @@ class Stream:
|
||||||
if ncols == 1 and not self.debug:
|
if ncols == 1 and not self.debug:
|
||||||
# no tables detected
|
# no tables detected
|
||||||
logger.warning("{}: Only one column was detected, the pdf"
|
logger.warning("{}: Only one column was detected, the pdf"
|
||||||
" may have no tables. Specify ncols if"
|
" may have no tables.".format(
|
||||||
" the pdf has tables.".format(
|
|
||||||
os.path.basename(bname)))
|
os.path.basename(bname)))
|
||||||
cols = [(t.x0, t.x1)
|
cols = [(t.x0, t.x1)
|
||||||
for r in rows_grouped if len(r) == ncols for t in r]
|
for r in rows_grouped if len(r) == ncols for t in r]
|
||||||
|
|
|
||||||
|
|
@ -89,14 +89,13 @@ stream_doc = """
|
||||||
Stream method looks for whitespaces between text to form a table.
|
Stream method looks for whitespaces between text to form a table.
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
camelot stream [-t <tarea>...] [-c <columns>...] [-n <ncols>...] [-H <header>...]
|
camelot stream [-t <tarea>...] [-c <columns>...] [-H <header>...]
|
||||||
[-y <ytol>...] [-m <mtol>...] [options] [--] <file>
|
[-y <ytol>...] [-m <mtol>...] [options] [--] <file>
|
||||||
|
|
||||||
options:
|
options:
|
||||||
-t, --tarea <tarea> Specific table areas to analyze.
|
-t, --tarea <tarea> Specific table areas to analyze.
|
||||||
-c, --columns <columns> Comma-separated list of column x-coordinates.
|
-c, --columns <columns> Comma-separated list of column x-coordinates.
|
||||||
Example: -c 10.1,20.2,30.3
|
Example: -c 10.1,20.2,30.3
|
||||||
-n, --ncols <ncols> Number of columns. [default: -1]
|
|
||||||
-H, --header <header> Specify header for each table.
|
-H, --header <header> Specify header for each table.
|
||||||
-y, --ytol <ytol> Tolerance to account for when grouping rows
|
-y, --ytol <ytol> Tolerance to account for when grouping rows
|
||||||
together. [default: 2]
|
together. [default: 2]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue