A simple CLI tool to convert the images to ASCII art with rust 🦀💙
Find a file
2022-10-10 23:59:52 +02:00
.idea Create the arguments moudule 💙🦀 2022-10-03 16:04:38 +02:00
archpackage Fix aur package 😆 2022-10-04 12:41:48 +02:00
images [ImgBot] Optimize images 2022-10-03 21:39:49 +00:00
src Modular output methods 2022-10-10 22:17:21 +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 Remove the license-file proberty 😆 2022-10-03 21:18:02 +02:00
LICENSE.txt Create the MIT license 💙 2022-10-03 21:37:08 +02:00
README.md Update README.md 2022-10-09 15:36:04 +05:30

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]

  -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