Skip to main content

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 Image 

# Instantiate a Document object 
image = Image('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 Image
image = Image('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. Sample Output

Contributing

Run the following instructions after pushing to the repo:

  1. make html (update documentation - need to be in docs directory)
  2. update version in setup.py
  3. python setup.py sdist bdist_wheel (builds the package)
  4. delete previous versions in dist folder
  5. twine check dist/* (checks the package)
  6. twine upload dist/* (uploads the package to PyPi)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-doc-0.1.3.tar.gz (11.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_doc-0.1.3-py3-none-any.whl (11.4 MB view details)

Uploaded Python 3

File details

Details for the file py-doc-0.1.3.tar.gz.

File metadata

  • Download URL: py-doc-0.1.3.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

Hashes for py-doc-0.1.3.tar.gz
Algorithm Hash digest
SHA256 97b525247177e1829ec1895f151015e55c4e57a86749121f60e9bd5d7bf485bc
MD5 1e5db478cf1ffb116e7cc10088fd0498
BLAKE2b-256 f0705658b7c9436032fd5a1e3721c56a2337a4ef1ea6e371ed9c06d3dc9420e6

See more details on using hashes here.

File details

Details for the file py_doc-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: py_doc-0.1.3-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

Hashes for py_doc-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 73786ece3bc019a4b3942135251a939fe5a8ee02141c9fbb68f8b603fee3a092
MD5 f56b5e0e5a8abe30f271aa1e728328bc
BLAKE2b-256 fae9483e7b0d4a02d3cd660a8a3dbaffff41d10a912d246a0c5f8f5fd1ba60c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page