Skip to content
animfetch
Menu

Help

Contributing

Build animfetch from source, run the tests, and add an animation or a border.

animfetch is open source under the MIT licence. Issues and pull requests are welcome at github.com/Andrew-Velox/animfetch.

Build it#

You need Rust 1.88 or newer.

sh
git clone https://github.com/Andrew-Velox/animfetch
cd animfetch
cargo build --release
./target/release/animfetch --once

The built-in border images are a default feature. To build without them (about 950 KiB smaller):

sh
cargo build --release --no-default-features

Test it#

sh
cargo test --locked
cargo clippy --locked --all-targets -- -D warnings
RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps --document-private-items

CI runs clippy with warnings denied and rustdoc with warnings denied, so run both before opening a pull request. Cargo.lock is committed on purpose and CI builds with --locked: if you change dependencies, commit the lockfile too.

Add an animation#

Frames are plain text files, one per frame, in a folder named for the animation, under assets/anim/. Category folders are fine:

assets/anim/animals/my-animal/
  00.txt
  01.txt
  02.txt

The build bundles every folder that holds .txt frames. Zero-pad the file names so they sort in order. CI loads every bundled animation in every style, and checks that the number bundled matches the number on disk.

Add a border#

A PNG of mostly transparent line art in light strokes, in assets/border/, named with the next number (15.png after 14.png). Any image can go on either edge, so draw it upright: the bottom one is turned a quarter clockwise when drawn. Only PNG is bundled.

Commit messages#

Commits follow conventional prefixes (feat:, fix:, docs:, chore:). The release changelog is generated from them, and commits without a prefix are left out of it.

Layout of the source#

PathWhat is there
src/anim.rsLoading animations and drawing frames.
src/fetch/System information: one backend per platform (linux, macos).
src/render/The info styles, in render/info/.
src/border/Border images: decoding, sizing and the kitty graphics protocol.
src/config.rsThe config file.
src/cli.rsFlags and --help.
src/modes.rs, src/pin.rsThe ways animfetch runs.
assets/Built-in animations and border images.
packaging/The AUR packages and release notes.

Releases#

A release is a tag, vX.Y.Z. The workflow builds four tarballs (Linux and macOS, two architectures each), checksums, a changelog, and a GitHub Release, which the install script and the animfetch-bin AUR package read from.