mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
feat: expand ascii-art skill with cowsay, boxes, toilet, image-to-ascii
Adds 5 additional tools from the awesome-ascii-art ecosystem: - cowsay: 50+ characters with speech/thought bubbles - boxes: 70+ decorative border designs, composable with pyfiglet - toilet: colored text art with rainbow/metal/border filters - ascii-image-converter: modern image-to-ASCII (PNG/JPEG/GIF/WEBP) - jp2a: lightweight JPEG-to-ASCII fallback Also adds fun extras (Star Wars telnet), resource links, and an expanded decision flow covering all 7 modes. Ref: github.com/moul/awesome-ascii-art
This commit is contained in:
@@ -1,44 +1,40 @@
|
|||||||
---
|
---
|
||||||
name: ascii-art
|
name: ascii-art
|
||||||
description: Generate ASCII art text banners via pyfiglet (571 fonts) and search 11,000+ pre-made ASCII artworks from asciiart.eu. Falls back to LLM-generated art using Unicode characters.
|
description: Generate ASCII art using pyfiglet (571 fonts), cowsay, boxes, toilet, image-to-ascii conversion, and asciiart.eu search (11,000+ artworks). Falls back to LLM-generated art using Unicode characters.
|
||||||
version: 2.0.0
|
version: 3.0.0
|
||||||
author: 0xbyt4, Hermes Agent
|
author: 0xbyt4, Hermes Agent
|
||||||
license: MIT
|
license: MIT
|
||||||
dependencies: []
|
dependencies: []
|
||||||
metadata:
|
metadata:
|
||||||
hermes:
|
hermes:
|
||||||
tags: [ASCII, Art, Banners, Creative, Unicode, Text-Art, pyfiglet, figlet]
|
tags: [ASCII, Art, Banners, Creative, Unicode, Text-Art, pyfiglet, figlet, cowsay, boxes]
|
||||||
related_skills: [excalidraw]
|
related_skills: [excalidraw]
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# ASCII Art Skill
|
# ASCII Art Skill
|
||||||
|
|
||||||
Three modes: text banners via pyfiglet, searching pre-made art from asciiart.eu, and LLM-generated custom art.
|
Multiple tools for different ASCII art needs. All tools are local CLI programs — no API keys required.
|
||||||
|
|
||||||
## Mode 1: Text Banners (pyfiglet)
|
## Tool 1: Text Banners (pyfiglet)
|
||||||
|
|
||||||
Use pyfiglet to render text as large ASCII art banners. 571 fonts available, no API key needed.
|
Render text as large ASCII art banners. 571 built-in fonts.
|
||||||
|
|
||||||
### Setup (one-time)
|
### Setup
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install pyfiglet --break-system-packages -q
|
pip install pyfiglet --break-system-packages -q
|
||||||
```
|
```
|
||||||
|
|
||||||
### Generate a banner
|
### Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 -m pyfiglet "YOUR TEXT" -f slant
|
python3 -m pyfiglet "YOUR TEXT" -f slant
|
||||||
|
python3 -m pyfiglet "TEXT" -f doom -w 80 # Set width
|
||||||
|
python3 -m pyfiglet --list_fonts # List all 571 fonts
|
||||||
```
|
```
|
||||||
|
|
||||||
### List all available fonts
|
### Recommended fonts
|
||||||
|
|
||||||
```bash
|
|
||||||
python3 -m pyfiglet --list_fonts
|
|
||||||
```
|
|
||||||
|
|
||||||
### Recommended fonts by style
|
|
||||||
|
|
||||||
| Style | Font | Best for |
|
| Style | Font | Best for |
|
||||||
|-------|------|----------|
|
|-------|------|----------|
|
||||||
@@ -49,20 +45,154 @@ python3 -m pyfiglet --list_fonts
|
|||||||
| Compact | `small` | Subtitles |
|
| Compact | `small` | Subtitles |
|
||||||
| Cyberpunk | `cyberlarge` | Tech themes |
|
| Cyberpunk | `cyberlarge` | Tech themes |
|
||||||
| 3D effect | `3-d` | Splash screens |
|
| 3D effect | `3-d` | Splash screens |
|
||||||
| Rounded | `rounded` | Friendly text |
|
|
||||||
| Gothic | `gothic` | Dramatic text |
|
| Gothic | `gothic` | Dramatic text |
|
||||||
| Lean italic | `lean` | Stylish headers |
|
|
||||||
|
|
||||||
### Tips
|
### Tips
|
||||||
|
|
||||||
- Preview 2-3 fonts and let the user pick their favorite
|
- Preview 2-3 fonts and let the user pick their favorite
|
||||||
- Short text (1-8 chars) works best with detailed fonts like `doom` or `block`
|
- Short text (1-8 chars) works best with detailed fonts like `doom` or `block`
|
||||||
- Long text works better with compact fonts like `small` or `mini`
|
- Long text works better with compact fonts like `small` or `mini`
|
||||||
- Use `python3 -m pyfiglet "TEXT" -f font_name -w 80` to set output width
|
|
||||||
|
|
||||||
## Mode 2: Search Pre-Made ASCII Art (asciiart.eu)
|
## Tool 2: Cowsay (Message Art)
|
||||||
|
|
||||||
The ASCII Art Archive at asciiart.eu has 11,000+ artworks organized by category. Use `web_extract` to fetch them.
|
Classic tool that wraps text in a speech bubble with an ASCII character.
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt install cowsay -y # Debian/Ubuntu
|
||||||
|
# brew install cowsay # macOS
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cowsay "Hello World"
|
||||||
|
cowsay -f tux "Linux rules" # Tux the penguin
|
||||||
|
cowsay -f dragon "Rawr!" # Dragon
|
||||||
|
cowsay -f stegosaurus "Roar!" # Stegosaurus
|
||||||
|
cowthink "Hmm..." # Thought bubble
|
||||||
|
cowsay -l # List all characters
|
||||||
|
```
|
||||||
|
|
||||||
|
### Available characters (50+)
|
||||||
|
|
||||||
|
`beavis.zen`, `bong`, `bunny`, `cheese`, `daemon`, `default`, `dragon`,
|
||||||
|
`dragon-and-cow`, `elephant`, `eyes`, `flaming-skull`, `ghostbusters`,
|
||||||
|
`hellokitty`, `kiss`, `kitty`, `koala`, `luke-koala`, `mech-and-cow`,
|
||||||
|
`meow`, `moofasa`, `moose`, `ren`, `sheep`, `skeleton`, `small`,
|
||||||
|
`stegosaurus`, `stimpy`, `supermilker`, `surgery`, `three-eyes`,
|
||||||
|
`turkey`, `turtle`, `tux`, `udder`, `vader`, `vader-koala`, `www`
|
||||||
|
|
||||||
|
### Eye/tongue modifiers
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cowsay -b "Borg" # =_= eyes
|
||||||
|
cowsay -d "Dead" # x_x eyes
|
||||||
|
cowsay -g "Greedy" # $_$ eyes
|
||||||
|
cowsay -p "Paranoid" # @_@ eyes
|
||||||
|
cowsay -s "Stoned" # *_* eyes
|
||||||
|
cowsay -w "Wired" # O_O eyes
|
||||||
|
cowsay -e "OO" "Msg" # Custom eyes
|
||||||
|
cowsay -T "U " "Msg" # Custom tongue
|
||||||
|
```
|
||||||
|
|
||||||
|
## Tool 3: Boxes (Decorative Borders)
|
||||||
|
|
||||||
|
Draw decorative ASCII art borders/frames around any text. 70+ built-in designs.
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt install boxes -y # Debian/Ubuntu
|
||||||
|
# brew install boxes # macOS
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo "Hello World" | boxes # Default box
|
||||||
|
echo "Hello World" | boxes -d stone # Stone border
|
||||||
|
echo "Hello World" | boxes -d parchment # Parchment scroll
|
||||||
|
echo "Hello World" | boxes -d cat # Cat border
|
||||||
|
echo "Hello World" | boxes -d dog # Dog border
|
||||||
|
echo "Hello World" | boxes -d unicornsay # Unicorn
|
||||||
|
echo "Hello World" | boxes -d diamonds # Diamond pattern
|
||||||
|
echo "Hello World" | boxes -d c-cmt # C-style comment
|
||||||
|
echo "Hello World" | boxes -d html-cmt # HTML comment
|
||||||
|
echo "Hello World" | boxes -a c # Center text
|
||||||
|
boxes -l # List all 70+ designs
|
||||||
|
```
|
||||||
|
|
||||||
|
### Combine with pyfiglet
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 -m pyfiglet "HERMES" -f slant | boxes -d stone
|
||||||
|
```
|
||||||
|
|
||||||
|
## Tool 4: TOIlet (Colored Text Art)
|
||||||
|
|
||||||
|
Like pyfiglet but with ANSI color effects and visual filters. Great for terminal eye candy.
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt install toilet toilet-fonts -y # Debian/Ubuntu
|
||||||
|
# brew install toilet # macOS
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
toilet "Hello World" # Basic text art
|
||||||
|
toilet -f bigmono12 "Hello" # Specific font
|
||||||
|
toilet --gay "Rainbow!" # Rainbow coloring
|
||||||
|
toilet --metal "Metal!" # Metallic effect
|
||||||
|
toilet -F border "Bordered" # Add border
|
||||||
|
toilet -F border --gay "Fancy!" # Combined effects
|
||||||
|
toilet -f pagga "Block" # Block-style font (unique to toilet)
|
||||||
|
toilet -F list # List available filters
|
||||||
|
```
|
||||||
|
|
||||||
|
### Filters
|
||||||
|
|
||||||
|
`crop`, `gay` (rainbow), `metal`, `flip`, `flop`, `180`, `left`, `right`, `border`
|
||||||
|
|
||||||
|
**Note**: toilet outputs ANSI escape codes for colors — works in terminals but may not render in all contexts (e.g., plain text files, some chat platforms).
|
||||||
|
|
||||||
|
## Tool 5: Image to ASCII Art
|
||||||
|
|
||||||
|
Convert images (PNG, JPEG, GIF, WEBP) to ASCII art.
|
||||||
|
|
||||||
|
### Option A: ascii-image-converter (recommended, modern)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install via snap or Go
|
||||||
|
sudo snap install ascii-image-converter
|
||||||
|
# OR: go install github.com/TheZoraiz/ascii-image-converter@latest
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ascii-image-converter image.png # Basic
|
||||||
|
ascii-image-converter image.png -C # Color output
|
||||||
|
ascii-image-converter image.png -d 60,30 # Set dimensions
|
||||||
|
ascii-image-converter image.png -b # Braille characters
|
||||||
|
ascii-image-converter image.png -n # Negative/inverted
|
||||||
|
ascii-image-converter https://url/image.jpg # Direct URL
|
||||||
|
ascii-image-converter image.png --save-txt out # Save as text
|
||||||
|
```
|
||||||
|
|
||||||
|
### Option B: jp2a (lightweight, JPEG only)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt install jp2a -y
|
||||||
|
jp2a --width=80 image.jpg
|
||||||
|
jp2a --colors image.jpg # Colorized
|
||||||
|
```
|
||||||
|
|
||||||
|
## Tool 6: Search Pre-Made ASCII Art (asciiart.eu)
|
||||||
|
|
||||||
|
The ASCII Art Archive has 11,000+ artworks organized by category. Use `web_extract` to fetch them.
|
||||||
|
|
||||||
### Browse by category
|
### Browse by category
|
||||||
|
|
||||||
@@ -90,51 +220,49 @@ web_extract(urls=["https://www.asciiart.eu/search?q=rocket"])
|
|||||||
|
|
||||||
### Tips
|
### Tips
|
||||||
|
|
||||||
- The extracted content includes multiple art pieces — pick the best one for the user
|
- The extracted content includes multiple art pieces — pick the best one
|
||||||
- Preserve artist initials/signatures (e.g., `jgs`, `hjw`) — this is important etiquette
|
- Preserve artist initials/signatures (e.g., `jgs`, `hjw`) — this is important etiquette
|
||||||
- If search returns nothing good, fall back to Mode 3 (LLM generation)
|
- If search returns nothing good, fall back to LLM generation
|
||||||
|
|
||||||
## Mode 3: LLM-Generated Custom Art (Fallback)
|
## Tool 7: LLM-Generated Custom Art (Fallback)
|
||||||
|
|
||||||
When pyfiglet and asciiart.eu don't have what's needed, generate ASCII art directly using these Unicode characters:
|
When tools above don't have what's needed, generate ASCII art directly using these Unicode characters:
|
||||||
|
|
||||||
### Character Palette
|
### Character Palette
|
||||||
|
|
||||||
**Box Drawing:**
|
**Box Drawing:** `╔ ╗ ╚ ╝ ║ ═ ╠ ╣ ╦ ╩ ╬ ┌ ┐ └ ┘ │ ─ ├ ┤ ┬ ┴ ┼ ╭ ╮ ╰ ╯`
|
||||||
```
|
|
||||||
╔ ╗ ╚ ╝ ║ ═ ╠ ╣ ╦ ╩ ╬
|
|
||||||
┌ ┐ └ ┘ │ ─ ├ ┤ ┬ ┴ ┼
|
|
||||||
╭ ╮ ╰ ╯
|
|
||||||
```
|
|
||||||
|
|
||||||
**Block Elements:**
|
**Block Elements:** `░ ▒ ▓ █ ▄ ▀ ▌ ▐ ▖ ▗ ▘ ▝ ▚ ▞`
|
||||||
```
|
|
||||||
░ ▒ ▓ █ ▄ ▀ ▌ ▐ ▖ ▗ ▘ ▝ ▚ ▞
|
|
||||||
```
|
|
||||||
|
|
||||||
**Geometric & Symbols:**
|
**Geometric & Symbols:** `◆ ◇ ◈ ● ○ ◉ ■ □ ▲ △ ▼ ▽ ★ ☆ ✦ ✧ ◀ ▶ ◁ ▷ ⬡ ⬢ ⌂`
|
||||||
```
|
|
||||||
◆ ◇ ◈ ● ○ ◉ ■ □ ▲ △ ▼ ▽ ★ ☆ ✦ ✧
|
|
||||||
◀ ▶ ◁ ▷ ⬡ ⬢ ⟐ ⌂ ⎔ ⏣
|
|
||||||
```
|
|
||||||
|
|
||||||
### Style Guide
|
|
||||||
|
|
||||||
1. **Block Banner**: Use `█` and `╗╔╝╚` for large letter forms
|
|
||||||
2. **Shadow**: Add depth with `▄ ▀` half-blocks
|
|
||||||
3. **Gradient**: Use block density `░▒▓█` for effects
|
|
||||||
4. **Decorative Frame**: Combine box-drawing with symbols
|
|
||||||
|
|
||||||
### Rules
|
### Rules
|
||||||
|
|
||||||
- Max width: 60 characters per line (terminal-safe)
|
- Max width: 60 characters per line (terminal-safe)
|
||||||
- Max height: 15 lines for banners, 25 for scenes
|
- Max height: 15 lines for banners, 25 for scenes
|
||||||
- Monospace only: output must render correctly in fixed-width fonts
|
- Monospace only: output must render correctly in fixed-width fonts
|
||||||
- Center-align banners by default
|
|
||||||
|
## Fun Extras
|
||||||
|
|
||||||
|
### Star Wars in ASCII (via telnet)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
telnet towel.blinkenlights.nl
|
||||||
|
```
|
||||||
|
|
||||||
|
### Useful Resources
|
||||||
|
|
||||||
|
- [asciiart.eu](https://www.asciiart.eu/) — 11,000+ artworks, searchable
|
||||||
|
- [patorjk.com/software/taag](http://patorjk.com/software/taag/) — Web-based text-to-ASCII with font preview
|
||||||
|
- [asciiflow.com](http://asciiflow.com/) — Interactive ASCII diagram editor (browser)
|
||||||
|
- [awesome-ascii-art](https://github.com/moul/awesome-ascii-art) — Curated resource list
|
||||||
|
|
||||||
## Decision Flow
|
## Decision Flow
|
||||||
|
|
||||||
1. **User wants text as a banner** → Mode 1 (pyfiglet)
|
1. **Text as a banner** → pyfiglet (or toilet for colored output)
|
||||||
2. **User wants art of a thing** (cat, rocket, dragon) → Mode 2 (asciiart.eu search)
|
2. **Wrap a message in fun character art** → cowsay
|
||||||
3. **User wants something custom/creative** → Mode 3 (LLM generation)
|
3. **Add decorative border/frame** → boxes (can combine with pyfiglet)
|
||||||
4. **Mode 2 returns nothing good** → Fall back to Mode 3
|
4. **Art of a thing** (cat, rocket, dragon) → asciiart.eu search
|
||||||
|
5. **Convert an image to ASCII** → ascii-image-converter or jp2a
|
||||||
|
6. **Something custom/creative** → LLM generation with Unicode palette
|
||||||
|
7. **Any tool not installed** → install it, or fall back to next option
|
||||||
|
|||||||
Reference in New Issue
Block a user