The creative coding language for ASCII art and poetic form.
Project description
gh2: ASCII Art and Poetic Form
gh2 is a creative coding language for ASCII art and poetic form.
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.
- ASCII Art Animation
- Character-Style Generative Art
- Terminal Game Application
- Expressive Data Visualization
There are many reasons for creating gh2, but the most important one is that I hope not only does gh2 make you love programming for fun or show a magic world to you, but also make this journey relaxing and interesting.
📎 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, gh2 allows you to describe a color like(character, foreground color, background color), which means you can express more with the extra thecharacterchannel. - Powerful and Flexible: gh2 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 gh2.
- Easy to Learn and Use: gh2 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 gh2, you can create anything interesting in you head with it and enjoy the pure joy of coding.
📦 Installation
- Supported OS: gh2 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 gh2 --user
📺 A Simple Example
'''rect.py'''
import gh2 as gh
# draw a rect
gh.full_screen()
gh.rect(0, 0, 10, 10)
# run the sketch
gh.run()
$ python3 rect.py
🛸 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
gh2 is LGPL-2.1 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gh2-0.0.1a1.tar.gz.
File metadata
- Download URL: gh2-0.0.1a1.tar.gz
- Upload date:
- Size: 541.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b603962e782ffde78c38918f168f6a5887cc11ffea43133f2a962b95b215c0f
|
|
| MD5 |
5f9f723caae913864eaeb47a27800b91
|
|
| BLAKE2b-256 |
fb08c5dff229abcf4cd713cc7d869551ac067f07a3958f2b88e13b3da7ce4ac1
|
File details
Details for the file gh2-0.0.1a1-py3-none-any.whl.
File metadata
- Download URL: gh2-0.0.1a1-py3-none-any.whl
- Upload date:
- Size: 32.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7a09df25d74c9d7b8577542c6e1320d3cc044d245773d8bc80e162238b0f130
|
|
| MD5 |
d3078a81f3b921c96f072af266391731
|
|
| BLAKE2b-256 |
0a1dd94fa0f79ba11d628265913ccfbed40d7468c905057c62abb9bf7a09b0ac
|