Skip to content

nate00/ascii_paint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASCII paint

Convert ASCII art to PNG.

Usage

text = "
 !!!!! @@@@@ $$$$$ %%%%% ^^^^^       @@@@@ $$$$$ %%%%% ^   ^ !!!!! 
 !   ! @     $       %     ^         @   @ $   $   %   ^^  ^   !   
 !!!!! @@@@@ $       %     ^         @@@@@ $$$$$   %   ^ ^ ^   !   
 !   !     @ $       %     ^         @     $   $   %   ^  ^^   !   
 !   ! @@@@@ $$$$$ %%%%% ^^^^^ !!!!! @     $   $ %%%%% ^   ^   !   
"
AsciiPaint.paint(text, 'out.png')

Configuration

Use AsciiPaint.config to define your personal painting style.

AsciiPaint.config do |config|
  config.character_width = 10
  config.character_height = 10
  config.color_map = { '!' => :blue, '@' => :red, '$' => :yellow }
end

You can also customize individual paintings by passing options to AsciiPaint.paint

AsciiPaint.paint(text, 'out.png', character_width: 10, character_height: 10)

Demonstration

ASCII paint logo

License

MIT

About

Convert ASCII art to PNG.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages