Sign inSign up

coorde/cart

By coorde

•Updated about 8 years ago

Convert c/c++ code into compilable ascii art

Image
0

10K+

coorde/cart repository overview

⁠cart

Docker Automated build Docker Build Status MicroBadger Size MicroBadger Layers license cpp

Convert c/c++ code into compilable ascii art

⁠Getting started

⁠Docker

docker run -v $(pwd):/data coorde/cart /data/code.cpp /data/img.png > out.cpp

⁠Build from source

⁠Prerequirements
⁠Clone, build, and install
git clone https://github.com/coord-e/cart
cd cart
mkdir build && cd $_
cmake ..
make
sudo make install
⁠Usage
cart [source] [image] {OPTIONS}

  cart: Convert a c/c++ code to ascii art

OPTIONS:

    -h, --help                        Print this help
    source                            Path to c source file
    image                             Path to image file
    -r[rows], --rows=[rows]           Number of rows (=5)
    -c[cols], --cols=[cols]           Number of cols (=5)
    --th=[threshold]                  threshold (=150)
    -d                                Use #define to shorten tokens
    --defth=[define threshold]        Minimum length of token (=5)
    -v, --verbose                     Print verbose output and show images in
                                      process

for example: cart source.cpp image.png -r 2 -c 1 > out.cpp

⁠Thanks to

Taywee/args - https://github.com/Taywee/args⁠

Tag summary

Content type

Image

Digest

Size

61.1 MB

Last updated

about 8 years ago

docker pull coorde/cart