Skip to main content

A Python library for generating ASCII art from text

Project description

asciigenator

A lightweight Python library for generating ASCII art from text.

PyPI version Python Versions License Python application Coverage

Table of Contents


Installation

  • Clone the repository:

    git clone https://github.com/bhatishan2003/asciigenator.git
    cd asciigenator
    
  • Install the package:

    pip install .
    
  • For development (editable mode):

    pip install -e .
    

Usage

Basic Python Usage

import asciigenator

# Test simple font
print("=== Simple Font ===")
print(asciigenator.generate("Hello", font="simple"))

# === Simple Font ===
#  *   **  ** *** ***  ** *** *   *
# * * *   *    *   *  *   *   **  *
# ***  *  *    *   *  * * **  * * *
# * *   * *    *   *  * * *   *  **
# * * **   ** *** ***  ** *** *   *

print("\n=== Block Font ===")
print(asciigenator.generate("Ishan", font="block"))

# === Block Font ===
#   █
#  █ █  ████  ████ █████ █████  ████ █████  █   █
#  █ █  █     █       █     █   █     █     ██  █
# █████  ███  █       █     █   █  ██ ████  █ █ █
# █   █     █ █       █     █   █   █ █     █  ██
# █   █ ████   ████ █████ █████  ████ █████ █   █

print("\n=== Available Fonts ===")
print(asciigenator.list_fonts())

# === Available Fonts ===
# ['block', 'simple']

Command Line Usage

asciigenator "Hello World"
asciigenator "Hello World" --font block
asciigenator --list-fonts
asciigenator "Hello World" --font block  --border "#"
asciigenator "Hello World"  --font block --color magenta

Testing

Run all tests:

pytest -v

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

asciigenator-0.0.3.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

asciigenator-0.0.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file asciigenator-0.0.3.tar.gz.

File metadata

  • Download URL: asciigenator-0.0.3.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for asciigenator-0.0.3.tar.gz
Algorithm Hash digest
SHA256 7491a2d4b865f643a411a5b2f8db12a3a02a91306fa807386343d6a4f1624df0
MD5 54ff25b9fa5422d9e23482e5200de2ae
BLAKE2b-256 3bd10e3b184796197f8b5d74a76438a6396dd4e07dec8e70bbdf896aa85b4b0d

See more details on using hashes here.

File details

Details for the file asciigenator-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: asciigenator-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for asciigenator-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 34d0eec8b390e8ce9dfd5014843868d7170fb3fcde677462f733ae965617b39c
MD5 86520af6eb3f827d34a40539c9610ced
BLAKE2b-256 e137f47cec7b74b5fdd19bf79a8a5aeaa264c7461f95381e12e31ced68800102

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