tokei.rs has support for badges. For example .
[![](https://tokei.rs/b1/github/XAMPPRocky/tokei_rs)](https://github.com/XAMPPRocky/tokei_rs).
Tokei's URL scheme is as follows.
https://tokei.rs/b1/<domain>[<.com>]?/<namespace>/<repository>
domain
: The domain name of git host. If no TLD is provided.com
is added. e.g.tokei.rs/b1/github
==tokei.rs/b1/github.com
.namespace
: The namespace of the repo. eg.rust-lang
orXAMPPRocky
.repository
: the name of the repo eg.rust
ortokei
.
By default the badge will show the repo's total lines, you can also
specify for it to show a different category, by using the ?category=
query
string. It can be either code
, blanks
, files
, lines
, or comments
.
Here is an example showing total number of code.
.
[![](https://tokei.rs/b1/github/XAMPPRocky/tokei?category=code)](https://github.com/XAMPPRocky/tokei).
You can choose to count lines only for specific language type(s), by using the ?type=
query
string. Languages are to be separated by a comma.
Here is an example showing total number of lines for JSON, Rust, and Markdown.
.
[![](https://tokei.rs/b1/github/XAMPPRocky/tokei?type=JSON,Rust,Markdown)](https://github.com/XAMPPRocky/tokei).
You can customize the badge label by using the ?label=
query string. For example, .
[![](https://tokei.rs/b1/github/XAMPPRocky/tokei?category=code&label=custom%20label)](https://github.com/XAMPPRocky/tokei).
By default, the badge uses the "flat" style. You can customize the badge style by using the ?style=
query string. Supported styles are flat
, flat-square
, plastic
, for-the-badge
, and social
. For example, .
[![](https://tokei.rs/b1/github/XAMPPRocky/tokei?category=code&style=for-the-badge)](https://github.com/XAMPPRocky/tokei).
By default, the badge uses the color blue #007ec6
. You can customize the badge color by using the ?color=
query string. Supported color formats include named colors and RGB hexadecimal, a full list of supported formats can be found here. For example, .
[![](https://tokei.rs/b1/github/XAMPPRocky/tokei?category=code&color=ff0000)](https://github.com/XAMPPRocky/tokei).
You can customize the badge logo (SVG format) by passing its full URL to the ?logo=
query string. For example, .
[![](https://tokei.rs/b1/github/XAMPPRocky/tokei?category=code&logo=https://simpleicons.org/icons/rust.svg)](https://github.com/XAMPPRocky/tokei).
(C) Copyright 2018 by XAMPPRocky and contributors
See the graph for a full list of contributors.
tokei.rs is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE, LICENSE-MIT for more information.