textract-cli
CLI for running files through AWS Textract
Installation
Install this tool using pip:
pip install textract-cli
Configuration
Any of the methods for configuring boto3 will work with this tool. Environment variables or a ~/.aws/config file are good options here.
Usage
To run Textract OCR against a JPEG or PNG file (must be smaller than 5MB):
textract-cli image.jpeg
This will output to standard out. To save to a file use this:
textract-cli image.jpeg > output.txt
Or use the -o/--output option like this:
textract-cli image.jpeg -o output.txt
For help, run:
textract-cli --help
You can also use:
python -m textract_cli --help
Development
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd textract-cli
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Release files for textract-cli 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| textract-cli-0.1.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| textract_cli-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.3 kB
Release files / textract-cli-0.1.tar.gz
| Download URL | textract-cli-0.1.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef555f6e1e52d63e8efd20e16c2fa950874a3e361a86f248755eccebdf17dffa
|
|
BLAKE2b-256 checksum How to use checksums |
a05cde8cc5e2c38e41955a9b0185e83d1c38128e176c53b87d23597fcbc4df16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / textract_cli-0.1-py3-none-any.whl
| Download URL | textract_cli-0.1-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed17add973cf94a43fc95a25ace82fb828747bb2867683cedd2cb9d2469d39e4
|
|
BLAKE2b-256 checksum How to use checksums |
fd746102999fc493cbfcfb944fd1ee4ff54831cfa2c4d672ca7df72359d8bcea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|