Skip to content

Latest commit

 

History

History
274 lines (220 loc) · 6.41 KB

File metadata and controls

274 lines (220 loc) · 6.41 KB

🎨 ASCII Art Feature - Complete!

✨ What Was Built

I've successfully implemented a new ASCII Art feature for Augusto that allows users to create concrete poetry-style visual art by writing one word using another word as filler characters!

🎯 Feature Overview

The Command

augusto art <main_word> <filler_word>

What It Does

Creates large ASCII letters spelling the main word, filled with repeating characters from the filler word.

Examples

Example 1: RUST with code

augusto art "RUST" "code"
code  c   o  deco decod
e   c o   d e       c  
odec  o   d  eco    d  
e  c  o   d     e   c  
o   d  eco  deco    d

Example 2: LUXO/LIXO - Augusto de Campos Tribute

augusto art "LUXO" "LIXO"
L     I   X O   L  IXO 
L     I   X  O L  I   X
O     L   I   X   O   L
I     X   O  L I  X   O
LIXOL  IXO  L   I  XOL

Inspired by Augusto de Campos' iconic concrete poem: "LUXO" (luxury) written with "LIXO" (trash) - a powerful social commentary.

Example 3: LOVE with heart

augusto art "LOVE" "heart"
h      ear  t   h earth
e     a   r t   h e    
a     r   t h   e arth 
e     a   r  t h  e    
arthe  art    h   earth

Example 4: POET with augusto

augusto art "POET" "augusto"
augu   sto  augus toaug
u   s t   o a       u  
gust  o   a ugus    t  
o     a   u g       u  
s      toa  ugust   o

📁 Files Created/Modified

✅ New Files (2)

  1. augusto/src/ascii_art.rs (359 lines)

    • Complete ASCII art generation module
    • 26 letter patterns (A-Z)
    • 2 public functions
    • 5 comprehensive tests
  2. ASCII_ART_FEATURE.md

    • Detailed implementation documentation

✏️ Modified Files (3)

  1. augusto/src/main.rs

    • Added command-based CLI
    • New commands: anagram, art, help
    • Backwards compatible
    • 2 new integration tests
  2. README.md

    • Updated features section
    • Added ASCII art documentation
    • Multiple usage examples
  3. CHANGELOG.md

    • Documented new feature
    • Listed all changes

✅ Quality Metrics

Tests

  • Total Tests: 10 (all passing ✅)
  • New Tests: 7 (5 module + 2 integration)
  • Coverage: Comprehensive

Code Quality

  • cargo build - Success
  • cargo test - 10/10 passing
  • cargo fmt - Formatted
  • cargo clippy - No warnings

Documentation

  • ✅ Module documentation
  • ✅ Function documentation
  • ✅ Usage examples
  • ✅ README updated
  • ✅ CHANGELOG updated

🎭 Features Implemented

Core Functionality

  • ✅ All 26 letters (A-Z) supported
  • ✅ 5x5 character grid per letter
  • ✅ Cyclic filler word repetition
  • ✅ Automatic uppercase conversion
  • ✅ Proper letter spacing

CLI Enhancements

  • ✅ Command-based interface (anagram, art, help)
  • ✅ Clear usage messages
  • ✅ Input validation
  • ✅ Error handling
  • ✅ Backwards compatibility

Code Quality

  • ✅ Comprehensive tests
  • ✅ Full documentation
  • ✅ No clippy warnings
  • ✅ Formatted code
  • ✅ Future-ready (spacing function ready for use)

🚀 How to Use

Install/Build

cd augusto
cargo build --release

Run Examples

# ASCII Art
cargo run --release -- art "RUST" "code"
cargo run --release -- art "LOVE" "heart"
cargo run --release -- art "POET" "augusto"

# Anagrams (still works!)
cargo run --release -- anagram "cat"
cargo run --release -- "cat"  # backwards compatible

# Help
cargo run --release -- help

💡 Design Philosophy

This feature embodies Augusto de Campos' concrete poetry principles:

  • Visual = Content: The appearance IS the meaning
  • Words as Shapes: Typography becomes art
  • Creative Recombination: Deconstructing and rebuilding language
  • Material Language: Words as raw material for construction

🎯 Technical Highlights

Algorithm

  1. Parse input words
  2. Look up letter patterns (5x5 grids)
  3. For each row (0-4):
    • Replace '#' with filler characters (cycling)
    • Preserve spacing
  4. Combine into final ASCII art

Data Structure

HashMap<char, Vec<&str>>  // Letter -> Pattern lines

Performance

  • Fast generation (< 1ms)
  • No external dependencies
  • Memory efficient
  • Suitable for interactive use

🔮 Future Enhancements

Already prepared in the code:

  • word_art_with_spacing() - Custom letter spacing
  • 💡 Color support (termion already available)
  • 💡 Multiple font styles
  • 💡 Vertical orientation
  • 💡 Custom pattern loading
  • 💡 Different grid sizes

📊 Project Status

Before This Feature

  • ✅ Anagram generation
  • ✅ Basic CLI
  • ✅ 3 tests

After This Feature

  • ✅ Anagram generation
  • ASCII Art generation 🎨
  • ✅ Command-based CLI
  • ✅ Help system
  • ✅ 10 tests
  • ✅ Enhanced documentation

🎉 Summary

What Works

ASCII Art Generation - Complete and tested ✅ Command-Based CLI - anagram, art, help ✅ 26 Letters - Full A-Z support ✅ Cyclic Filling - Automatic character repetition ✅ Quality Assured - All tests pass, no warnings ✅ Well Documented - README, CHANGELOG, code docs ✅ Backwards Compatible - Old syntax still works

Next Steps for You

# 1. Test it yourself!
cd /Users/outis/Desktop/augusto/augusto
cargo run --release -- art "YOUR_NAME" "rust"

# 2. When ready to commit:
cd /Users/outis/Desktop/augusto
git add augusto/src/ascii_art.rs
git add augusto/src/main.rs
git add README.md
git add CHANGELOG.md
git add ASCII_ART_FEATURE.md

git commit -m "feat: add ASCII art generation feature

- Add new ascii_art module with A-Z letter patterns
- Implement word_art() function for concrete poetry-style output
- Add command-based CLI with anagram, art, and help commands
- Maintain backwards compatibility with simple word input
- Add 7 new tests (5 module + 2 integration)
- Update README with ASCII art examples and usage
- Update CHANGELOG with feature details

Inspired by Augusto de Campos' concrete poetry techniques."

# 3. Push to GitHub
git push origin main

🌟 Highlights

This feature is special because:

  1. True to the Vision: Embodies concrete poetry principles
  2. Well Crafted: Clean code, comprehensive tests
  3. User Friendly: Intuitive CLI, clear examples
  4. Future Ready: Extensible design
  5. Poetic: Creates actual art with words

Feature Status: ✅ COMPLETE
Tests: 10/10 passing
Documentation: Complete
Ready to ship! 🚀

Created with ❤️ for Augusto de Campos