#!/usr/bin/env python3 """Compare the original and improved HTML documentation.""" from pathlib import Path def compare_docs(): """Show key differences between the two HTML versions.""" print("HTML Documentation Improvements") print("=" * 50) # Read both files original = Path("docs/api_reference.html") improved = Path("docs/api_reference_improved.html") if not original.exists() or not improved.exists(): print("Error: Documentation files not found") return with open(original, 'r') as f: orig_content = f.read() with open(improved, 'r') as f: imp_content = f.read() print("\nš File Size Comparison:") print(f" Original: {len(orig_content):,} bytes") print(f" Improved: {len(imp_content):,} bytes") print("\nā Key Improvements:") # Check newline handling if '\\n' in orig_content and '\\n' not in imp_content: print(" ⢠Fixed literal \\n in documentation text") # Check table of contents if '[Classes](#classes)' in orig_content and 'Classes' in imp_content: print(" ⢠Converted markdown links to proper HTML anchors") # Check headings if '
')
print(f" ⢠Methods: {method_count} documented")
print("\n⨠Visual Enhancements:")
print(" ⢠Professional color scheme with syntax highlighting")
print(" ⢠Responsive layout with max-width container")
print(" ⢠Clear visual hierarchy with styled headings")
print(" ⢠Improved code block formatting")
print(" ⢠Better spacing and typography")
if __name__ == '__main__':
compare_docs()