-
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]"
python -m playwright install chromiumUnit 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_stagingRendered-site browser tests build the bundled example library, serve the generated HTML from a temporary local HTTP server, and exercise JavaScript behavior on the fully rendered pages:
python -m unittest discover tests_browserImportant modules:
-
cr4te.py: CLI entry point, validation, confirmation, and process exit outcomes. -
build_runner.py: build-phase orchestration, timing, and expected operational failure context. -
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 and apply CLI overrides.
- Validate paths and request output-folder confirmation.
- Discover themes.
- Clear or create the output folder.
- Reconcile metadata files.
- Build a lightweight library index.
- Render one creator at a time.
- Render overview and tag pages.
- Combine and deduplicate phase issues.
- Log the final 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.