Module download_assets

Module download_assets 

Source
Expand description

cargo xtask download-assets — download static assets from the Plato release.

The Cadmus distribution requires several directories of static assets (bin/, resources/, hyphenation-patterns/) that are not stored in the repository and are not included in the Cadmus release artifact.

§Temporary workaround

These assets are sourced from the upstream Plato release zip until issue #64 is resolved. Once Cadmus builds these directories from source as part of cargo xtask build-kobo, this entire task becomes unnecessary and should be removed along with the CI step that calls it.

§Caching

Extracted asset directories are cached under .cache/plato-assets/<version>/ so that CI can restore them with a version-keyed cache and avoid re-downloading the zip on every run. The workspace-level directories (bin/, resources/, hyphenation-patterns/) are populated by copying from the cache directory.

Constants§

ASSET_DIRS 🔒
Directories extracted from the Plato release zip into the workspace root.
PLATO_REPO 🔒
The Plato GitHub repository in owner/name format.
PLATO_VERSION
The pinned Plato release version.

Functions§

all_dirs_cached 🔒
Returns true if every asset directory is present in cache_dir.
copy_from_cache 🔒
Copies asset directories from cache_dir into dest for each name in dirs.
run
Downloads static asset directories from the pinned Plato release.