From 7bfcb98c9b850d640eeb3bb984aa60aa055689d5 Mon Sep 17 00:00:00 2001 From: Ben Boyter Date: Thu, 24 Oct 2024 11:29:37 +1100 Subject: [PATCH] Add README.md details for badges --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ac32ebe50..6570fe659 100644 --- a/README.md +++ b/README.md @@ -1042,7 +1042,6 @@ 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 @@ -1050,6 +1049,22 @@ 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