amazon-textract-prettyprinter-0.1.0
توضیحات
Amazon Textract Helper tools for pretty printing
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | amazon-textract-prettyprinter-0.1.0 |
| نام | amazon-textract-prettyprinter |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Amazon Rekognition Textract Demoes |
| ایمیل نویسنده | rekognition-textract-demos@amazon.com |
| آدرس صفحه اصلی | https://github.com/aws-samples/amazon-textract-textractor/tree/master/prettyprinter |
| آدرس اینترنتی | https://pypi.org/project/amazon-textract-prettyprinter/ |
| مجوز | Apache License Version 2.0 |
# Textract-PrettyPrinter
Provides functions to format the output received from Textract in more easily consumable formats incl. CSV or Markdown.
amazon-textract-prettyprinter
# Install
```bash
> python -m pip install amazon-textract-prettyprinter
```
Make sure your environment is setup with AWS credentials through configuration files or environment variables or an attached role. (https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
# Samples
## Get FORMS and TABLES as CSV
```python
from textractcaller.t_call import call_textract, Textract_Features
from textractprettyprinter.t_pretty_print import Pretty_Print_Table_Format, Textract_Pretty_Print, get_string
textract_json = call_textract(input_document=input_document, features=[Textract_Features.FORMS, Textract_Features.TABLES])
print(get_string(textract_json=textract_json,
table_format=Pretty_Print_Table_Format.csv,
output_type=[Textract_Pretty_Print.TABLES, Textract_Pretty_Print.FORMS]))
```
## Get string for TABLES using the get_string method
```python
from textractcaller.t_call import call_textract, Textract_Features
from textractprettyprinter.t_pretty_print import Textract_Pretty_Print, get_string
textract_json = call_textract(input_document=input_document, features=[Textract_Features.TABLES])
get_string(textract_json=textract_json, output_type=Textract_Pretty_Print.TABLES)
```
## Print out tables in LaTeX format
```python
from textractcaller.t_call import call_textract, Textract_Features
from textractprettyprinter.t_pretty_print import Textract_Pretty_Print, get_string
textract_json = call_textract(input_document=input_document, features=[Textract_Features.FORMS, Textract_Features.TABLES])
get_tables_string(textract_json=textract_json, table_format=Pretty_Print_Table_Format.latex)
```
نیازمندی
| مقدار | نام |
|---|---|
| - | boto3 |
| - | botocore |
| >=0.1.27 | amazon-textract-response-parser |
| ==0.8.10 | tabulate |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl amazon-textract-prettyprinter-0.1.0:
pip install amazon-textract-prettyprinter-0.1.0.whl
نصب پکیج tar.gz amazon-textract-prettyprinter-0.1.0:
pip install amazon-textract-prettyprinter-0.1.0.tar.gz