Display your codewars stats at your github readme profile!
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)
You can add the following query params to the base url: https://github.r2v.ch/codewars
parameter | requierd | describtion | example |
---|---|---|---|
username |
yes | used to get the user info from codewars | username=foo |
name | no | if set to true the codewars name (nickname) is used on the card instead of the username |
name=true |
top_languages | no | extens the crad with 3 icons of the top trained languages | top_languages=true |
stroke | no | sets a border with the passed in color around the card | stroke=black stroke=rgb(0,0,0) stroke=%23000000 |
theme | no | sets a theme for the card | theme=light theme=dark |
hide_clan | no | removes the clan name from the card | hide_clan=true |
cache-control | no | changes the cache-control http header value | cache_control=86400 |
animation | no | can be used to disable the animations | animation=false |
![Codewars](https://github.r2v.ch/codewars?user=USERNAME&name=true)
![Codewars](https://github.r2v.ch/codewars?user=USERNAME&top_languages=true)
![Codewars](https://github.r2v.ch/codewars?user=USERNAME&stroke=%23BB432C)
β οΈ 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
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)
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.
![Codewars](https://github.r2v.ch/codewars?user=USERNAME&hide_clan=true)
β οΈ Important: This feature will eventually be expanded in a way to hide other infos likehonor
from the card. Therefore it is not guaranteed that it will stay exact the same.
![Codewars](https://github.r2v.ch/codewars?user=USERNAME&name=true&top_languages=true&stroke=%23b362ff&theme=purple_dark)
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)
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)
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>
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.π
-
Inspired by https://github.com/anuraghazra/github-readme-stats
-
Icons are from https://icomoon.io/
-
If you have any questions don't hesitate open a issue!