Dynamically generated Code::Stats stats for your profile readme.
Get dynamically generated Code::Stats stats on your profile readme!
View Demo
·
Report Bug
·
Request Feature
Note that Github’s server aborts the request if it reaches the 4-second timeout. So maybe the images won’t show because my server is waiting for response from Code::Stats, try refreshing and see if it shows.
To prevent heavy load from Code::Stats server, all data from same user will be cached for 30 minutes before updating data.
Simply add this to your markdown and change username
to your Code::Stats username.

You can increase history days up to 30 days by adding a query parameter ?history_days=

You can increase maximum languages up to 15 by adding a query parameter ?max_languages=

You can customize the colors of grid, text, zeroline and bars by adding grid_color
, text_color
, zeroline_color
and language_colors
query parameters.
The language_colors
is a list of colors seperated by comma and wrapped with []
, each color should be wrapped with quotes (e.g. ["red","hsl(0,100%,50%)","rgba(255,0,0,0.5)"]
)

See color string below for supported color representations.
query parameter | type | description | default value |
---|---|---|---|
history_days | integer | how many days to show in the graph, maximum 30 | 14 |
max_languages | integer | how many languages to show before grouping into “Others”, maximum 15 | 8 |
timezone | timezone string | what timezone to use to calculate day ranges | 00:00 |
width | integer | the width of image (in pixels) | 900 |
height | integer | the height of image (in pixels) | 450 |
show_legend | boolean | whether to show graph legend on the right | true |
bg_color | color string | the color of the image’s background | ffffff |
grid_color | color string | the color of the grid | e8e8e8 |
text_color | color string | the color of the text | 666666 |
zeroline_color | color string | the color of the zero-line | ababab |
language_colors | color string list | the colors of each langauge and “Others” (loops if length is less than max_languages ) |
[“3e4053”,”f15854”,”5da5da”, “faa43a”,”60bd68”,”f17cb0”, “b2912f”,”decf3f”,”b276b2”] |
Special types:
Color string
#
(e.g. ff0000
, ADE
for aaddee
)rgb(255,0,0)
, rgba(0,128,128,0.5)
)hsl(0,100%,50%)
, hsla(60,50%,50%,0.7)
)hsv(0,100%,100%)
, hsva(120,100%,100%,0.5)
)Timezone string
US/Pacific
, Europe/Berlin
)07:30
, -05:00
, 0630
, -08
)You can also deploy this project on your own server by following the instructions below.
Prerequisites:
git clone https://github.com/WEGFan/codestats-profile-readme && cd codestats-profile-readme
pip install -r requirements.txt
gunicorn -c gunicorn_config.py run:app
, and you should be able to access it by http://127.0.0.1:2012
on your server