Refactor: CLI, auto-detection of format and dimensions, conversion of entire directories #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This pull request significantly improves the OVG image format conversion tools, transforming them into robust, user-friendly command-line tools with advanced features.
Key Improvements
🚀 New Features
Command-Line Interface
argparse
--help
for all commandsAutomatic Format Detection
Smart Dimension Detection
Interactive Size Discovery
Batch Processing
*clock*.bin
)Roundtrip Testing
🔧 Technical Improvements
Enhanced Compression
Robust Error Handling
Backward Compatibility
*_old.py
for reference📚 Documentation
Complete README Rewrite
Usage Examples
Benefits
For Users
For Developers
Migration Guide
From Old Scripts
The old scripts required editing variables:
Now use command-line arguments:
Backward Compatibility
*_old.py
for referenceTesting
The new tools have been tested with:
Files Changed
ovg_to_png.py
→ Enhanced with CLI and auto-detectionpng_to_ovg.py
→ Enhanced with CLI and better compressionREADME.md
→ Complete rewrite with comprehensive documentationovg_to_png_old.py
→ Original script preservedpng_to_ovg_old.py
→ Original script preservedBreaking Changes
None - All existing functionality is preserved. The new tools are drop-in replacements that provide enhanced features while maintaining full backward compatibility.