Skip to content

leugimkm/code2img

Repository files navigation

Code2img

Use code2img from terminal to generate images of your source code

GitHub Contributor Covenant GitHub languages GitHub repo size Github last-commit maintenance GitHub release (latest by date) PyPI - Format Downloads

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

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.

About

Use Code2Img from terminal to generate images of your source code

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages