atlanhq / camelot

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

Added fileObj to read file object #331

Open deepankurtaneja opened 5 years ago

deepankurtaneja commented 5 years ago

In Camelot there is already present functionality for reading PDF file using file path, but in order to read PDF files through file object was not possible in Camelot directly. Hence added one more function to allow read file object and modified few dependent functions to achieve it. This functionality has been tested on our side, please test it and merge it.

vinayak-mehta commented 5 years ago

I'll review this today.

codecov-io commented 5 years ago

Codecov Report

Merging #331 into master will decrease coverage by 3.15%. The diff coverage is 22.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #331      +/-   ##
==========================================
- Coverage    87.2%   84.04%   -3.16%     
==========================================
  Files          13       13              
  Lines        1501     1561      +60     
  Branches      348      363      +15     
==========================================
+ Hits         1309     1312       +3     
- Misses        134      185      +51     
- Partials       58       64       +6
Impacted Files Coverage Δ
camelot/handlers.py 58.01% <24.61%> (-32.23%) :arrow_down:
camelot/io.py 60% <9.09%> (-40%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a1b85d2...725ff28. Read the comment docs.

deepankurtaneja commented 5 years ago

@vinayak-mehta Actually I am trying to read a PDF file while I am uploading it through web application and there I was not able to use read_pdf() method for file object, hence I added the file object function so as to read the PDF while uploading it via web app.

vinayak-mehta commented 5 years ago

Sorry for the delay in replies, please give me some time to look into this.

GuillaumeKLECH commented 4 years ago

Him i'm also interested in this feature, the need to have a local file (or a downloaded local file) prevents me to deploy camelot in a docker container without a volume.

Any updates about this PR ? Can i help ?

yeus commented 3 years ago

Hi I would also really appreciate this feature... is there any progress in this task? From what I can see there are already two merge requests on this feature...

yeus commented 3 years ago

just realizing this is a somewhat old? repository?

@deepankurtaneja if you read this, get the pull request over here: