Refactor: Remove obsolete JavaScript managers and utilities

- Deleted NavigationManager, RecentPlotsManager, SearchManager, SortManager, StatsManager, ThemeManager, Utils, and ViewManager classes.
- Updated gallery builder to improve asset copying logic with a more efficient modification time check.
- Cleaned up gallery HTML template by removing subdirectory listing and embedding gallery data as JSON.
- Added CLAUDE.md for project documentation and guidelines.
This commit is contained in:
Kylian Schmidt
2026-05-06 08:34:40 +02:00
parent 6f0cf4521b
commit 6738c4ca69
44 changed files with 205 additions and 5239 deletions
+14 -2
View File
@@ -260,8 +260,11 @@ def generate(
print(f"Warning: Could not render gallery root: {e}")
# Don't fail, gallery is still usable
if verbose:
print(f"✓ Gallery generated successfully at {gallery_root}")
plot_count = _count_gallery_plots(gallery_root)
if plot_count == 0:
print(f"Warning: Gallery at {gallery_root} appears to be empty — no plot files found!")
else:
print(f"✓ Gallery generated at {gallery_root}{plot_count} plots total")
return True
@@ -271,6 +274,15 @@ def generate(
return False
def _count_gallery_plots(gallery_root: Path) -> int:
"""Recursively count plot files (PDFs and HTMLs, excluding index.html) in the gallery output."""
count = 0
for f in gallery_root.rglob('*'):
if f.is_file() and f.suffix.lower() in ('.pdf', '.html') and f.name != 'index.html':
count += 1
return count
def _is_writable(path: Path) -> bool:
"""
Check if a path is writable.