Skip to main content

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.

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.

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, gh2 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: 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.
gh2

📦 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

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

gh2 is LGPL-2.1 License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gh2-0.0.1a1.tar.gz (541.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gh2-0.0.1a1-py3-none-any.whl (32.8 kB view details)

Uploaded Python 3

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

Hashes for gh2-0.0.1a1.tar.gz
Algorithm Hash digest
SHA256 4b603962e782ffde78c38918f168f6a5887cc11ffea43133f2a962b95b215c0f
MD5 5f9f723caae913864eaeb47a27800b91
BLAKE2b-256 fb08c5dff229abcf4cd713cc7d869551ac067f07a3958f2b88e13b3da7ce4ac1

See more details on using hashes here.

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

Hashes for gh2-0.0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 c7a09df25d74c9d7b8577542c6e1320d3cc044d245773d8bc80e162238b0f130
MD5 d3078a81f3b921c96f072af266391731
BLAKE2b-256 0a1dd94fa0f79ba11d628265913ccfbed40d7468c905057c62abb9bf7a09b0ac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page