Git Product home page Git Product logo

drawille-el's Introduction

⢸⣭⡁⣇⡀⡇⣚⡭⢸⠭⠂⠀⣏⡱⢸⠭⡂⡮⢵⠸⡰⡸⢸⢸⣀⢸⣀⢸⣭⡁

Drawille library implementation in elisp.

This is rather a experiment for me to get started with elisp an lisp in general.

It may not use the most powerful and efficient lisp tools. I tied to document the fariables correctly and keep everything as simle as I could.

Convert a small matrix to a char

(drawille-vector-to-char [0 0
                          1 1
                          0 0
                          1 0])

Drawing a sparkline plot

(drawille-draw-sparkline nil 2 -5 4 -9 3 4 20 9 9 -4 4 9 5 3 5 7 -2 5 4)
⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀
⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀
⠀⠀⢀⢿⠀⠀⠀⠀⠀⠀
⠀⠀⢸⠘⡆⢰⡀⢀⠀⠀
⠀⡄⡸⠀⡇⡇⢇⢿⢰⠄
⣇⡇⡇⠀⢸⠇⠀⠀⡏⠀
⢸⢱⠃⠀⠸⠀⠀⠀⠁⠀
⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀

This can be used to draw functions curves, like this:

(defun my-sin-function () "Demo sin function."
       (cl-loop for x from 0 to 100 collect (* 10 (sin (* 0.1 x)))))

(apply 'drawille-draw-sparkline nil (my-sin-function))
⠀⠀⠀⠀⠀⠀⢀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣀⠔⠊⠁⠀⠀⠈⠉⠢⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠤⠊⠉⠀⠀⠀⠉⠑⠤⡀⠀⠀⠀⠀⠀⠀
⠀⡠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⡀⠀⠀⠀⠀
⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⡀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠢⡀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⠄
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠒⠤⣀⣀⣀⡠⠔⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Drawing a path

(drawille-draw-path nil '(7 4) '(3 20) '(40 9) '(0 9))
⠀⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠈⡎⠉⠑⠒⠤⢄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢣⠀⠀⠀⠀⠀⠀⠈⠉⠒⠢⠤⢄⣀⠀⠀⠀⠀⠀
⠠⠤⠬⡦⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠭⠵⠶⠦⠄
⠀⠀⠀⢣⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Just like sparklines, this can be used to draw functions curves, producinq a circle as an example:

(defun my-circle-function ()
  "Demo circle function."
  (cl-loop for x from 0 to 126 collect
           (list (* 20 (sin (* 0.05 x)))
                 (* 20 (cos (* 0.05 x))))))

(apply 'drawille-draw-path nil (my-circle-function))
⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⢀⡠⠔⠊⠉⠀⠀⠀⠀⠈⠉⠒⠦⡀⠀⠀⠀⠀
⠀⠀⡠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠣⡀⠀⠀
⢀⡜⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⡄⠀
⡸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀
⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇
⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇
⠸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡸⠀
⠀⠱⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡰⠁⠀
⠀⠀⠈⠦⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠎⠁⠀⠀
⠀⠀⠀⠀⠈⠑⠢⠤⣀⣀⣀⣀⡠⠤⠒⠉⠀⠀⠀⠀⠀

Drawing a circle

For convenience, the circle function have been implemented.

(drawille-draw-circle nil 30 10 20)
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠤⠔⠊⠉⠉⠀⠀⠀⠀⠀⠉⠉⠒⠢⣀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡤⠚⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠲⣀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⡰⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠣⡀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢀⠎⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣄⠀⠀
⠀⠀⠀⠀⠀⠀⡜⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡆⠀
⠀⠀⠀⠀⠀⢸⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀
⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇
⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇
⠀⠀⠀⠀⠀⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠇
⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡸⠀
⠀⠀⠀⠀⠀⠀⢱⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡰⠃⠀
⠀⠀⠀⠀⠀⠀⠀⠳⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡰⠁⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠘⢢⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠎⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠤⠊⠁⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠑⠢⠤⢄⣀⣀⣀⣀⣀⠤⠤⠒⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Convert a matrix

(setq my-grid
 (drawille-from-matrix
  [[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
   [0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0]
   [0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0]
   [0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0]
   [1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0]
   [0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0]
   [0 0 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0]
   [0 0 0 1 0 0 1 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 1 0 0]
   [0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0]
   [0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 1 1 0]
   [0 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 1 0 0 0 0 1 0 1 0]
   [0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 0 1 0]
   [0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0]
   [0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0]
   [0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0]
   [0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 0]
   [0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0]
   [0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 1 0 0]
   [0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0]
   [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]]))
⠀⠀⠀⠀⠀⠀⢠⠒⢄⠀⠀⠀
⠑⢄⠀⣠⠤⣄⠀⠀⢀⡵⢤⡀
⠀⠀⢱⠁⢀⠜⣦⢤⡎⠀⡠⢳
⠀⠀⢸⡠⠋⠀⡇⠀⣇⠜⠁⢸
⠀⠀⠀⠳⠤⠞⠀⠀⠘⠦⠴⠃

Convert a string (current buffer)

(drawille-from-string (buffer-string) 80)
⠤⠤⠤⠤⠠⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠭⠭⠩⠍⠭⠭⠭⠩⠩⠭⠭⠭⠭⠍⠭⠍⠭⠩⠍⠭⠍⠭⠭⠭⠍⠬⠭⠩⠭⠬⠩⠍⠭⠭⠩⠍⠥⠭⠬⠭
⠭⠨⠭⠬⠭⠨⠩⠬⠭⠨⠭⠥⠍⠭⠩⠩⠬⠍⠈⠉⠉⠉⠉⠈⠉⠁⠉⠉⠉⠀⠁⠉⠉⠈⠁⠉⠉⠉⠉⠈
⠉⠛⠛⠛⠛⠓⠛⠛⠓⠒⠒⠒⠒⠐⡆⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣒⡒⠒⠒⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣒⣐⣒⣒⣒⡐⣐⣒⡒⣒⣒⣐⡒⣂⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣛⣛⣛⣛⣋⠉⠉⠉⠉⠉⠉⠉⠈⠉⠈⠈⠁⠁⠉⠈⠈⠈⠁⠁⠁⠉⠈⠈⠈⠈⠈⠈⠈⠁⠁⠉⠀⠀⠀⠀
⡇⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⡇⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣒⣒⣐⣒⣐⡂⣒⣒⡐⣂⣒⣒⣐⢒⣒⡒⠒⠐⠒⠒⠒⠐⠒⠂⠒⠒⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⣉⣉⣉⢘⣛⣛⣛⣋⣛⣋⣋⣚⣓⣙⣙⡃⣛⡃⣛⣛⣛⣋⣛⣐⣂⣒⣒⠐⠂⠒⠂⠒⠒⠒⠀⠀⠀⠀⠀
⡭⣭⣭⣭⣥⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⡇⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠥⠩⠭⠭⠭⠩⠩⠭⠭⠍⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠻⣿⡯⡿⡿⡷⡯⡭⡥⡭⡭⡉⡉⡈⡉⡁⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⢸⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⢸⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⢸⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⢸⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⡇⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣀⣸⣇⣇⡇⠇⠇⠇⠇⠇⠇⠇⠇⠇⠇⠇⠇⠇⠇⠇⠇⠇⠇⠇⠇⠇⠿⠤⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⡖⣶⣶⣶⣶⣤⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠇⠿⠿⠿⠿⠿⠿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣭⣬⣭⣭⣭⣌⣬⣭⣍⣥⡭⣭⣭⣩⣬⣍⣉⣉⡀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣭⣭⣭⣭⣥⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠿⠿⠿⠿⠿⠿⠟⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣭⣬⡭⣭⣭⣌⡬⣭⣍⣤⣤⣤⣤⣠⣤⣄⢀⣀⣀⣀⢀⡀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⡭⣭⣭⣭⣥⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⡇⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⡇⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣒⣐⣒⣒⣒⡐⣐⣒⡂⣀⣀⣀⣀⢀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣛⣛⣓⣛⣋⠉⠁⠉⠉⠉⠉⠉⠉⠉⠉⠉⠁⠉⠉⠉⠁⠈⠁⠉⠀⠉⠈⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠭⠩⠭⠭⠭⠭⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣥⣭⢥⡥⣭⢍⡭⣬⢅⣁⠉⠉⠉⠁⠉⠁⠉⠉⠉⠉⠉⠉⠈⠉⠈⠁⠉⠉⠈⠉⠉⠉⠁⠉⠉⠈⠉⠈⠉⠉
⢸⣿⢸⡇⣿⢸⡇⣿⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣸⣿⣸⣇⡿⠸⠇⠿⠸⠿⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣒⣂⣒⣒⣂⡒⠒⠒⠒⠒⠒⠐⠂⠒⠐⠒⠂⠒⠒⠒⠐⠂⠒⠒⠒⠂⠒⠒⠒⠒⠒⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠉⢹⡇⣿⡠⠊⣿⢸⣇⠔⢹⡇⣿⣀⡇⠶⠦⠶⠶⠖⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠈⢹⡇⣿⡠⠊⣿⢸⣇⠔⢹⡇⣿⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠭⠭⠩⠭⠡⠤⠠⠤⠤⠄⠤⠤⠠⠤⠠⠄⠤⠤⠤⠄⠤⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠛⣿⡏⣿⢹⡇⣶⢰⡆⣶⢰⡆⣶⣆⢒⡐⣒⡐⣒⡒⣒⢐⣒⣒⣒⢒⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣈⣿⣇⣿⡸⠇⠿⠸⠇⠿⠸⠇⠿⠧⠄⠤⠠⠤⠠⠤⠠⠄⠤⠤⠤⠄⠤⠤⠤⠤⠤⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣒⢐⣒⢒⣂⣀⣀⡀⣀⣀⣀⣀⢀⣀⣀⣀⢀⣀⢀⣀⢀⣀⡀⣀⡀⣀⣀⣀⣀⢀⣀⣀⣀⣀⣀⠀⠀⠀⠀⠀
⡭⣨⣭⣥⣩⢬⣭⡬⣭⡬⣭⣭⣥⡭⣍⢬⣭⣥⣥⢭⣭⡍⡉⣈⣉⡉⣉⡉⣉⣉⢉⣀⣀⣀⠀⠀⠀⠀⠀⠀
⠂⣿⣷⣿⣷⣿⣝⢻⣽⢶⣰⡖⣶⣖⣦⣶⣶⠴⠶⠦⠶⠶⠶⠶⠴⠶⠶⠶⠦⠶⠶⠤⠤⠤⠤⠤⠤⠤⠤⠤
⠁⠿⠿⠿⠿⠛⠛⠚⠙⠚⠛⠛⠊⠛⠚⠙⠛⠋⠚⠛⠘⠛⠋⠛⠙⠚⠛⠙⠛⠙⠛⠋⠛⠙⠛⠉⠉⠉⠉⠉

Convert an image (thanks to imagemagick)

(drawille-from-image
 "http://nicolas-petton.fr/ressources/emacs-website/images/emacs.png"
 "-resize 100x100 -dither Riemersma")
⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⡟⣿⢻⢫⢩⠫⡫⡝⢕⢝⢝⢻⢻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢟⠫⡫⡡⡪⢐⡣⠢⡕⡬⢪⢊⢕⢕⢕⢕⢕⢕⡪⡪⢝⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢻⡋⣕⢕⡪⡜⡔⢪⠕⠕⡕⢪⢪⢕⢕⠕⡕⠕⠕⠕⠕⠪⣜⡕⡫⣣⢹⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⡿⡟⡢⡑⢪⢐⢕⢨⢎⢌⡕⡫⢝⠪⠑⠃⠁⠁⠀⠀⠀⠀⠀⠀⠀⠀⠚⣪⣣⢣⢵⡪⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⠯⡪⢊⢜⠕⡪⡣⡑⡣⡃⢕⢪⢊⡕⣝⢕⢕⢕⠕⠕⠬⠢⠐⠀⠀⠀⠀⠀⢔⢥⡫⣪⢗⡛⢞⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⡿⡫⠪⡘⢕⢕⡣⢜⡪⡪⠈⠊⠁⠁⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡕⣹⢜⣦⢫⡝⣳⡼⣹⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⡏⠜⡕⡪⡓⢅⢪⢕⢌⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢀⢀⢀⠠⡀⡄⣄⢄⡤⣢⢕⣏⢼⡣⣎⠧⡹⣲⢚⡧⡿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⠭⡔⢝⠪⢎⢪⢢⢕⢕⢣⢀⠀⠀⠀⠀⠀⠀⠦⢖⢕⢧⢣⢳⢫⡞⡬⡕⣮⢜⠧⢺⡬⢧⣝⢎⢯⡭⢞⣵⢹⢳⣽⣿⣿⣿⣿
⣿⣿⣿⣟⡜⡪⡕⢜⢕⢕⢕⢕⡕⡕⡕⢕⡀⡀⠀⠀⠀⠈⠑⠓⣥⢫⣣⢗⡝⢜⠮⡱⣫⠽⡫⡼⢳⡬⡞⢳⣹⡏⣮⠞⣏⡾⣿⣿⣿⣿
⣿⣿⣿⠮⡪⡪⢜⢕⡕⡕⢕⢕⢪⢜⣪⢗⡪⡣⡣⢠⢀⠀⠀⠀⠀⠀⠂⠋⢞⡫⠯⡹⣎⢯⣭⡞⠯⣼⢹⣏⡵⢹⣺⡽⣓⣯⣿⣿⣿⣿
⣿⣿⣿⢪⢔⡜⡕⡕⢮⢪⢣⡪⣵⢣⡢⣕⡝⠬⠝⠕⠑⠓⠐⠀⠀⠀⠀⠀⠀⠀⠋⠹⢼⣓⢖⡽⣛⡧⢏⣞⣻⡭⣳⣵⡞⡞⣳⣿⣿⣿
⣿⣿⣷⢕⡥⡪⣪⢪⡫⡣⡕⣪⡜⠕⠈⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⣀⢀⣄⢦⡔⣳⠼⡞⢳⣳⡹⣯⣚⡱⣽⣞⣖⠽⣽⢟⣿⣿⣿
⣿⣿⣿⡗⡪⢎⠜⡕⡕⡜⡮⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡄⢦⣲⡬⢭⣞⢯⡲⣵⡹⣼⠛⣽⣏⣳⣵⢗⢺⡯⡗⡼⣼⢻⣺⣿⣿⣿⣿
⣿⣿⣿⣏⡞⡕⢝⡮⢕⠼⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡼⣣⣞⡳⠦⣽⡫⣲⣞⡳⣳⡹⣺⠽⣗⣳⣖⡳⡯⡯⡽⡵⣽⣞⢽⣼⣾⣿⣿⣿
⣿⣿⣿⣯⡮⣜⢵⢪⠳⡃⠀⠀⠀⠀⠀⠀⠀⠀⠼⣱⠼⣓⣦⠽⣛⢧⣳⡵⣲⠽⣓⣽⢳⡯⣞⣖⣧⢯⢗⡟⡯⣻⣵⢗⢽⣷⣿⣿⣿⣿
⣿⣿⣿⣿⣧⣕⢣⡳⣫⢝⡣⢀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠃⠜⠝⠳⠭⠳⠹⠺⠽⠞⠞⡽⠭⢧⡗⣳⣯⢭⢯⣻⡺⣗⣟⣽⣾⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣮⡝⣜⢥⡳⣞⡭⢧⢢⠄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢟⣽⣮⣯⣮⣷⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣷⣚⢧⡏⢦⣏⡺⣭⣛⡧⢼⣓⢖⣢⠤⣄⢄⣠⡄⡄⣠⢤⠦⠠⠀⠀⠀⠀⠀⠀⢀⣤⡽⢵⣧⡗⣾⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣧⡹⡳⣼⢹⣲⠵⣹⢽⣚⢯⣎⠯⠗⠏⠃⠉⠁⠁⠀⠀⡀⢀⢠⢠⢖⢖⢯⢽⡵⣻⣻⢞⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣗⣧⢮⢞⡛⣧⡯⣪⢥⢄⣄⢤⡴⣒⡰⣴⣲⢗⢷⢽⢟⣽⡟⣽⣟⣻⣟⣻⣵⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣏⣯⡧⢗⣧⡯⡯⣮⡟⡻⢺⣽⢗⣗⣟⣟⢽⢽⣧⢿⣺⢞⢞⣷⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣾⣻⣵⢵⢻⢯⣽⢗⢟⣵⣗⣗⡿⣽⣺⣽⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣷⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿

Drawing a point

(setq my-grid (drawille-draw-dot my-grid 26 35))
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢠⠒⢄⠀⠀⠀⠀⠀
⠑⢄⠀⣠⠤⣄⠀⠀⢀⡵⢤⡀⠀⠀
⠀⠀⢱⠁⢀⠜⣦⢤⡎⠀⡠⢳⠀⠀
⠀⠀⢸⡠⠋⠀⡇⠀⣇⠜⠁⢸⠀⠀
⠀⠀⠀⠳⠤⠞⠀⠀⠘⠦⠴⠃⠀⠀

Drawing a line

(setq my-grid (drawille-draw-line my-grid  12 24  20 42))
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠆⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢀⠎⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⡎⠀⠀⠀⠀⠁
⠀⠀⠀⠀⠀⠀⠀⡜⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⡜⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢠⠒⢄⠀⠀⠀⠀⠀
⠑⢄⠀⣠⠤⣄⠀⠀⢀⡵⢤⡀⠀⠀
⠀⠀⢱⠁⢀⠜⣦⢤⡎⠀⡠⢳⠀⠀
⠀⠀⢸⡠⠋⠀⡇⠀⣇⠜⠁⢸⠀⠀
⠀⠀⠀⠳⠤⠞⠀⠀⠘⠦⠴⠃⠀⠀

Principle

I use a matrix as a canvas, for performance, and so that anything that can operate on a matric can also operate on that

[[a0 a1 a2 a3 a4 a5]
 [b0 b1 b2 b3 b4 b5]
 [c0 c1 c2 c3 c4 c5]
 [d0 d1 d2 d3 d4 d5]
 [e0 e1 e2 e3 e4 e5]
 [f0 f1 f2 f3 f4 f5]
 [g0 g1 g2 g3 g4 g5]
 [h0 h1 h2 h3 h4 h5]]

And then, transforming it to this matrix of braille characters

[[[a0 a1   [a2 a3   [a4 a5  ╮
   b0 b1  / b2 b3  / b4 b5  │ One braille
   c0 c1 /  c2 c3 /  c4 c5  │ character
   d0 d1]   d2 d3]   d4 d5]]╯
 [[e0 e1   [e2 e3   [e4 e5
   f0 f1  / f2 f3  / f4 f5
   g0 g1 /  g2 g3 /  g4 g5
   h0 h1]   h2 h3]   h4 h5]]]

With the new matrix that can be written as:

[[[a0 a1 b0 b1 c0 c1 d0 d1] <- One braille character
  [a2 a3 b2 b3 c2 c3 d2 d3]
  [a4 a5 b4 b5 c4 c5 d4 d5]] <- One row of braille characters
 [[e0 e1 f0 f1 g0 g1 h0 h1]
  [e2 e3 f2 f3 g2 g3 h2 h3]
  [e4 e5 f4 f5 g4 g5 h4 h5]]] <- Two row of braille characters

Thanks

To the original drawille authors for the idea and building everything, as well as all the others that made a Drawille implementation.

To (IRC) #[email protected], particularly:

  • forcer that for helping me finding what I could not find myself, and for advises;
  • wasamasa for its interest into this project, bringing some motivation! Also, he did this vector library that was a source of inspiaration for some functions.
  • hatschipuh for tring the library and providing this gists with implementation examples that have been used to write the rest of the library.

./drox.png

Still in progress: A library that will bring images in linux console, without graphical server like X11 and without using framebuffer, that usually require root.

So this is the kind of picture it can represent:

▓▓▓▓▓████▓▓▓██████████████████████████████████████████████████████████████████████████████████████
█▓▓▓▓█████▓▓▓█████████████████████████████████████████████████████████████████████████████████████
▓▓▓▓▓██████▓▓▓██████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████████████████████████████████
▓▓█▓▓██████▓▓▓▓████████████████████████▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████████████████████
████▓▓██▓▓██▓▓▓▓██████████████████████▓▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████████████████████████
▓█▓▓▓▓███████▓▓▓▓▓██████████████████▓▓▓▓█▓▓▓███▓▓▓▓▓▓▓▓▓▓████▓▓█▓▓▓▓▓▓███████████████▓▓███████████
▓▓▓█▓▓▓▓█████▓▓▓████████████████████▓▓▓███▓▓▓▓████▓▓██▓███████▓▓▓▓▓▓▓▓▓▓██████████████████████████
█▓▓▓▓▓▓▓██████████▓████████████████▓▓▓▓▓███████▓▓██▓█▓███▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▓███████████████████████
█▓▓▓▓▓▓▓▓████████████████████████▓▓▓▓███▓██████▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████████████████
██▓▓▓▓▓▓▓████████████████████████▓▓▓▓▓██▜▜████▓▓▓▓▓▓▓▓▓▓▓██▓███▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████████████
███▓▓▓▓██▓██████████████████████▓▓▓█████▙█▓▓███▜▜████████████████▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓████████████████
████▓▓████▓█████████████████████▓▓▓██████▜██▀    ▐▚▖▄▄▄▜▜▜█████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████████████
▓████▓▓▓████████████████████████▓▓▓▓████▄▛▟░            ░▐█████▓▓▓▓▓▓▓██▓▓███▓▓▓▓▓████████████████
▓██▓███████████████████████████▓▓██▓▓▓██▀░               ▐██████▓▓███▓███▓▓▓▓▓▓▓▓▓▓███████████████
▓▓▓█████████████████████████████▓███▓▓█▌                 ▐██████▓▓█████▓▓▓▓▓▓▓▓▓▓▓▓███████████████
▓▓█▓██████████████████████████████▓████▙                 ▐███████▓▓▓▓▓▓▓██▓▓▓▓▓▓▓█████████████████
████████████████████████████████▓█▓███▓█░            ▗▄█████████████████▓██▓▓▓▓▓▓███████████▓█▓███
▓█▓█████████████████████████████▓▓▓▓▓▓████▙▄▙▄▗▗ ▄▗▄███▙▓████████████▓▓▓▓██▓▓▓▓███████████████████
▓▓███████████████████████████▓▓▓▓▓▓██▓█▓██▙█▓███▌▝▜██▜▀▝▀▟██▀███████▓▓██▓▓▓███████████████████████
██████████████████████████████▓████▓███▓██▜▛▝▀░▝░ ▐██░  ░▀▝  ▟█████▓▓▓███▓████▓███████████████████
██████████████████████████████▓████▓██▙▓▓█ ░      ▐██▙    ▖▄▙██████▓▓███▀█▓█████████████████▓█████
██████████████████████████████▓▓█▓▓▓█▓▓▓▓█▙       ▝██▜▙░  ▜████████████░  ▜▓███████████████▓██████
████████████████████████████████▓▓▓▓▓▓▓▓▓▓█▌       ▐▌▗▟▙  ▜█████████▀░    ▐▓████████████████▓█████
█████████████████████████████████████▓▓▓▓▓▀▜▙   ░▚▚██▜▀▀   ▜██████▀        ▓███▓▓█████████▓▓▓▓████
██████████████████████████████████████▓▓▓▀  ▝▌  ▗ ░▛▗▙▄▄▚▜▘▐████▛░         ▐█▓▓▓▓▓▓▓▓███████▓▓█▓█▓
████████████████████████████████████▓▓▓█░       ▀▝▚▚▟▄▄█▄░ ▖███▀            ▓▓▓▓▓▓▓▓▓▓▓█████▓▓▓██▓
████████████████████████████████████▓▓▓░       ░  ▝▝▝▝▝▚▀ ▗███▀   ░▗▗▗▗▗▗▄▄▄▓▓▓▓▓▓▓▓▓▓▓▓▓████████▓
█████████████████████████████████████▓▘         ░▚▗▗▄▙▄▟█████▘░▄▙█▓▓▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████
█████████████████▓██████████████████▓▄▄▙▙▓▓▓▓▙▄░  ▝▜██████▓█▗▄▓▓▓▓██▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████
███████████████████████████████████▓▓▓▓▓▓▓██▓▓█▓▙▗  ▜███████▓▓▓▓██▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████
███████████████████████████████████▓▓▓▓▓▓███▓▓▓▓▓▓▙▄▟██████▓▓▓███▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████
█████████████████████████████████▓▓▓▓▓▓▓████▓▓██████████▓▓▓▓███▓▓▓███▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▓▓▓██▓▓▓██
████████████████▓▓▓█████████████▓▓▓▓▓▓▓▓████▓██████████▓▓████▓▓▓▓███▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓█
███████████████▓▓▓███████████████▓▓▓▓▓▓▓██████████████▓▓██▓▓▓▓█▓███▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓▓█
███████████████▓▀▀██▓▓▓▓▓▓▓████▓█▓▓▓▓▓▓▓██▓██████████▓▓▓██▓▓▛▀████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓█
█████████████▓▓▌  ░▜███▀▀▝█▓▓█████▓▓▓▓▓▓████████████▓▓██████▘▟███▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████▓▓▓▓▓▓▓▓▓▓█
████████████▓█▝     ░▜▌ ▄███▓▓█▓███▓▓▓▓▓███████████▓▓▓████▜ ▓███████▓▓▓▓▓▓████▓▓███████▓▓▓▓▓▓▓▓▓▓█
████████████▓▙     ░  ▝█████▓▓█████▓▓▓▓▓███████████▓▓▓▓██▘▖▓█████▓██▓▓▓▓████▓▓███████▓▓▓▓▓▓▓▓▓▓▓▓█
█████▓█████▓▓▀    ░░ ▝█▚▜▛▜▓▓▓▓▓████▓▓▓▓██▓███▓██▓▓▓▓▓▓█▐▄█▓▓▓▓▓▓▓▓██▓▓███▓▓█████████▓▓▓▓▓▓▓▓▓▓▓▓▓
█▓▓█▜▜▜▓▓▓▓▓▓▗     ▝▝▀██▙▀█▓▓█▓▓████▓▓▓████▓██▓▓▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓█████████▓▓▓▓▓▓▓▓▓▓▓█▓▓
█▀░░▘▄▄▚▀  ▝▝▜░  ▖▜▚▜██████▓▓██▓████████▓██▓▓█▓▓▓▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓█▓██▓▓███████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███
░▗▄████▜▙▄▄▗░▖▗▗   ▚█████▓▓▓████████████████▓▓▓▓▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓█████▓▓██████▓▓▓████▓▓▓▓▓▓▓▓▓▓▓██
████▀█▙████████▗░    ▝▝▜▜▓▓█████████████████▓▓▓▓▓▓▓▓▓▓█████▓▓█▓▓█████▓████████▓▓▓▓███▓▓▓▓▓██▓▓▓▓▓█
███▄█████████████▙▙▄▗▘░░ ░▝▀▜▓▓█▓▀▝▝▝▝▝▝▝▜█▓█▓▓▓▓▓▓▓▓███████████████▓█████▓██▓▓▓▓▓███▓▓█████▓▓▓▓▓█
██████████████████████▙▙▄▗▗░░  ░░ ▖▜▘▘ ░   ▟█▓█████▓███████████████▓██████▓███▓▓█████▓████▓▓▓▓▓▓▓█
███████████████████████████▙▙▙▄       ▗▄▄▙▙█▓████████████████████▓▓█████████████████████▓▓▓▓▓▓▓▓▓█
██████████████████████████████▙▙▙▄▄▄▙▟██████████████▓█████▓█████▓███▓█████▓████████████▓▓▓▓▓▓▓▓▓▓█
█████████▓█████▓▓██████████████▀▀▝▗▗▄▙████▓███████████████▓▓█████████▓██████████████████▓▓▓▓▓▓▓▓▓█
███████▓████▓▓▓▓▓████████████████████████▓█████████████▓▓▓███████████▓██████████████████▓▓▓▓▓▓▓▓▓█
████████▓██▓▓▓███████████████████▙▙▙▙████▓██████████▓▓██████████████████████████████████████▓▓▓▓▓█
███▓█████▓▓▓██████████████▓▓███████████▓▓██████████▓███████████████▓█████████████████████████▓▓▓▓█
█▓▓██████▓▓▓▓████████████▓▓▓▓▓▓███████▓▓▓██████████████████████████████████████████████████████▓██
██▓▓▓██▓▓▓▓▓▓█▓▓███████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████████████████████████████████████████████████████
█▓███████▓▓▓███▓▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████████████████████████████████████████████
████▓▓████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███████████████████████████████████████████████████████
████████▓▓▓█████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓████████████████████████████████████████████████████████
█████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▓▓█▓███████████████████████████████████████████████████████████
█████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████████████████████████████████████████████████████████
██████████████████████████████▓▓▓▓████████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████████████████████████████████████████
█████████████████████████▓▓▓██████████████████████████████████████████████████████████████████████

One Beethoven

"                      ▄▄▙▄▄▄▙▙▓▙▙▙▄▄▄▄▙▙▙▄▗
               ▗▄▄▙▙██████████████████████▓▙▗
             ▄▓██████████████████████████████▓▙▙▄▗▗▗▗
         ▗▄▙████████████████████████▓▓█████████████▓▓▌
        ▟▓▓████▓████▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓██▓▓▓██████████▓▓▌
      ▄▓▓▓████▓▓▓███▓▓▓▓█▀▜▜█▝▝▝▝▜▜▜▜██▓████████▓▓▓▓▓▓▓▓▓▀
     ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▛              ▝▀▀▀▀▘ ▝▝▜██▓▓▓▓▓▓▗
     ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▙▗                       ▝▀▜▓▜▓▓▓▌
    ▟▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▙▗                       ▐▓
    ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▌                   ▗   ▓▗
   ▖▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▌                  ▖▌    ▜▙▗
   ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████▌   ▄▄▄▄▄▙▗▗▗  ▖▗  ░░ ▗▗▄▌██▓
   ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████▛ ▚▗▟█████████▙▟ █▗   ▄██▛▄██▓▙▙▙▗
    █▓▓▓▓▓▓▓▓▓▓▓██████████▛▄▙▓▓█▓▓▓▓▓▓▓████░█▙▗▗▗█▓███████▓▀░
    ▓▓▓▓▓▓▓▓▓▓▓█████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███████▓▓▓▓▓▓▓▓▗
  ░▄▓██████▓▓▓▓███████████▓▓▓▓▓▓▓▓▛▝▜▛▝▜▓▓▓███▛▀▝▐█▟█▓▓▛▜▓▘
  ▟███▓▓█████▓▓▓█████████▓▓▓▓▓▓▜▜▜▘▀▀▌▌██▛▜███▘   ▐██▐▓
  ▓████▓▓▓███▓▓▓█████████▛▝▝▘▀░▝▀▜█████▀▝  ███     ▐▗▐▌
  ▓████▓▓▓▓██▓▓▓▓█████████▙▗              ▖███░     ▖ ▓
  ▓████▓▓▓▓███▓▓▓███████████▙▗            ▐███▙░     ▜▛
  ▝▓███▓▓▓███▓▓▓▓▓████████████▙▗          ▐████▙▗    ▐▓
   ▝▓███▓▓███▓▓▓▓▓██████████████▙          ██████▙▙▄  ▓▗
     ▐▓██████▓▓▓▓▓███████████████▙         ▟████▛     ▝▓▗
      ▝▓█████▓████████████████████▙      ▖██████▗      ▟▌
       ▐▓████▓█████████████████████▌    ▄████████▙▙▄▄▄█▛
        ▐▓███▓▓█████████████████████▙▗▄████▓▓▓▓▓▓▓▓▓▓▓▀  ▄▄▗
          ▝▓██▓▓▓█████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▙▗ ▐▓▓▗
           ▝▓███▓▓▓████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▙█▓█▓
            ▝▓████▓▓▓█████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████▓▛
             ▐██████▓▓▓██████▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀
             ▝▓███████▓▓▓████████▓█▓▓▓▓▓▓▓▓▓▓▓▓███▓▜▀▜▓▓▜▀
              ▓████████▓▓▓▓████████████████████████▌
              ▐███████████▓▓▓▓▓███████████████████▓▘
              ▝▓█████████████▓▓▓▓▓▓▓▓▓████▓▓███▜▜▀
              ░▓████████████████▓▓▓▓▓▓▓▓▓▓▓▌
              ▓██████████████████████████▓▛
            ▖▓███████████████████████████▛
            ░▓██████████████████████████▛
             ▝▜▓████████████████████████▌
               ░▝▜█████████████▀       ▐▓
                  ▝▜▓█████████░       ▜▌▓░
                     ▝▜██████▛      ░▚█▘▐▌
                       ▝▀▓███▘           ▓░
                          ▝▜▙▗           ▐▌
                            ░▝▚▄░         ▓▗
                               ▝▜▚▗       ▐▌
                                  ▝▚▙▗    ▐▌
                                    ▝▜▙▗  ▐▙
                                      ▝▜▙░▄▓

One leningen

This does not produce the exact same thing as drawille. Try this…

(drox-from-matrix
 [[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
  [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
  [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
  [0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0]
  [0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0]
  [0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0]
  [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0]
  [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0]
  [0 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0]
  [0 0 1 0 0 1 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 1 0 0]
  [0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0]
  [0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 1 1 0]
  [0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 1 0 0 0 0 1 0 1 0]
  [0 0 0 0 1 0 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 0 1 0]
  [0 0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0]
  [0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0]
  [0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0]
  [0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 0]
  [0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0]
  [0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 1 0 0]
  [0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0]
  [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]])

Or simply make an image with this:

(drox "path/to/any/type/of/image" "-e xtra -arg for imagemagick")

drawille-el's People

Contributors

sshbio avatar syohex avatar alvinfrancis avatar

Watchers

James Cloos avatar Eric Crosson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.