Saturday, April 25, 2015

ASCII canvas in Python

Python modules that allow to draw primitives using terminal as canvas. I called it ASCII canvas.
I've added support of colors. So now it is possible to draw colored ASCII-images.

Using script to convert RGB pixels from image to terminal colors, I've got terminal art:

Supported colors test table. For Linux:
Colors in terminal Linux
And for Windows:
Colors in terminal Windows

Sunday, April 5, 2015

ASCII Clock in Terminal using Python

Today I've created Python script that prints a clock in ASCII art style to the terminal.
To perform ASCII drawing a special Python class (ASCII Canvas) with several functions was created.
Source code is available on my GitHub: https://github.com/delimitry/ascii_clock
Here are the result:
Also I've provided resizing of clock. So if the size of clock if small, week day and day are hidden.
Added scale by x-axis to equalize the width and height of the clock, because fonts' height is more than their width.
For linux version added a set of standard chars to draw the clock items with. Here you can see the clock under linux: