boyter / scc

Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go
MIT License
6.48k stars 254 forks source link

Suggestion: add badges to shields.io #199

Open MatthewReid854 opened 3 years ago

MatthewReid854 commented 3 years ago

Would it be possible to get the scc code count badges added to shields.io ? Shields.io allows further badge customization of color and logos than is possible with the basic sloc.xyz badge. Down the bottom of the shields.io page is the way to request a badge be added, but I didn't want to do this suggestion myself as I thought you'd be better placed to communicate the API details.

boyter commented 3 years ago

If I am going to do this, I want to move away from the current AWS lambda solution too, since its a little more costly than I would like it to be.

Seems fairly easy, just need to link like so https://img.shields.io/badge/Total%20Lines-24k-green when returning...

Probably want the option to get the scc one or shields though just in case they ever go down.

Approved! Ill need to port away from lambda first, but then it should be fairly easy.

boyter commented 3 years ago

This prompted me to login and look at it. Seems its used more than I would have thought, at about 30,000 requests a month or so.

hongbo-miao commented 1 year ago

I was thinking a shields-like style would be also good. I opened a ticket at https://github.com/boyter/scc/issues/402 😃

boyter commented 1 year ago

OK. I have finally removed the old way of processing badges and ported to the new one, and flipped the DNS to match. You can find the code to do so here if you want to make a PR

https://github.com/boyter/scc/blob/master/cmd/badges/main.go

Otherwise I will start looking into this soon.