1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
if !ARGV(1, 2) puts "Usage: ruby image2ascii IMAGE_FILE [COLUMNS=80]" puts "Display given IMAGE_FILE (regular file or URL) as colored ascii art.\nCOLUMNS defines number of chars per one line." exit 1 end file = ARGV width = (ARGV[1] || 80) ascii_art = AsciiArt(file, width, true) print ascii_art.to_text |
Pastie
