- Add modify_dev_announcement.py script to inject dev preview banner
- Banner shows commit hash, timestamp, and link to stable version
- Make announcement non-dismissible for dev previews
- Maintain original blue announcement styling below dev banner
- Update deploy-preview workflow to use new script
- Script located in tools/scripts/publish/ for external workflow use
Fix critical issue where compression failed on images requiring resize:
- Container uses older Pillow without Image.Resampling attribute
- Added backward compatibility: try Image.Resampling.LANCZOS, fallback to Image.LANCZOS
- This was causing only 523/867 images to compress (60% completion)
- Now all images should process correctly regardless of Pillow version
Root cause: 'module PIL.Image has no attribute Resampling' error
Result: Should achieve full 77% compression in containers
- Update default quality from 60 to 50 for better compression
- Update default max_size from 1200px to 1000px for optimal balance
- Based on comprehensive testing of 10 different configurations
- Achieves 77.3% size reduction (267MB → 60.8MB) automatically
- Maintains excellent image quality while staying well under 100MB target
- Updated help text and examples to reflect new optimal settings
Results: EPUB files now compress to ~61MB with 77% size reduction
while maintaining excellent readability for textbook content.
- Remove compresslevel=9 from ZIP compression (use default for better efficiency)
- Implement aggressive PNG palette conversion for maximum compression
- Simplify JPEG transparency handling for better performance
- Update default settings: quality=60, max_size=1200px for optimal balance
- Add compress_epub_lite.py as lightweight alternative
- Achieve 75% size reduction (267MB → 67MB) while maintaining quality
- Update documentation and help text with new optimal settings
Results: EPUB files now compress to ~67MB (well under 100MB target)
with excellent image quality and 75% size reduction.
- Rename tools/scripts/quarto_publish/ to tools/scripts/publish/ for cleaner organization
- Add compress_pdf.py: Professional PDF compression with Ghostscript
* Cross-platform support (gs on Linux/macOS, gswin64c on Windows)
* Multiple quality presets including minimal mode for exact compatibility
* Consistent CLI interface with --input/-i and --output/-o flags
* Comprehensive error handling and progress reporting
- Add compress_epub.py: Professional EPUB compression with image optimization
* Optimizes embedded images while maintaining EPUB format compliance
* Consistent CLI interface matching compress_pdf.py
* Configurable quality and image size settings
- Update documentation to reflect new directory structure
- Both scripts use identical professional CLI patterns for consistency