Used for working with documentations in Python.
Project description
PyDoc
A library for interacting with pdf documents.
Installation
pip install py-doc
Get Started
How to use the library:
from py_doc import Document
# Instantiate a Document object
image = Document('path/to/image.jpg')
# Use draw_classifications to find document classifications
image.draw_classifications("outupt.jpg")
# Additionally, if you just want the bounding boxes use get_bounding_box()
image.get_bboxes()
To do optical character recognition (OCR), you will need to install Tesseract on your machine and make sure it is added to your PATH. If you don't need OCR, you can skip this step.
from py_doc import Document
image = Document('path/to/image.jpg')
# Use get_text() to get all the text from the image
print(image.get_text())
# Use get_text_from_bbox() to get text from a specific bounding box
bbox = image.get_bboxes()[0]
print(image.get_text_from_bbox(bbox))
Documentation
The documentation for this library can be found here.
Examples
This image is a sample of the output of the draw_classifications() method. The bounding boxes are drawn around the document classifications.
Contributing
Run the following instructions after pushing to the repo:
- make html (update documentation - need to be in docs directory)
- update version in setup.py
- python setup.py sdist bdist_wheel (builds the package)
- twine check dist/* (checks the package)
- twine upload dist/* (uploads the package to PyPi)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py-doc-0.1.2.tar.gz.
File metadata
- Download URL: py-doc-0.1.2.tar.gz
- Upload date:
- Size: 11.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7746d6c0df44d199cb21f451e93f2b3d0014cf7b17ee47060be74404d44e07c2
|
|
| MD5 |
01a9d94cbcd22eb240185613c979c781
|
|
| BLAKE2b-256 |
d3faab5183e288bf30681539793b083e2f3c86f42bdba23266dbe3f2bac69471
|
File details
Details for the file py_doc-0.1.2-py3-none-any.whl.
File metadata
- Download URL: py_doc-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
002c5b282ccf3a7036921796defc9e4b08c1779342687fd70bb92c4f5a14a79f
|
|
| MD5 |
e29733f6721bd9aff0217c1f3c793c24
|
|
| BLAKE2b-256 |
30575fd8bb2588623332026287befa2272ab4a105dd8d2096868dd8a18c61517
|