Generates an SVG of your GitHub contributions:
This is forked from githubchart and ported from Ruby to Rust. It does not provide 100% of the same functionality, but it does generate a similar SVG.
If you have Rust installed and are familiar with cargo, you can install and run this directly:
cargo run -- output.svg -u frytgThis compiles and runs the program directly (using dev profile and debug symbols). This would also be the command when developing locally.
To modify the color scheme used, you can provide -c SCHEME. For example, cargo run -- output.svg -u frytg -c halloween uses GitHub's halloween colors.
Use cargo fmt to format the code and cargo test to run the tests.
Alternatively, you can download a release binary from the releases page and run it directly:
./githubchart-rust output.svg -u frytgYou can build a release binary with:
cargo build --releaseCargo.toml is configured to optimize for size.
Test the binary with:
./target/release/githubchart-rust release.svg -u frytgSee Compiling from Rust to WebAssembly for a full guide on compiling Rust to WebAssembly (WASM).
This project is already configured to build for Web with wasm-pack. Run this command to build:
wasm-pack build --target webwasm-pack build --target deno --out-dir pkg-denoor a combined version for both:
rm -rf pkg && wasm-pack build --target deno --out-name githubchart_rust_deno && wasm-pack build --target web && rm pkg/.gitignoreFor the combined version, you will need to remove files from pkg/package.json to publish all files (web+deno) to NPM.
There's also an example in web/example.html that you can run locally.
More docs about this:
This githubchart-rust fork (like the upstream repository) is released under the MIT License. See the bundled LICENSE file for details.