Sign inSign up

dinifarb/codewars

By dinifarb

•Updated 9 months ago

Display your codewars stats at your github profile 🚀

Image
0

842

dinifarb/codewars repository overview

⁠Codewars readme stats

Display your codewars stats at your github readme profile⁠!

⁠Service Status

Currently down 🙃 ⁠

⁠Basic Example

Just replace USERNAME in the string below by your codewars username and copy-paste it to your github profile readme.

![Codewars](https://github.r2v.ch/codewars?user=USERNAME)

Codewars


⁠Query params

You can add the following query params to the base url: https://github.r2v.ch/codewars

parameterrequierddescribtionexample
usernameyesused to get the user info from codewarsusername=foo
name⁠noif set to true the codewars name (nickname) is used on the card instead of the usernamename=true
top_languages⁠noextens the crad with 3 icons of the top trained languagestop_languages=true
stroke⁠nosets a border with the passed in color around the cardstroke=black
stroke=rgb(0,0,0)
stroke=%23000000
theme⁠nosets a theme for the cardtheme=light
theme=dark
hide_clan⁠noremoves the clan name from the cardhide_clan=true
hide_title⁠noremoves the title from the cardhide_title=true
cache-control⁠nochanges the cache-control http header valuecache_control=86400
animation⁠nocan be used to disable the animationsanimation=false

⁠Examples for all query params

⁠Display nickname
![Codewars](https://github.r2v.ch/codewars?user=USERNAME&name=true)

Codewars

⁠Top trained languages icons
![Codewars](https://github.r2v.ch/codewars?user=USERNAME&top_languages=true)

Codewars

⁠Set card border
![Codewars](https://github.r2v.ch/codewars?user=USERNAME&stroke=%23BB432C)

:warning: Important: You can pass in the usual css color types just make sure to use %23 instead of # while using hex code because of the url encoding⁠

Codewars

⁠Themes

This allows you to change de default codewars like theme. You can find a example of all themes here⁠.

![Codewars](https://github.r2v.ch/codewars?user=USERNAME&theme=gradient)

Codewars

If you wish for other themes I am happy to take a pull request, just place your desired color set in the themes.go⁠ and themes.md⁠ file and your ready to go for the PR. For gradient themes see the special values for the Card property of the Theme struct. You can find more infos about how to add gradient values in the themes.go⁠ file.

⁠Hide clan
![Codewars](https://github.r2v.ch/codewars?user=USERNAME&hide_clan=true)

Codewars

⁠Hide title
![Codewars](https://github.r2v.ch/codewars?user=USERNAME&hide_title=true)

Codewars

⁠All params together
![Codewars](https://github.r2v.ch/codewars?user=USERNAME&name=true&top_languages=true&stroke=%23b362ff&theme=purple_dark)

Codewars

⁠Cache Control

The cache_control query parameter allows you to change the Cache-Control⁠ HTTP header value. It only requires the specification of the number of seconds, which will then be added as max-age=<value> like this:

![Codewars](https://github.r2v.ch/codewars?user=USERNAME&cache_control=86400)
⁠Animation

The Animations are enabled by default. The animation query parameter allows you to disable it.

![Codewars](https://github.r2v.ch/codewars?user=USERNAME&animation=false)

The pattern for linking svg content ![name](link to svg) can be wrapped in []() markdown option to link somewhere when clicked.

[![Codewars](https://github.r2v.ch/codewars?user=USERNAME)](LINK)

Codewars

⁠As Image

Optional to the svg ref markdown style it is possible to load the card as image. This gives you the possibility to center it as example.

<p align="center" >
    <a href="LINK TO: WHEN CLICKED">
      <img src="https://github.r2v.ch/codewars?user=USERNAME" />
    </a>
</p>

⁠

⁠Host it on your own

In case you want to run this service on your own server you can use the docker image. The image is available on dockerhub⁠.

Try it out with:

docker run -it -p 3000:3000 dinifarb/codewars

Or just clone this repo and do whatever you want with it.😉

⁠Additional

Tag summary

Content type

Image

Digest

sha256:dcc15d20b…

Size

66.3 MB

Last updated

9 months ago

docker pull dinifarb/codewars