augusto is a Rust command-line suite that allows you to interact with words in creative and insightful ways directly from your terminal.
Inspired by the Brazilian concrete poet Augusto de Campos, who explored the visual and sonic dimensions of language, augusto empowers you to deconstruct and recombine words through various operations. Currently featuring anagram generation and ASCII art creation, with plans to expand into analogic interpolations and other word transformations.
- 🔄 Anagram Generation: Generate all possible letter combinations of a word
- 🎨 ASCII Art: Write one word using another word as filler, creating concrete poetry
- ⚡ Performance Benchmarks: Measure and analyze operation performance with detailed statistics
- 🚀 Fast & Efficient: Built with Rust for optimal performance
- 📦 Minimal Dependencies: Lightweight footprint (only termion for terminal interactions)
- 🎯 CLI-First: Designed for seamless command-line workflows
- Rust 1.56 or higher
- Cargo (comes with Rust)
- Clone the repository:
git clone https://github.com/lucasrafaldini/augusto.git
cd augusto- Build the project:
cd augusto
cargo build --release- The binary will be available at
target/release/augusto
To install augusto to your local Cargo bin directory:
cd augusto
cargo install --path .This makes augusto available system-wide.
Once installed, you can start using augusto immediately:
augusto anagram "cat"
# or for backwards compatibility:
augusto "cat"This will generate all anagrams of the word "cat".
augusto art "RUST" "code"This will create ASCII art of the word "RUST" using the letters from "code" as filler.
Augusto supports multiple commands for different word operations:
augusto anagram <word>
# or simply:
augusto <word>Arguments:
<word>: The input word to generate anagrams from (required)
Output: The command outputs a set of unique anagrams generated from the input word.
augusto art <main_word> <filler_word>Arguments:
<main_word>: The word to display in large ASCII letters<filler_word>: The word whose letters will be used to fill the pattern
Output: ASCII art representation of the main word, filled with characters from the filler word.
augusto bench <operation> <arguments...>Arguments:
<operation>: The operation to benchmark (anagramorart)<arguments>: Arguments for the operation
Output: Detailed performance statistics including execution time, throughput, and iterations.
Examples:
# Benchmark anagram generation
augusto bench anagram "test"
# Benchmark ASCII art
augusto bench art "RUST" "code"augusto help
# or:
augusto --helpaugusto anagram "cat"
# Output: {"tca", "act", "cta", "tac", "atc", "cat"}augusto anagram "aba"
# Output: {"aab", "baa", "aba"}augusto anagram "rust"
# Output: All 24 permutations of "rust"Note: The number of anagrams grows factorially with word length. For a word with n unique letters, expect n! combinations.
augusto art "HI" "rust"
# Output:
# r u strus
# t r u
# strus t
# r u s
# t r ustruaugusto art "RUST" "code"
# Output:
# 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 daugusto art "LUXO" "LIXO"
# Output:
# 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 commentary on consumerism and social inequalityaugusto art "LOVE" "heart"
# Creates ASCII art spelling "LOVE" filled with letters from "heart"Tip: The filler word is repeated cyclically, so experiment with different combinations to create unique visual effects!
augusto bench anagram "cat"
# Output:
# ╔════════════════════════════════════════════════════════════╗
# ║ PERFORMANCE BENCHMARK RESULTS ║
# ╚════════════════════════════════════════════════════════════╝
#
# Operation: Anagram Generation
# Input: "cat"
# Input length: 3 character(s)
# Output size: 6 item(s)
#
# Total time: 48.29ms
# Iterations: 10000
# Avg per run: 4μs
# Throughput: 207087 ops/secaugusto bench art "LUXO" "LIXO"
# Output:
# ╔════════════════════════════════════════════════════════════╗
# ║ PERFORMANCE BENCHMARK RESULTS ║
# ╚════════════════════════════════════════════════════════════╝
#
# Operation: ASCII Art Generation
# Input: "LUXO+LIXO"
# Input length: 9 character(s)
#
# Total time: 358μs
# Iterations: 10
# Avg per run: 35μs
# Throughput: 27929 ops/secNote: Benchmark iterations automatically adjust based on input complexity. Shorter inputs run more iterations for accurate measurements.
augusto/
├── augusto/ # Main Rust project
│ ├── src/
│ │ ├── main.rs # Entry point and CLI handling
│ │ ├── anagram.rs # Anagram generation logic
│ │ ├── ascii_art.rs # ASCII art generation logic
│ │ └── benchmark.rs # Performance benchmarking utilities
│ ├── Cargo.toml # Project dependencies
│ └── Cargo.lock # Locked dependencies
├── .github/
│ ├── workflows/ # CI/CD workflows
│ └── scripts/ # GitHub automation scripts
├── README.md # This file
├── LICENSE # MIT License
└── CONTRIBUTE.md # Contribution guidelines and Code of Conduct
cd augusto
cargo testcd augusto
cargo run -- "word"cd augusto
cargo build --releaseWe welcome contributions from the community! To contribute to augusto, please follow these guidelines:
- Fork the repository
- Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
- Make your changes and commit them with clear, descriptive messages
- Test your changes thoroughly:
cargo test cargo clippy cargo fmt - Push to your fork and create a pull request with a clear description
- After review and approval, your changes will be merged into the main branch
Please ensure your contributions adhere to our Code of Conduct.
- Follow Rust naming conventions and idioms
- Write tests for new functionality
- Document public APIs with doc comments
- Run
cargo fmtbefore committing - Ensure
cargo clippypasses without warnings
- Basic anagram generation
- ASCII art generation
- CLI interface
- Unit tests
- Performance benchmarks
- Documentation improvements
- Word combination operations
- Pattern matching for anagrams
- Dictionary filtering (real words only)
- Output formatting options (JSON, CSV, etc.)
- Interactive mode
- Analogic interpolations
- Visual word transformations
- Multi-word operations
- Plugin system for custom operations
- Web API/service version
- Natural language processing features
- Poetic pattern generation inspired by concrete poetry
- Integration with dictionary APIs
- Educational mode with linguistic insights
- Inspired by Augusto de Campos, Brazilian concrete poet and pioneer of visual poetry
- Built with Rust
- Terminal handling by termion
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2023 Lucas Rafaldini
Made with ❤️ and Rust