Skip to content

charming-art/charming-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Charming.py: Character Terminal Art Programing

Charming.py is a creative coding language designed for Character Terminal Art Programming.

It is currently written in Python and provides Processing-like APIs, which aims to help artists, designers, educators, beginners, and anyone else to easily create following visual effects in terminal.

There are many reasons for creating Charming.py, but the most important one is that I hope not only does Charming.py make you love programming for fun or show a magic world to you, but also make this journey relaxing and interesting.

cover

๐Ÿ“Ž Links

โœจ Features

  • Highly Expressive: Unlike traditional drawing system or tool using three numerical channels ((r, g, b) or (h, s, v)) to describe a color, Charming.py allows you to describe a color like (character, foreground color, background color), which means you can express more with the extra the character channel.
  • Powerful and Flexible: Charming.py is not as same as urwid or click to build console line interface. Actually it more like asciimatics, art or tcharts to draw some visual effects in the terminal but with more flexibility. Instead of drawing limited and predefined shapes or effects, you can draw some basic primitives, custom shapes, curves, images, typography with transforms (translate, rotate, shear) and even events (mouse, keyboard) in Charming.py.
  • Easy to Learn and Use: Charming.py is very beginner-friendly, because of Python's simple syntax and Processing's concise APIs. It will be more easier if you are already familiar with them. Once you've master Charming.py, you can create anything interesting in you head with it and enjoy the pure joy of coding.

Charming

๐Ÿ“ฆ Installation

  • Supported OS: Charming.py currently only supports MacOS, though it should also work for any other platform that provides a working curses implementation. It soon will support Windows and run in Modern Browsers.
  • Python: 3.6/3.7/3.8
$ pip3 install charming --user

๐Ÿ“บ A Simple Example

'''rect.py'''
import charming as cm

# draw a rect
cm.full_screen()
cm.rect(0, 0, 10, 10)

# run the sketch
cm.run()
$ python3 rect.py

get started

๐Ÿ›ธ Future work

  • Using Rust as backend to run in browser and support multiple OS, using both JavaScript and Python as frontend.
  • Add more API to be more expressive.
  • Build a community and online playground like OpenProcessing.

๐Ÿ’ณ License

Charming.py is LGPL-2.1 License.