Skip to main content

Generate an image from source code (local or repository)

Project description

Code2img

Use code2img from terminal to generate images of your source code

GitHub Contributor Covenant GitHub languages GitHub repo size Github last-commit maintenance

           _     ___ _           
 ___ ___ _| |___|_  |_|_____ ___ 
|  _| . | . | -_|  _| |     | . |
|___|___|___|___|___|_|_|_|_|_  |
                            |___|

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


Download files

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

Source Distribution

code2img-0.0.3.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

code2img-0.0.3-py3-none-any.whl (7.1 kB view hashes)

Uploaded Python 3

Supported by

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