slpc-rust
The Rust implementation of Slipcase, a container format that binds a file to a flyleaf describing it.
A .slpc file is a ZIP archive holding a content file of any type together with a TOML flyleaf document describing it. The two become one file, so copying, moving, or sending the content file carries its flyleaf along.
This repository is a Cargo workspace holding two crates:
slpc — the library. Reads, writes, and validates containers.
slipcase — the command-line tool, built on the library.
The specification lives in excelano/slipcase and is the authority on the format. publishes it as pages.
This is a reference implementation: it exists to show that the specification is implementable and to be checked against it.
Install
Debian and Ubuntu
Add the Excelano apt repository once:
curl -fsSL https://excelano.com/apt/setup.sh | sudo sh
Then install it, so apt upgrade keeps it current:
sudo apt install slipcase
Both amd64 and arm64 packages ship with every release.
Homebrew
brew install excelano/tap/slipcase
crates.io
cargo install slipcase
Windows
winget install Excelano.slipcase-cli
The identifier carries -cli and the command does not: what lands on the path
is slipcase. winget install slipcase reaches Slipcase Desktop, the viewer
and flyleaf editor, which is a different program that opens containers rather
than a command that makes them.
slipcase pack report.pdf --flyleaf owner.toml # writes report.pdf.slpc
slipcase info report.pdf.slpc # prints the flyleaf; verbatim when redirected
slipcase repack report.pdf.slpc --flyleaf new.toml # changes it in place, keeping the rest
slipcase validate report.pdf.slpc # exit 0 if conformant
slipcase unpack report.pdf.slpc --dest ./out # writes the content file and nothing else
Wherever a file is read, - names standard input, and wherever one is written it
names standard output.
Exit codes tell success from bad input, from a bad command line, from a container this build cannot judge. slipcase --help states the contract.
The library
docs.rs/slpc is the library's own page, and its examples are compiled and run rather than transcribed.
This repository
DESIGN.md records the design and the reasoning behind each decision.
License
MIT. See LICENSE.