A simple CLI tool to convert the images to ASCII art with rust 🦀💙
Find a file
2022-11-09 21:33:09 +02:00
.github/workflows Up version 🥲 agein 2022-11-09 21:33:09 +02:00
.idea Update the dependencies and up the version 💙 2022-10-11 12:45:47 +02:00
archpackage Bumb :/ 2022-11-09 17:57:45 +02:00
images [ImgBot] Optimize images 2022-10-03 21:39:49 +00:00
src Fixing requested changes 2022-10-26 19:52:58 +02:00
srceenshots [ImgBot] Optimize images 2022-10-03 21:39:49 +00:00
.gitignore Create the ascii_processor 🥰🦀 2022-10-03 20:13:59 +02:00
.gitmodules Create The AUR package 😆 2022-10-03 23:41:59 +02:00
Cargo.toml Up version 🥲 agein 2022-11-09 21:33:09 +02:00
LICENSE.txt Create the MIT license 💙 2022-10-03 21:37:08 +02:00
README.md Fixing requested changes 2022-10-26 19:52:58 +02:00

aarty: A simple CLI tool to convert images to ASCII art with Rust 🦀

srceenshots/anime_2_colored_scale_4.gif money mouth face colored scale 2 money mouth face normal scale 2

More screenshots

crab colored scale 1 Original image crap colored scale Original image nerd face colored scale Original image nerd face normal scale Original image srceenshots/anime_2_colored_scale_4.gif Original image anime colored scale 3 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

airplane colored scale 4

aarty -m colored images/airplane.png -s 2

airplane colored scale 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

ok hand colored scale 4 custome chars

aarty -c " ~okOK#\$%" images/ok_hand.png -m colored --output-method file -o ok_ascii.txt

ok hand colored scale 4 custome chars in file

If you get here, don't forget the star yooo

License MIT