12 releases

0.13.0 Jul 12, 2022
0.12.0 Aug 6, 2021
0.11.1 Apr 3, 2021
0.10.2 Apr 1, 2021
0.8.1 Feb 23, 2021

#255 in Cargo plugins

Download history 12/week @ 2022-04-22 23/week @ 2022-04-29 68/week @ 2022-05-06 188/week @ 2022-05-13 34/week @ 2022-05-20 99/week @ 2022-05-27 90/week @ 2022-06-03 3/week @ 2022-06-17 1/week @ 2022-06-24 24/week @ 2022-07-01 43/week @ 2022-07-08 21/week @ 2022-07-15 27/week @ 2022-07-22 27/week @ 2022-07-29

130 downloads per month

MIT license

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

~4–5.5MB
~133K SLoC