Skip to content

KATO-Hiro/AtCoderTrophies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AtCoderTrophies

🏆 Add dynamically generated AtCoder Stat Trophies to your readme.

日本語のREADME

GitHub Repo Issues GitHub Repo Stars License: MIT

Twitter URL

DEMO

demo.mp4

Features

  • Generate trophy icons using the statistics API related to AtCoder.
  • Enable to add the generated trophies to your readme in HTML or Markdown format.

Quick Start

Add the following code to your readme. When pasting the code into your profile's readme, change the ?username= value to your AtCoder's username.

[![AtCoder Trophies](https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp)](https://github.com/KATO-Hiro/AtCoderTrophies)

Use theme

Add an optional parameter of the theme. More details

In the following sample, monokai is applied.

[![AtCoder Trophies](https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=monokai)](https://github.com/KATO-Hiro/AtCoderTrophies)

About Rank

The ranks are SSS, SS, S, AAA, AA, A, B, C, UNKNOWN and SECRET.

Rank Description
SSS, SS, S You are at a hard to reach rank. You can brag.
AAA, AA, A You will reach this rank if you do your best. Let's aim here first.
B, C You are currently making good process. Let's aim a bit higher.
UNKNOWN You have not taken action yet. Let's act first.
SECRET This rank is very rare. The trophy will not be displayed until certain conditions are met.

Secret Rank

The conditions for earning it are secret, but you can find out the conditions by reading this repository code.

There are still few secret trophies. Therefore, if you come up with interesting conditions, I am waiting for contributions.

About Display Details

  1. Trophy name.
  2. Current rank.
  3. Title based on rank.
  4. Earned points.
  5. Process bar that shows the points needed to get from your current rank to the next rank.

Optional Request Parameters

Filter by titles

You can filter the display by specifying the titles of the trophy.

In the following sample, CPlusPlus is selected.

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=chokudai&title=CPlusPlus

If you want to specify multiple titles.

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=chokudai&title=AC,CPlusPlus

Filter by ranks

You can filter the display by specifying the ranks.

Available values: SECRET SSS SS S AAA AA A B C

In the following sample, rank AAA is selected.

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=chokudai&rank=AAA

If you want to specify multiple ranks.

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=chokudai&rank=AAA,AA,A

Specify the maximum row & column size

You can specify the maximum size of rows and columns. Trophies will be hidden if they exceed the range of both rows and columns.

Available value: number type

Default: row=3 column=7

Restrict only row:

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=chokudai&row=2

Restrict only column:

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=chokudai&column=2

Restrict row & column:

The following sample shows the case of two rows and three columns.

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&row=2&column=3

Apply theme

List of available themes.

theme
alduin
algolia
apprentice
buddhism
chalk
darkdimmed
darkhub
darklover
discord
dracula
flat
gitdimmed
gruvbox
juicyfresh
matrix
monokai
nord
oldie
onedark
onestar
radical
tokyonight

alduin

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=alduin

algolia

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=algolia

apprentice

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=apprentice

buddhism

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=buddhism

chalk

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=chalk

darkdimmed

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=darkdimmed

darkhub

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=darkhub

darklover

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=darklover

discord

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=discord

dracula

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=dracula

flat

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=flat

gitdimmed

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=gitdimmed

gruvbox

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=gruvbox

juicyfresh

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=juicyfresh

matrix

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=matrix

monokai

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=monokai

nord

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=nord

oldie

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=oldie

onedark

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=onedark

onestar

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=onestar

radical

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=radical

tokyonight

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&theme=tokyonight

Margin

Margin Width

You can put a margin in the width between trophies.

Available value: number type

Default: margin_w=0

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=chokudai&margin_w=15

Margin Height

You can put a margin in the height between trophies.

Available value: number type

Default: margin_h=0

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=chokudai&margin_h=15

Example layout

The following sample shows a case where the width and height margins are 15.

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&margin_w=15&margin_h=15

Transparent background

You can turn the background transparent.

Available value: boolean type (true or false)

Default: no_bg=false

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&no_bg=true

Hide frames

You can hide the frames around the trophies.

Available value: boolean type (true or false)

Default: no_frame=false

https://atcoder-trophies.vercel.app/api/v1/atcoder?username=semiexp&no_frame=true

Contribution Guide

Document

Special Thanks

AtCoder

AtCoder Problems API / Datasets

Champion Vectors by Vecteezy

Github Profile Trophy

Readme Driven Development; RDDarchive.org

Related Projects

AtCoder Badges

GitHub Readme Stats

Zenn.badge

Author

@KATO-Hiro

License

MIT