camelot
camelot copied to clipboard
Added multi parameter for page level parameters
Can be used for setting different parameters for different pages in a document. For example, if wanting to supply table_region for a document, multi can be used to submit different regions for different areas. Common parameters that are to be applied for all pages can still be used.
Multi is used a dictionary to supply additional parameters (Page: Parameters (in dict)). Added parameters override the global arguments for that page
For example,
filename = os.path.join(testdir, "multi_params.pdf")
tables = camelot.read_pdf(filename, pages="all",
multi={'2': {"table_regions": ["120, 210, 400, 90"]}},
split_text=True)
In this example, page 1 will use split_text as its parameters, and page 2 will use table regions AND split text as its parameters.
Codecov Report
Merging #41 into master will increase coverage by
0.05%. The diff coverage is100%.
@@ Coverage Diff @@
## master #41 +/- ##
==========================================
+ Coverage 87.69% 87.74% +0.05%
==========================================
Files 13 13
Lines 1511 1518 +7
Branches 349 350 +1
==========================================
+ Hits 1325 1332 +7
Misses 129 129
Partials 57 57
| Impacted Files | Coverage Δ | |
|---|---|---|
| camelot/handlers.py | 91.01% <100%> (+0.76%) |
:arrow_up: |
| camelot/io.py | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 7ecfcad...de75c05. Read the comment docs.
@vinayak-mehta Added the multi feature as per your request from camelot to camelot-dev.
Hey!
As camelot is dead, we try to build a maintained fork at pypdf_table_extraction.
Do you want to open the PR against that branch so that we can merge your improvement?