|
1 | 1 | # @xamidi/github-stats-combinator
|
2 | 2 |
|
3 |
| -Guide will follow. For now, you may have a look at the comments in the source code of [the example](https://github.com/xamidi/github-stats-combinator/blob/master/public/sample.svg). |
| 3 | +This tool combines three scalable vector graphics (SVG) images from three sources |
| 4 | + |
| 5 | +1. `https://github-readme-stats.vercel.app/api?[…stats-query…]` |
| 6 | + of [@anuraghazra/github-readme-stats](https://github.com/anuraghazra/github-readme-stats) |
| 7 | +2. `https://github-readme-stats.vercel.app/api/top-langs?[…languages-query…]` |
| 8 | + of [@anuraghazra/github-readme-stats](https://github.com/anuraghazra/github-readme-stats) |
| 9 | +3. `https://github-profile-trophy.vercel.app/?[…trophies-query…]` |
| 10 | + of [@ryo-ma/github-profile-trophy](https://github.com/ryo-ma/github-profile-trophy) |
| 11 | + |
| 12 | +via a single query `https://github-stats-combinator.vercel.app/api?[…query…]`, for |
| 13 | + |
| 14 | +``` |
| 15 | +[…query…] := stats=UrlEncode([…stats-query…])&languages=UrlEncode([…languages-query…])&trophies=UrlEncode([…trophies-query…]) |
| 16 | +``` |
| 17 | + |
| 18 | +where `UrlEncode` maps strings to their [URL-encoded](https://www.urlencoder.org) variant. |
| 19 | + |
| 20 | +For example, |
| 21 | + |
| 22 | +[](https://github.com/xamidi/github-stats-combinator/blob/master/public/sample.svg) |
| 23 | + |
| 24 | +was combined from |
| 25 | + |
| 26 | +1. [https://github-readme-stats.vercel.app/api?[…stats-query…]](https://github-readme-stats.vercel.app/api?username=xamidi&show_icons=true&theme=radical&include_all_commits=true&hide_border=true), for |
| 27 | + ``` |
| 28 | + […stats-query…] := username=xamidi&show_icons=true&theme=radical&include_all_commits=true&hide_border=true |
| 29 | + ``` |
| 30 | +2. [https://github-readme-stats.vercel.app/api/top-langs/?[…languages-query…]](https://github-readme-stats.vercel.app/api/top-langs/?username=xamidi&layout=donut-vertical&theme=radical&langs_count=4&hide_border=true), for |
| 31 | + ``` |
| 32 | + […languages-query…] := username=xamidi&layout=donut-vertical&theme=radical&langs_count=4&hide_border=true |
| 33 | + ``` |
| 34 | +3. [https://github-profile-trophy.vercel.app/?[…trophies-query…]](https://github-profile-trophy.vercel.app/?username=xamidi&theme=radical&column=3&margin-w=9&margin-h=9&title=MultiLanguage,LongTimeUser,Commits), for |
| 35 | + ``` |
| 36 | + […trophies-query…] := username=xamidi&theme=radical&column=3&margin-w=9&margin-h=9&title=MultiLanguage,LongTimeUser,Commits |
| 37 | + ``` |
| 38 | + |
| 39 | +via [https://github-stats-combinator.vercel.app/api?[…query…]](https://github-stats-combinator.vercel.app/api?stats=username%3Dxamidi%26show_icons%3Dtrue%26theme%3Dradical%26include_all_commits%3Dtrue%26hide_border%3Dtrue&languages=username%3Dxamidi%26layout%3Ddonut-vertical%26theme%3Dradical%26langs_count%3D4%26hide_border%3Dtrue&trophies=username%3Dxamidi%26theme%3Dradical%26column%3D3%26margin-w%3D9%26margin-h%3D9%26title%3DMultiLanguage%2CLongTimeUser%2CCommits), for |
| 40 | + |
| 41 | +``` |
| 42 | +[…query…] := stats=username%3Dxamidi%26show_icons%3Dtrue%26theme%3Dradical%26include_all_commits%3Dtrue%26hide_border%3Dtrue&languages=username%3Dxamidi%26layout%3Ddonut-vertical%26theme%3Dradical%26langs_count%3D4%26hide_border%3Dtrue&trophies=username%3Dxamidi%26theme%3Dradical%26column%3D3%26margin-w%3D9%26margin-h%3D9%26title%3DMultiLanguage%2CLongTimeUser%2CCommits |
| 43 | +``` |
| 44 | + |
| 45 | + |
| 46 | +I recommend to request images that fit the predefined container dimensions, such as via |
| 47 | + |
| 48 | +``` |
| 49 | +column=3&margin-w=9&margin-h=9&title=MultiLanguage,Experience,Commits |
| 50 | +``` |
| 51 | + |
| 52 | +for `[…trophies-query…]`, and to query the SVG from your `username/username` repository's `README.md` like |
| 53 | + |
| 54 | +```html |
| 55 | +<p align="center"> |
| 56 | +<img width="776" height="352" alt="[username's GitHub stats - refresh to load image]" src="https://github-stats-combinator.vercel.app/api?[…query…]"> |
| 57 | +</p> |
| 58 | +``` |
| 59 | + |
| 60 | +in order to handle cases where the `github-stats-combinator.vercel.app` deployment went into "light sleep" due to inactivity (see [issue #1](https://github.com/xamidi/github-stats-combinator/issues/1)). |
0 commit comments