Skip to content

Release v2.0.0

Choose a tag to compare

@github-actions github-actions released this 09 Jul 22:06
· 6 commits to main since this release

πŸš€ 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 onset

Feature 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

πŸ™ 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.