Skip to content
convert c/c++ code into well-formed ascii art
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
extsrc
.clang-format
.gitignore
.gitmodules
CMakeLists.txt
Dockerfile
LICENSE
README.md
cart.cpp

README.md

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

You can’t perform that action at this time.