-
Notifications
You must be signed in to change notification settings - Fork 0
Development
This page is for people working on cr4te itself.
git clone https://github.com/vger-6/cr4te.git
cd cr4te
pip install -e ".[dev]"Browser tests need the browser-test extra and Playwright browser setup:
pip install -e ".[browser-test]"Unit tests:
python -m unittest discover testsFocused tests:
python -m unittest tests.test_metadata_manager
python -m unittest tests.test_html_build
python -m unittest tests.test_media_stagingBrowser tests live under tests_browser.
Important modules:
-
cr4te.py: CLI entry point and command orchestration. -
config_manager.py: default config, user config loading, CLI overrides. -
config_presets.py: domain presets. -
metadata_manager.py: creates and reconciles editable metadata files. -
library_scan.py: scans folders and buckets media. -
library_builder.py: builds typed creator/project models and lightweight library indexes. -
library_issues.pyandbuild_issues.py: best-effort and strict issue handling. -
html_builder.py: streaming/two-pass HTML build. -
page_contexts.pyandoverview_contexts.py: typed render context assembly. -
render_assets.py: thumbnails and media staging. -
render_media.py: media section context assembly. -
render_metadata.py: metadata display entries and filter links. -
template_renderer.py: Jinja rendering boundary. -
templates/: generated HTML templates. -
assets/: static CSS, JS, and favicon copied into output.
cr4te build runs roughly as:
- Load config.
- Apply CLI overrides.
- Validate input and output paths.
- Clear output folder if needed.
- Reconcile metadata files.
- Build a lightweight library index.
- Render one creator at a time.
- Render overview and tag pages.
- Log build summary.
The streaming/two-pass shape matters for larger libraries. Avoid changes that require holding all full media groups for the whole library globally.
Durable product/design requirements live in info/REQUIREMENTS.md in the main repo.
The generated site is static. Feature scripts register with cr4te.onReady; templates should not use inline JavaScript handlers.
Client-side features include:
- Search filtering
- Pagination
- Aspect and justified gallery layout
- Theme selector
- Lightbox
- Audio player
- Video player
- Responsive content movement
Keep the README as the repository front door and the wiki as the manual. When wiki pages change substantially, check whether the README should link to them or shed duplicated detail.