joonas-yoon / boj-badge

GitHub 프로필에서 BOJ badge를 사용해보세요.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BOJ Badge

Heroku App Status GitHub last commit GitHub issues GitHub

Examples

  • 랭킹 : rank rank-a
  • 문제 수 : solved psolved failed
  • 커스텀 라벨 : custom-label
  • 최장 스트릭 : color8
  • 여러 가지 색상 : color6 color7 color9

Quickstart

Markdown

![BOJ badge](https://boj-badge.herokuapp.com/?id={handle})

HTML tag

<img src="https://boj-badge.herokuapp.com/?id={handle}" alt="BOJ badge"/>

Parameters

https://boj-badge.herokuapp.com/?id={id}&query={query}&color={color}&label={label}

id

정보를 조회하려는 백준 온라인 저지의 유저 아이디입니다. 사용법은 /?id=joonas 와 같습니다.

query

query에 따라 조회하는 정보와 결과는 아래와 같습니다. 생략한다면, solved를 조회합니다.

rank의 경우, /?id={id}&query=rank 와 같이 사용하시면 됩니다.

query 설명 결과
id 유저 아이디를 표시합니다. example-id
rank 등수를 표시합니다. example-rank
rank+a 등수전체 등수를 표시합니다. example-rank-a
rank+b 등수를 백분율로 표시합니다. example-rank-b
rank+c 랭킹 몇 페이지에 있는 지 표시합니다. (정확하지 않습니다) example-rank-c
solved 맞은 문제 수를 표시합니다. example-solved
solved+a 채점 가능한 전체 문제 수를 함께 표시합니다. example-solved-a
solved+b 맞은 문제 수를 백분율로 표시합니다. example-solved-b
psolved 맞았지만 만점을 받지 못한 문제를 표시합니다. example-psolved
psolved+a 채점 가능한 전체 문제 수를 함께 표시합니다. example-psolved-a
psolved+b 맞았지만 만점을 받지 못한 문제를 백분율로 표시합니다. example-psolved-b
failed 시도했지만 맞지 못한 문제를 표시합니다. example-failed
failed+a 채점 가능한 전체 문제 수를 함께 표시합니다. example-failed-a
failed+b 시도했지만 맞지 못한 문제를 백분율로 표시합니다. example-failed-b
submitted 제출 수를 표시합니다. example-submitted
max_streak 연속으로 문제를 푼 최장 스트릭을 표시합니다. example-max_streak

color

사용 가능한 색상은 아래 표를 참고하시길 바랍니다.

Hex code로 직접 색상을 지정할 수 있습니다. 단, #%23 으로 적어야합니다. (color=#E68364 => color=%23E68364)

색상값 결과
aqua aqua
black black
blue blue
brightred brightred
fuchsia fuchsia
gray gray
green green
lightgrey lightgrey
navy navy
orange orange
purple purple
red red
silver silver
teal teal
white white
yellow yellow

label

label 부분의 텍스트를 직접 지정할 수 있습니다. 생략한다면 query에 맞게 채워집니다.

예시 결과
label ![](https://boj-badge.herokuapp.com/?id=joonas&label=alrogithm-solved&query=solved+a)

Requirements

  • Python 3.8
  • PostgreSQL or SQLite

Install & Run

환경 변수 설정

$ export DATABASE_URL=sqlite:///db.sqlite

설치 및 실행

$ pip install -r requirements.txt
$ gunicorn app:app

Development

Heroku를 통해서 배포합니다.

이 레포지토리를 fork 한 후, Heroku 계정을 사용하여 직접 배포할 수 있습니다.

License

The source code for the site is licensed under the MIT license, which you can find in the MIT-LICENSE.txt file.

All graphical assets are licensed under the Creative Commons Attribution 3.0 Unported License.

About

GitHub 프로필에서 BOJ badge를 사용해보세요.

License:MIT License


Languages

Language:Python 100.0%