Convert code image to text
Project description
Code Image to Text Converter
Convert code image into text.
For example, if you want to extract code from the image named images/carbon.png
.
Type:
python -m image_converter images/carbon.png .py
This will convert the image to text like below and save the code to the file named carbon.py
.
class DataLoader:
def __init__(self, data_dir: str):
self.data_dir = data_dir
print("Instance is created")
def __call__(self):
print("Instance is called")
data_loader = DataLoader('my_data_dir')
data_loader()
Installation
Intall Tesseract
- Linux
sudo apt-get update
sudo apt-get install tesseract-ocr
sudo apt-get install libtesseract-dev
- Windows Install from here
Install code-image-to-text
pip install code-image-to-text
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
Built Distribution
File details
Details for the file code-image-to-text-0.1.4.tar.gz
.
File metadata
- Download URL: code-image-to-text-0.1.4.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/2.7.17 Linux/5.4.0-73-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1970b81d048bb23b3b590013f6d873c539013c6610ffb2f41731ff3b30199a60 |
|
MD5 | a1960d22b77d621aac0925f71f32ee8b |
|
BLAKE2b-256 | 9abb12342fa10c0f1e376db7c9952b7feeb2966b94fb1a336af4a24fb3efea3c |
File details
Details for the file code_image_to_text-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: code_image_to_text-0.1.4-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/2.7.17 Linux/5.4.0-73-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca4a71f76639218d5b78695498f91a3f5405bc5629196f8b02b9b8fde30c22ab |
|
MD5 | c302a384ab2ffaf76df5ab959d03dd82 |
|
BLAKE2b-256 | 281007bbc41408f335f5a88a8cbd7e167ed6dd3f41dc1af4891abe3bc13ed7b4 |