scc icon indicating copy to clipboard operation
scc copied to clipboard

Suggestion: add badges to shields.io

Open MatthewReid854 opened this issue 4 years ago • 4 comments

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.

MatthewReid854 avatar Sep 09 '20 04:09 MatthewReid854

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 avatar Sep 09 '20 07:09 boyter

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.

boyter avatar Sep 09 '20 07:09 boyter

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

hongbo-miao avatar Aug 01 '23 18:08 hongbo-miao

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.

boyter avatar Aug 04 '23 01:08 boyter