Generate an image from source code (local or repository)
Project description
Code2img
Use code2img from terminal to generate images of your source code
_ ___ _
___ ___ _| |___|_ |_|_____ ___
| _| . | . | -_| _| | | . |
|___|___|___|___|___|_|_|_|_|_ |
|___|
code2img
is a simple tool to generate an image from a local file or
from a GitHub repository. It can also be used to send the source code
to carbon.now.sh and generate the image there.
Installation
code2img
is available on PyPi (MIT license)
and installation can be performed by running pip
python -m pip install code2img
To upgrade the package:
python -m pip install code2img --upgrade
To delete the package:
python -m pip uninstall code2img
Example
To generate an image from a local file:
> python -m code2img main.py -s
Done!
Image created in current directory: main.png
To generate an image from a GitHub repository:
> python -m code2img soluciones/fibonacci.py -g
Done!
Image created in current directory: fibonacci.png
You can also send the content of the source code to carbon.now.sh:
> python -m code2img main.py -c
Sent to Carbon.now.sh
> python -m code2img soluciones/fibonacci.py -gc
Sent to Carbon.now.sh
Help command:
> code2img -h
or:
> code2img --help
Contribution
If you'd like to contribute, fork the repository, commit your changes to main branch and send a pull request. Make sure you add yourself to authors.
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
File details
Details for the file code2img-0.0.3.tar.gz
.
File metadata
- Download URL: code2img-0.0.3.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.61.2 importlib-metadata/3.10.0 keyring/23.0.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cf2053a71b707a7efe351da612bdda6e01b51a57c207acc6030c7d6b37991e7 |
|
MD5 | 384e177c951fd73658c78b0be33c866b |
|
BLAKE2b-256 | c285f0b726a454c91b68e41144b3bcff0f849e1f0862d25d76987c171f0f2e86 |
File details
Details for the file code2img-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: code2img-0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.61.2 importlib-metadata/3.10.0 keyring/23.0.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1388ab304b5da2da9cdd513223ae14f07528aa75f0df666bd98b438c476cfa0c |
|
MD5 | 71794b13b8a2476480f502c4fc96588f |
|
BLAKE2b-256 | 8a8c89e4536a9702effa7d866d74f17166da57f12dc0f995c92726fc52c38d1a |