cache_bust_cli

Crates.iocache_bust_cli
lib.rscache_bust_cli
version0.2.0
sourcesrc
created_at2024-05-23 13:50:18.052909
updated_at2024-05-29 15:40:38.360079
descriptionCLI tool for use in conjunction with the cache_bust crate to add hashes to file names
homepage
repositoryhttps://github.com/dav-wolff/cache_bust
max_upload_size
id1249509
size15,544
(dav-wolff)

documentation

README

cache_bust_cli

This is a CLI-tool to be used in combination with cache_bust to add hashes to file names.

Installation

Using cargo:

cargo install cache_bust_cli --locked

Using nix:

nix shell github:dav-wolff/cache_bust#cli

Usage

Rename all files in a directory in-place:

cachebust assets

Copy all files in a directory to a new directory with hashes added:

cachebust assets --out hashed_assets

Rename a single file in-place and print its new name or hash:

cachebust assets --file image.png --print file-name # image.d0a2[...].png
cachebust assets --file image.png --print hash # d0a2[...]

Copy a single file to a new directory with its hash added and print its new path:

cachebust assets --file image.png --print file-path # /path/to/image.d0a2[...].png
Commit count: 18

cargo fmt