Skip to content

Commit

Permalink
Add README.md details for badges
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Oct 24, 2024
1 parent 7d9556b commit 7bfcb98
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1042,14 +1042,29 @@ Valid values include `code, blanks, lines, comments, cocomo` and examples of the
[![Scc Count Badge](https://sloc.xyz/github/boyter/scc/?category=comments)](https://github.com/boyter/scc/)
[![Scc Count Badge](https://sloc.xyz/github/boyter/scc/?category=cocomo)](https://github.com/boyter/scc/)


For `cocomo` you can also set the `avg-wage` value similar to `scc` itself. For example,

https://sloc.xyz/github/boyter/scc/?category=cocomo&avg-wage=1
https://sloc.xyz/github/boyter/scc/?category=cocomo&avg-wage=100000

Note that the avg-wage value must be a positive integer otherwise it will revert back to the default value of 56286.

You can also configure the look and feel of the bad using the following parameters,

- ?lower=true will lower the title text, so "Total lines" would be "total lines"

The below can control the colours of shadows, fonts and badges

- ?font-color=fff
- ?font-shadow-color=010101
- ?top-shadow-accent-color=bbb
- ?title-bg-color=555
- ?badge-bg-color=4c1

An example of using some of these parameters to produce an admittedly ugly result

[![Scc Count Badge](https://sloc.xyz/github/boyter/scc?font-color=ff0000&badge-bg-color=0000ff&lower=true)](https://github.com/boyter/scc/)

*NB* it may not work for VERY large repositories (has been tested on Apache hadoop/spark without issue).

You can find the source code for badges in the repository at https://github.com/boyter/scc/blob/master/cmd/badges/main.go
Expand Down

0 comments on commit 7bfcb98

Please sign in to comment.