Transform your text into beautiful ASCII art
ASCII-Art is a command-line tool that converts regular text into stylized ASCII art using predefined banner templates. Perfect for creating eye-catching headers, banners, or just having fun with text!
π Try the Live Demo
- π¨ ASCII art using
standardbanner style (withshadowandthinkertoysupport planned) - π Color support - colorize entire output or specific substrings with ANSI colors
- π Support for letters, numbers, spaces, and special characters
- π Multi-line output with
\nsupport - π± Automatic terminal width detection and wrapping - adapts to any screen size
- β‘ Fast and lightweight - uses only Go standard library
- π― Simple command-line interface
# Clone the repository
git clone https://github.com/g-laliotis/ascii-art.git
cd ascii-art
# Run directly
go run ./cmd/ascii-art "Hello World"
# Or use Makefile
make run$ go run ./cmd/ascii-art "Hello"
$
_ _ _ _ $
| | | | | | | | $
| |__| | ___ | | | | ___ $
| __ | / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ $
$- Go 1.19 or higher
# Build executable
make build
# Run tests
make test
# Install to GOPATH/bin
make install
# See all available commands
make help# Build executable
go build -o ascii-art ./cmd/ascii-art
# Run all tests
go test -v ./...# Basic text
go run ./cmd/ascii-art "Hello"
# Multi-line text
go run ./cmd/ascii-art "Hello\nWorld"
# Special characters and numbers
go run ./cmd/ascii-art "Hello There! 123"
# Color entire output
go run ./cmd/ascii-art --color=red "Hello"
# Color specific substring
go run ./cmd/ascii-art --color=blue kit "a king kitten have kit"
# Available colors: red, green, yellow, blue, magenta, cyan, white, orange
# Empty string (prints nothing)
go run ./cmd/ascii-art ""
# Long text (automatically wraps to terminal width)
go run ./cmd/ascii-art "ABCDEFGHIJKLMNOPQRSTUVWXYZ"The program automatically detects your terminal width and wraps long text accordingly:
- Smart wrapping: Automatically breaks long text at character boundaries
- Any terminal size: Works on narrow mobile terminals to wide desktop screens
- Preserves formatting: Each wrapped section maintains proper ASCII art structure
- Fallback support: Uses COLUMNS environment variable or defaults to 80 characters
ascii-art/
βββ cmd/ascii-art/main.go # Entry point
βββ internal/
β βββ ascii/ # Core ASCII generation logic
β β βββ art.go # ASCII art generation functions
β β βββ banner.go # Banner file loading and parsing
β β βββ color.go # Color support with ANSI codes
β β βββ art_test.go # Unit tests for art generation
β β βββ banner_test.go # Unit tests for banner loading
β β βββ color_test.go # Unit tests for color functionality
β βββ version/
β βββ version.go # Version information
βββ assets/
β βββ standard.txt # Standard banner template (8 lines per character)
βββ docs/
β βββ index.html # GitHub Pages website with live demo
βββ .github/
β βββ workflows/
β βββ ci.yml # GitHub Actions CI/CD pipeline
βββ main_test.go # Integration tests using exec.Command
βββ edge_cases_test.go # Comprehensive edge case tests
βββ go.mod # Go module definition
βββ Makefile # Build automation (build, test, install)
βββ README.md # Project documentation
βββ CHANGELOG.md # Version history and changes
βββ CONTRIBUTING.md # Contribution guidelines
βββ LICENSE # MIT License
- Input: Takes a string as command-line argument
- Terminal Detection: Automatically detects terminal width using system calls
- Processing: Maps each character to its 8-line ASCII representation
- Smart Wrapping: Calculates character widths and wraps when exceeding terminal width
- Output: Combines characters horizontally with automatic line breaks
- Format: Each character is exactly 8 lines tall
- Support: ASCII characters 32-126 (printable characters)
- Adaptive Width: Characters have variable widths, automatically handled
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
This project follows Go best practices:
- Standard Go formatting (
go fmt) - Comprehensive unit tests (100% coverage)
- Clean, readable code structure
- Proper error handling
- CI/CD with GitHub Actions
- Giorgos Laliotis
- Stavros Gkraikas
This project is licensed under the MIT License - see the LICENSE file for details.
See CHANGELOG.md for a detailed history of changes, new features, and bug fixes.
- π Live Demo & Documentation
- π Changelog
- π Contributing Guidelines
- π Report Issues
- π‘ Feature Requests
This project is part of the Zone01 curriculum and is now open-source for the community.