A simple CLI tool to convert the images to ASCII art with rust 🦀💙
ansiasciiascii-artascii-generatorascii-generatorsascii-graphicsclicommand-lineconvert-image-to-asciihacktoberfestrusttext
|
||
---|---|---|
.github/workflows | ||
.idea | ||
archpackage | ||
images | ||
src | ||
srceenshots | ||
.gitignore | ||
.gitmodules | ||
.mergify.yml | ||
Cargo.toml | ||
LICENSE.txt | ||
README.md | ||
renovate.json |
aarty: A simple CLI tool to convert images to ASCII art with Rust 🦀
More screenshots
Original image Original image Original image Original image Original image Original image
~~~~~~~!!!!~!!~ ~!!!!!!!!!~~~~~
~~~~!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!~~~~
~~~~~!!!!!!!!!!!!!!!!!!~ !!!!!!!!!!!!!!!!!!!!~~~~
~~~~~~!!!!!!!!!!!!!!!!!!!~ ~!!!!!!!!!!!!!!!!!!!!!!~~~~
~~~~~~~!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!~~~~~
~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!~!!!!!!!!!!!!!!!!!!!!!!!!~~~~~
~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~~~~~
~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~~~~~
~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~~~~~~
~~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~~~~~~
~~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~~~~~~~
~~~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~~~~~~~
~~~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~~~~~~~
~~~~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~~~~~~~~
~~~~~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~~~~~~~~~
~~~~~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!~~~~~~~~~~~
~~~~~~~~~~~~~~~!!!!!!!!!!!!!!!!!!!~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~!!!~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
~~~~~~~~~~
~~~~~
Install
- from crates.io
cargo install aarty
- From aur:
yay -S aarty
Options and arguments
aarty --help
A simple CLI tool to convert the images to ASCII art
Usage: aarty [OPTIONS] <IMAGE>
Arguments:
<IMAGE>
The image to convert to ASCII art
Options:
-m, --mode <MODE>
The art mode to use
[default: normal-ascii]
Possible values:
- normal-ascii: Normal ASCII art
- colored: Colored ASCII art, the colors are based on the terminal colors
--output-method <OUTPUT_METHOD>
[default: stdout]
Possible values:
- file: Save the ascii art to a file
- stdout: Print the ascii art to the terminal
-c, --characters <CHARACTERS>
The character to use for drawing the image (lighter to darker) You can user one character if you uses the color mode
[default: " .,-~!;:=*&%$@#"]
-s, --scale <SCALE>
The output scale (1 is the original size)
[default: 4]
-w, --width <WIDTH>
Enstablish how much wide is the output images, in columns. Overrides `scale`
-b, --background <BACKGROUND>
The background color to use
-o, --output <OUTPUT>
The output file to write to (if output_method is file)
[default: ascii_image.txt]
-h, --help
Print help information (use `-h` for a summary)
-V, --version
Print version information
Examples
aarty -m images/airplane.png
:=:**
=***:*
~~!!!~~~~~~~ ~~~ =*****=
~~~!!!!!!!!=*****=
~:*****=
:===**:!~
;======~!!~~
;:===:: ~!~
;:;~::: ~!!~~
~~!!;~~:; !!~
~~!!~ ~!~
~!~ !~
~~ ~~
aarty -m colored images/airplane.png
aarty -m colored images/airplane.png -s 2
aarty -c " ~okOK#\$%" images/ok_hand.png
$$$#
#$$$$#
K#KO#$$$$#
k###O#$$$$#
kK#OK$$$$#K
OKKO#$$$#
O#$$#O KKK$$$$#
K$$$$$$$$$$$$$#OOk#$$$#K
K$$$$$$$$$$$$$$$$##K#$$#K
#$K OO OK#$$$$$$$$$$###
#$$$$# OO##$$$$$$$$$#
O#$$$$# #$$$$$$$$$$KO
K#$$$$# K#$$$$$$$$$$KO
O#$$$$$$#KK####$$$$$$$$$##K
K#$$$$$$$$$$$$$$$$$$$$#KO
K##$$$$$$$$$$$$$$$$$##O
kK###$$$$$$$$$$$$###K
OK######$$######KO
OOKKKKKKKKOO
aarty -c " ~okOK#\$%" images/ok_hand.png -m colored
aarty -c " ~okOK#\$%" images/ok_hand.png -m colored --output-method file -o ok_ascii.txt
If you get here, don't forget the star yooo ⭐