leaf-focus
Extract structured text from pdf files.
Install
Install from PyPI using pip:
pip install leaf-focus
Download the Xpdf command line tools and extract the executable files.
Provide the directory containing the executable files as --exe-dir.
Usage
usage: leaf-focus [-h] [--version] --exe-dir EXE_DIR [--page-images] [--ocr]
[--first FIRST] [--last LAST]
[--log-level {debug,info,warning,error,critical}]
input_pdf output_dir
Extract structured text from a pdf file.
positional arguments:
input_pdf path to the pdf file to read
output_dir path to the directory to save the extracted text files
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--exe-dir EXE_DIR path to the directory containing xpdf executable files
--page-images save each page of the pdf as a separate image
--ocr run optical character recognition on each page of the
pdf
--first FIRST the first pdf page to process
--last LAST the last pdf page to process
--log-level {debug,info,warning,error,critical}
the log level: debug, info, warning, error, critical
Examples
# Extract the pdf information and embedded text.
leaf-focus --exe-dir [path-to-xpdf-exe-dir] file.pdf file-pages
# Extract the pdf information, embedded text, an image of each page, and Optical Character Recognition results of each page.
leaf-focus --exe-dir [path-to-xpdf-exe-dir] file.pdf file-pages --ocr
Dependencies
- xpdf
- keras-ocr
- Tensorflow (can optionally be run more efficiently using one or more GPUs)
Metadata
Release files for leaf-focus 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| leaf-focus-0.6.2.tar.gz | 31.5 kB | Without provenance | Details for leaf-focus-0.6.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| leaf_focus-0.6.2-py3-none-any.whl | Python 3 | none | any | Details for leaf_focus-0.6.2-py3-none-any.whl |
Total release size: 58.0 kB
Release files / leaf-focus-0.6.2.tar.gz
| Download URL | leaf-focus-0.6.2.tar.gz |
|---|---|
| Size | 31.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0b0be650e761626836cdd74ccc8c32c8c96a4e380d618bb506d3e71e719079c
|
|
BLAKE2b-256 checksum How to use checksums |
eeddace4b960dd401e6109bfed1c4ca4a981c48c5f5fc4b61af7c9fbfd36c32c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / leaf_focus-0.6.2-py3-none-any.whl
| Download URL | leaf_focus-0.6.2-py3-none-any.whl |
|---|---|
| Size | 26.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a4e37ffdbecdc6ea3992901ea7ac4194b8413a0e14d98f242d97a5a7af6eedd
|
|
BLAKE2b-256 checksum How to use checksums |
b35862ec79fcdaf85093217f6cd07dd3e4602cd955e2f6cc950b60b2b0298fc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Security for leaf-focus 0.6.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.