Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
anjesh committed Jun 11, 2015
1 parent 83f71af commit e04bcfa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 6 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Make sure that `pdftotext`, `pdfinfo` and `pdfseparate` are installed in your co
* Uses `pdftotext` to dump the text and compares the size of the extract text content. If the text content size is 50 bytes in average for each page, then it is structured otherwise scanned one.
* If the pdf is structured, then it uses `pdftotext` to extract the text content page-wise and puts the txt files in the `text` folder.
* If the pdf is non-structured i.e. scanned, then it uses Abbyy OCR service to extract the text content `TODO`
* Creates `stats.json` file with the following content (incase of structured pdf)
* Creates `stats.json` file with the following content (structured = false if scanned)

```json
{ "structured": true, "pages": 5 }
Expand All @@ -33,6 +33,11 @@ Execute `bash runtest.sh` to run all above tests at once.
* `python run.py` to see the options
* `python run.py -i tests/sample.pdf -o out` creates folder `out/text` with the extracted text files, `out/pages` with the separated pdf files and `out/stats.json`.

### TODO

* integrate Abbyy API for OCR for scanned pdfs
* log the events
* handle exceptions



Expand Down
3 changes: 0 additions & 3 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
parser.add_argument('-o','--outdir', help='File name of the output csv file.', required=True)
results = parser.parse_args()

print results.infile;
print results.outdir;

pdfProcessor = PDFProcessor(results.infile, results.outdir)
if pdfProcessor.isStructured():
pdfProcessor.extractTextFromStructuredDoc()
Expand Down

0 comments on commit e04bcfa

Please sign in to comment.