Skip to content

Commit 7bfcb98

Browse files
committed
Add README.md details for badges
1 parent 7d9556b commit 7bfcb98

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,14 +1042,29 @@ Valid values include `code, blanks, lines, comments, cocomo` and examples of the
10421042
[![Scc Count Badge](https://sloc.xyz/github/boyter/scc/?category=comments)](https://github.com/boyter/scc/)
10431043
[![Scc Count Badge](https://sloc.xyz/github/boyter/scc/?category=cocomo)](https://github.com/boyter/scc/)
10441044

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

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

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

1052+
You can also configure the look and feel of the bad using the following parameters,
1053+
1054+
- ?lower=true will lower the title text, so "Total lines" would be "total lines"
1055+
1056+
The below can control the colours of shadows, fonts and badges
1057+
1058+
- ?font-color=fff
1059+
- ?font-shadow-color=010101
1060+
- ?top-shadow-accent-color=bbb
1061+
- ?title-bg-color=555
1062+
- ?badge-bg-color=4c1
1063+
1064+
An example of using some of these parameters to produce an admittedly ugly result
1065+
1066+
[![Scc Count Badge](https://sloc.xyz/github/boyter/scc?font-color=ff0000&badge-bg-color=0000ff&lower=true)](https://github.com/boyter/scc/)
1067+
10531068
*NB* it may not work for VERY large repositories (has been tested on Apache hadoop/spark without issue).
10541069

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

0 commit comments

Comments
 (0)