Skip to main content

genaa, a ASCII Art generator.

Project description

https://travis-ci.org/hirokiky/genaa.png?branch=master

genaa is a command line tool for generating ASCII Art.

Install

Install genaa by using pip.

pip install genaa

Now genaa is supporting only Python 3.3.

Basic Usage

Now genaa can only generate a box:

$ genaa box --text Hello!
+--------+
| Hello! |
+--------+

Above example is as one of simple command line tools. But, genaa usually behave as a filter command, like this:

$ echo -en 'Hello world!\nThis is genaa' | genaa box
+---------------+
| Hello world!  |
| This is genaa |
+---------------+

genaa box

You can specify these arguments to genaa box:

-h, --help            show this help message and exit
-t TEXT, --text TEXT  Passing text by argument into box
-W WIDTH, --width WIDTH
-H HEIGHT, --height HEIGHT
-s {ccomment,ascii,hash,simple}, --style {ccomment,ascii,hash,simple}

–width and –height

By default, genaa box command render the box with automatically specified width/height. But, you can specify these width and height of the box manually, like this:

$ echo -en 'Hello world!\nThis is genaa' | genaa box --width=20 --height=3
+----------------------+
| Hello world!         |
| This is genaa        |
|                      |
+----------------------+

–style

This example is using hash style which is used as comment block in Python:

$ echo -en 'Hello world!\nThis is genaa' | genaa box --style=hash
#################
# Hello world!  #
# This is genaa #
#################

–align

genaa box command put the text at the left side of the box. It also supports putting the text on center and right:

genaa box --align=center --text=Hello --width=20
+----------------------+
|        Hello         |
+----------------------+

Changes

0.1 (2013-12-28)

Initial release. Supporting:

  • Rendering boxes with text

    • Auto specifying width and height

    • Changing style of boxes

    • Align specifying (right, center, left)

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

genaa-0.1.tar.gz (5.1 kB view hashes)

Uploaded Source

Supported by

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