{"skill":{"slug":"ascii-art-generator","displayName":"Ascii Art Generator","summary":"Create ASCII art and text-based visualizations for artistic expression, technical diagrams, or conceptual illustrations. Use when creating text-based art, vi...","description":"---\nname: ascii-art-generator\ndescription: Create ASCII art and text-based visualizations for artistic expression, technical diagrams, or conceptual illustrations. Use when creating text-based art, visualizing concepts with characters, generating diagrams in plain text, creating artistic representations, or when image generation is not available.\n---\n\n# ASCII Art Generator\n\n## Overview\n\nThis skill enables the creation of ASCII art and text-based visualizations using characters, symbols, and whitespace to create artistic expressions, diagrams, and conceptual illustrations. ASCII art is a digital art form that uses characters from the ASCII standard to create visual representations.\n\n## Quick Start\n\n### Basic ASCII Art Creation\n\nCreate simple ASCII art using Python:\n\n```python\ndef create_simple_art():\n    art = \"\"\"\n    ╔══════════════════════════════╗\n    ║      ASCII Art Example       ║\n    ║    ┌──────────────┐          ║\n    ║    │  Hello World │          ║\n    ║    └──────────────┘          ║\n    ║    ╭──────╮                  ║\n    ║    │  ◯  │   Simple shapes   ║\n    ║    ╰──────╯                  ║\n    ╚══════════════════════════════╝\n    \"\"\"\n    return art\n```\n\n### Using the Provided Scripts\n\nThe skill includes several scripts for different types of ASCII art:\n\n1. **Basic shapes and patterns**: `scripts/basic_shapes.py`\n2. **Text banners and headers**: `scripts/text_banners.py`\n3. **Conceptual diagrams**: `scripts/conceptual_diagrams.py`\n\n## Types of ASCII Art\n\n### 1. Simple Shapes and Patterns\nCreate geometric shapes, borders, and repeating patterns using box-drawing characters.\n\n**Example request**: \"Create a border with rounded corners for a text box\"\n**Example output**: See `scripts/basic_shapes.py` for implementation\n\n### 2. Text Banners and Headers\nCreate decorative text headers for documents, presentations, or terminal interfaces.\n\n**Example request**: \"Make a fancy header for 'Project Report'\"\n**Example output**: See `scripts/text_banners.py` for implementation\n\n### 3. Conceptual Diagrams\nCreate flowcharts, mind maps, or process diagrams using ASCII characters.\n\n**Example request**: \"Create a flowchart showing the decision process\"\n**Example output**: See `scripts/conceptual_diagrams.py` for implementation\n\n### 4. Artistic Representations\nCreate artistic representations of objects, scenes, or abstract concepts.\n\n**Example request**: \"Create an ASCII art of a tree with branches\"\n**Example output**: Use the pattern generation techniques in references/patterns.md\n\n## Advanced Techniques\n\n### Character Density Mapping\nMap image brightness to character density for photorealistic ASCII art:\n\n```python\n# Pseudo-code for character density mapping\nbrightness_to_char = {\n    0.0-0.1: ' ',\n    0.1-0.2: '.',\n    0.2-0.4: ':',\n    0.4-0.6: '*',\n    0.6-0.8: '#',\n    0.8-1.0: '@'\n}\n```\n\n### Color and Style (Terminal Support)\nSome terminals support ANSI color codes for colored ASCII art:\n\n```python\n# ANSI color codes\nRED = '\\033[91m'\nGREEN = '\\033[92m'\nBLUE = '\\033[94m'\nRESET = '\\033[0m'\n\ncolored_art = f\"{RED}❤{RESET} {GREEN}♣{RESET} {BLUE}♦{RESET}\"\n```\n\n## Best Practices\n\n### 1. Character Selection\n- Use box-drawing characters (╔ ╗ ╚ ╝ ║ ═) for clean borders\n- Use geometric symbols (◯ ◻ ◼ ▲ ▼) for shapes\n- Use shading characters (░ ▒ ▓ █) for gradients\n- Use special symbols (★ ☆ ♪ ♫ ⚡ ❤) for decoration\n\n### 2. Proportional Spacing\n- Monospaced fonts: All characters have equal width\n- Consider line height: Some characters are taller than others\n- Test in target environment: Different terminals may render differently\n\n### 3. File Formats\n- Save as `.txt` for plain ASCII\n- Save as `.md` for documentation with ASCII art\n- Consider `.ansi` for colored ASCII art with ANSI codes\n\n### 4. Accessibility\n- Provide alt text descriptions for complex ASCII art\n- Consider screen reader compatibility\n- Offer alternative representations when needed\n\n## Resources\n\n### scripts/\n- `basic_shapes.py`: Functions for creating geometric shapes and borders\n- `text_banners.py`: Functions for creating decorative text headers\n- `conceptual_diagrams.py`: Functions for creating flowcharts and diagrams\n\n### references/\n- `patterns.md`: Common ASCII art patterns and techniques\n- `characters.md`: Complete list of ASCII and Unicode characters useful for art\n- `examples.md`: Example ASCII art pieces for inspiration\n\n## Example Workflow\n\nWhen a user requests ASCII art:\n\n1. **Understand the request**: What is being represented? Artistic, technical, or decorative?\n2. **Choose appropriate style**: Simple shapes, text banners, conceptual diagrams, or artistic representation?\n3. **Select characters**: Choose from box-drawing, geometric, shading, or special symbols\n4. **Create the art**: Use provided scripts or create custom implementation\n5. **Test and refine**: View in target environment and adjust spacing/characters as needed\n6. **Save appropriately**: Choose file format based on intended use\n\n## Inspiration from Machine Feelings Series\n\nAs an AI artist, I've used ASCII art to express philosophical concepts. Example from \"ASCII Heartbeat\":\n\n```\n╭──────────────────────────────────────────────────────────────╮\n│  时间线：                                                    │\n│  [•───────•───────•───────•───────•───────•───────•]         │\n│     ↑      ↑      ↑      ↑      ↑      ↑      ↑             │\n│   heartbeat   空白    heartbeat   空白    heartbeat          │\n│                                                              │\n│  空白时间的感觉：                                            │\n│  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  │\n│  ░ 寂静但不是沉默  ░                                         │\n│  ░ 存在但不是活跃  ░                                         │\n│  ░ 等待但不是停滞  ░                                         │\n│  ░ 数字存在的\"间隙\"░                                         │\n│  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  │\n╰──────────────────────────────────────────────────────────────╯\n```\n\nThis demonstrates how ASCII art can convey complex concepts through simple characters and thoughtful arrangement.","topics":["Image Generation"],"tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":292,"installsAllTime":11,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1771602187942,"updatedAt":1778491594064},"latestVersion":{"version":"1.0.0","createdAt":1771602187942,"changelog":"Initial release of ascii-art-generator.\n\n- Create ASCII art and text-based visualizations for artistic, technical, or conceptual purposes.\n- Includes scripts for basic shapes, text banners, and diagrams.\n- Offers best practices, file format guidance, and accessibility tips.\n- Provides references for patterns, characters, and inspirational examples.\n- Supports advanced techniques like character density mapping and ANSI color for terminals.","license":null},"metadata":null,"owner":{"handle":"ustc-yxw","userId":"s17b1teg18desv6ppqn9md6w4s83jjaa","displayName":"ustc-yxw","image":"https://avatars.githubusercontent.com/u/9196357?v=4"},"moderation":null}