Release v2.0.0
π Release v2.0.0: Major Refactoring and CLI Improvements
π GitHub Pages Documentation
π View Documentation
π― What's New
ποΈ Major Code Refactoring
- Modular Architecture: Completely refactored monolithic codebase into clean, maintainable modules:
- `src/grouping.rs` - Character grouping and analysis logic
- `src/analysis.rs` - Onset analysis and phonetic processing
- `src/io.rs` - File I/O operations and data handling
- `src/types.rs` - Type definitions and trait implementations
- Improved Testability: Better separation of concerns enables more comprehensive testing
- Enhanced Maintainability: Cleaner code structure for future development
π CLI Command Rename (Breaking Change)
Simplified command structure for better user experience:
| Old Command | New Command | Description |
|---|---|---|
| `by-pinyin` | `pinyin` | Groups characters by pinyin pronunciation |
| `by-onset` | `onset` | Analyzes characters by onset sounds |
β¨ Enhanced Features
- Unified Pinyin Command: The `pinyin` command now supports both grouping and tone-specific filtering
- Improved Line Folding: Better text wrapping for long character lists
- Enhanced Error Handling: More robust error messages and graceful failure handling
- Shell Completion: Full support for bash, zsh, fish, and PowerShell completions
π Documentation Improvements
- Complete README overhaul with updated examples and usage patterns
- Comprehensive inline documentation with detailed function descriptions
- Updated help text for all commands and options
- Migration guide for users upgrading from v1.x
π§ͺ Quality Assurance
- 100% Test Coverage: All unit tests, integration tests, and doc tests pass
- Clippy Clean: Zero clippy warnings, adhering to Rust best practices
- CI/CD Pipeline: Robust automated testing and release process
- Cross-platform Support: Binaries for Linux, macOS, and Windows
β οΈ Breaking Changes
This is a major version release with breaking changes:
Command Migration
# Old (v1.x)
study-rust-hanzi by-pinyin
study-rust-hanzi by-onset
# New (v2.0.0)
study-rust-hanzi pinyin
study-rust-hanzi onsetFeature Changes
- Command names have been simplified for better usability
- All functionality remains the same, only command names have changed
- Scripts and workflows will need to be updated
π§ Installation
Download Pre-built Binaries
Choose the appropriate binary for your platform from the assets below.
Build from Source
git clone https://github.com/suikan4github/study-rust-hanzi.git
cd study-rust-hanzi
cargo build --releaseπ Usage Examples
# List all characters grouped by pinyin
study-rust-hanzi pinyin
# Show characters for specific pinyin with tone analysis
study-rust-hanzi pinyin ma
# Analyze characters by onset sounds
study-rust-hanzi onset
# Filter by specific onset
study-rust-hanzi onset j
# Use traditional characters with line folding
study-rust-hanzi pinyin --traditional --fold 30
# Generate shell completion
study-rust-hanzi generate-completion bash > completion.bashπ Performance & Reliability
- Faster startup time through optimized module loading
- Memory efficiency improvements in character processing
- Robust error handling for better user experience
- Cross-platform compatibility ensured
π Links
- π Documentation
- π Report Issues
- π¬ Discussions
- π Full Changelog
π Acknowledgments
Thank you to all contributors and users who provided feedback to make this release possible!
Note: This release includes compiled binaries for multiple platforms. Choose the appropriate one for your system from the Assets section below.