Skip to content

Commit 91cf9c5

Browse files
authored
Updated the leetcode-bagde README for a better lisibility
1 parent a9f7ede commit 91cf9c5

1 file changed

Lines changed: 77 additions & 18 deletions

File tree

README.md

Lines changed: 77 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,97 @@
1-
# My First Mini Project: **A Custom LeetCode Badge**
1+
# A Customized LeetCode Badge
22

3-
The goal is to display this badge on my personal **GitHub profile README**
3+
I wanted to **show my Leetcode stats on my GitHub profile** and I only found few models online but the **designs weren't to my taste**... So I took this opportunity to design my own one
44

5-
## 🔍 Overview
5+
[![My LeetCode badge](https://raw.githubusercontent.com/Yoouss/leetcode_badge/main/app/static/badge.png)](https://leetcode.com/u/Yoouss/)
6+
7+
It helped me **practice my HTML/CSS skills** and gave me the opportunity to **start my first personal project**
8+
9+
## Overview
610
This mini-project is built with **Flask**, a **Python** web framework, to fetch data from **LeetCode** using an **API** **every 24h**
7-
- Hosted on [https://leetcode-badge.onrender.com/](https://leetcode-badge.onrender.com) (HTML/CSS)
11+
- Hosted on [https://leetcode-badge.onrender.com](https://leetcode-badge.onrender.com) (HTML/CSS)
812
- Hosted on the **repository** : app/static/badge.png (PNG image)
913

10-
/!\ The website is hosted on **Render** so it may be in a sleeping mode. Try again few minutes later
11-
12-
[![My LeetCode badge](https://raw.githubusercontent.com/Yoouss/leetcode_badge/main/app/static/badge.png)](https://leetcode.com/u/Yoouss/)
14+
> [!CAUTION]
15+
> The badge is hosted on **Render** so it may be in a sleeping mode, this can take **few minutes**
1316
14-
## The meaning behind this project
15-
I wanted to **show my Leetcode stats on my GitHub profile**, but I only found a few models online and the **designs weren't to my taste**... So I decided to **create my own custom-designed badge** <br>
17+
**I'll soon update this README to show step by step how to use my project to display your own stats : )**
1618

17-
It helped me **practice my HTML/CSS skills** and gave me the opportunity to **start my first personal project**
19+
## Installation
20+
21+
### 0. Requirements
22+
23+
<details>
24+
<summary><b>Debian based users</b> (WSL, Ubuntu, Mint, Pop_OS!, ...)</summary>
25+
26+
```bash
27+
sudo apt install python3 python3-pip python3-venv
28+
```
29+
30+
</details>
31+
32+
<details>
33+
<summary><b>Red Hat based users</b> (Fedora, ...)</summary>
34+
35+
```bash
36+
sudo dnf install python3 python3-pip
37+
```
38+
39+
</details>
40+
41+
<details>
42+
<summary><b>Arch based users</b> (Arch, EndeavourOS, ...)</summary>
43+
44+
```bash
45+
sudo pacman -S python python-pip
46+
```
47+
48+
</details>
49+
50+
<details>
51+
<summary><b>MacOS users</b></summary>
52+
53+
```bash
54+
brew install python
55+
```
56+
57+
</details>
58+
59+
---
60+
61+
### 1. Clone the repo and go to the project directory
62+
63+
- Via **https** :
64+
```bash
65+
git clone https://github.com/Yoouss/leetcode-badge.git && cd leetcode-badge
66+
```
1867

19-
## ❔ How to use Flask ?
20-
- First, **clone** the **repository** :
68+
- Or **ssh** :
2169
```bash
22-
git clone https://github.com/Yoouss/leetcode_badge.git
23-
cd leetcode_badge
70+
git clone git@github.com:Yoouss/leetcode-badge.git && cd leetcode-badge
2471
```
25-
- Then, **install** the **requirements.txt** in an **virtual environment** :
72+
73+
---
74+
75+
### 2. Create a virtual environment and install the dependencies
76+
2677
```bash
27-
python -m venv venv
78+
python3 -m venv venv
2879
source venv/bin/activate
2980
pip install -r requirements.txt
3081
```
31-
- Finally, to **lunch Flask**, use : <br>
82+
83+
## Usage
84+
85+
To run the project locally, **start the Flask development server** :
86+
3287
```bash
3388
flask --app app --debug run
3489
```
3590

36-
## ▫️ Bonus : the evolution of the badge's design
91+
> [!CAUTION]
92+
> If you send **too many requests to the API** that fetches LeetCode stats, **errors may occur**
93+
94+
95+
## Bonus : the evolution of the badge's design
3796
<img src="archive/leetcode-badge-v1.png" width="400"> <img src="archive/leetcode-badge-v2.png" width="400">
3897
<img src="archive/leetcode-badge-v3.png" width="400"> <img src="archive/leetcode-badge-v4.png" width="400">

0 commit comments

Comments
 (0)