0.7.1 |
|
---|---|
0.7.0 |
|
0.6.0 |
|
0.5.0 |
|
0.1.1 |
|
#16 in #badge
520KB
835 lines
Merit
CLI
❯ badge --help
Usage: badge -s <subject> [--style <style>] [--size <size>] [--color <color>] [--icon <icon>] [--icon-color <icon-color>] [--out <out>] [-t <text>] [--data <data>]
Fast badge generator for any purpose
Options:
-s, --subject badge subject
--style badge style. [possible values: flat | f, classic | c]
--size badge size. [possible values: large | l, medium | m, small | s]
--color badge color. Must be a valid css color
--icon badge icon. icon can be any Brand or Solid icons from fontawesome
--icon-color icon color. Must be a valid css color
--out output svg to file
-t, --text badge text
--data data for badge chart.
--help display usage information
lib.rs
:
Fast badge generator for any purpose
Create badges with text, icons and sparkline chart
Web
See https://github.com/msuntharesan/merit#web
Quick start
Add merit
to your Cargo.toml
as as a dependency.
Examples
use merit::{Badge};
fn badge() {
let mut badge = Badge::new();
badge.subject("Subject");
println!("{}", badge.text("Text").to_string());
}
This produce a svg badge:
use merit::{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
~127K SLoC