13 unstable releases (6 breaking)
0.14.0 | Dec 15, 2022 |
---|---|
0.13.0 | Jul 12, 2022 |
0.12.0 | Aug 6, 2021 |
0.11.1 | Apr 3, 2021 |
0.8.1 | Feb 23, 2021 |
#356 in Cargo plugins
44 downloads per month
1.5MB
1K
SLoC
Badgeland
CLI
Installation
cargo install badgeland
Usage
❯ cargo badge --help
cargo-badge
Fast badge generator for any purpose
USAGE:
cargo badge [FLAGS] [OPTIONS] <content>
ARGS:
<content> Badge content
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
-c, --classic Classic badge style (Default)
-f, --flat Flat badge style
-l, --large Large badge size
-m, --medium Medium badge size
-x, --small Small badge size (Default)
OPTIONS:
--color <color> Badge color. Must be a valid css color
--icon <icon> Badge icon. icon can be any `Brand` or `Solid` icons from
fontawesome
--icon-color <icon-color> Icon color. Must be a valid css color
-o, --out <out> Output svg to file
-s, --subject <subject> Badge subject
lib.rs
:
Fast badge generator for any purpose
Create badges with text, icons and sparkline chart
Web
See https://github.com/msuntharesan/badgeland#web
Quick start
Add badgeland
to your Cargo.toml
as as a dependency.
Examples
use badgeland::{Badge};
fn badge() {
let mut badge = Badge::new();
badge.subject("Subject");
println!("{}", badge.text("Text").to_string());
}
This produce a svg badge:
use badgeland::{Badge};
fn badge_with_data() {
let mut badge = Badge::new();
badge.subject("Subject");
println!("{}", badge.data(&[12., 34., 23., 56., 45.]).to_string());
}
This produce a svg badge:
Dependencies
~6MB
~133K SLoC