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/nameformat. - PLATO_
VERSION - The pinned Plato release version.
Functions§
- all_
dirs_ 🔒cached - Returns
trueif every asset directory is present incache_dir. - copy_
from_ 🔒cache - Copies asset directories from
cache_dirintodestfor each name indirs. - run
- Downloads static asset directories from the pinned Plato release.