$ show hxpe-dev/kotofetch
kotofetch is a Rust-based CLI tool that displays Japanese quotes in the terminal with extensive customization options. It features built-in quote collections (anime, proverbs, haiku, lyrics, and yojijukugo) and supports importing Anki decks via AnkiConnect. The tool offers various display modes including furigana (ruby text) rendering, animations (typewriter, scramble, slide), and flexible text styling. The application architecture is modular, with separate modules for command-line parsing, configuration management, quote importing, and display rendering. The display module handles complex text layout, including inline furigana annotations, Unicode-aware wrapping, and terminal boxing with optional animations. Key reusable components include the furigana parsing and formatting logic (which handles conversion between Anki's [reading] syntax and kotofetch's (reading) syntax and renders ruby text with proper alignment) and the AnkiConnect client (which provides a robust interface for fetching and converting Anki notes into kotofetch-compatible quote files).
The LLM identified 2 files worth highlighting for reuse:
A self-contained module for interacting with AnkiConnect to import decks as kotofetch quote files. It handles API communication, note processing, field mapping, and furigana conversion, demonstrating robust error handling and separation of concerns. Only depends on one internal module (cli::AnkiArgs) and external crates (dirs, serde_json, ureq).
Handles loading of TOML configuration files and merging with command-line arguments. Features robust parsing of translation modes (accepting both string and array formats) and sensible defaults. Zero internal module dependencies, making it highly reusable in other CLI projects.