|
1 | | -<div align="center"> |
2 | | - |
3 | 1 | # 🚀 LeetCode Sync |
4 | 2 |
|
5 | | -Automatically synchronize accepted LeetCode solutions to GitHub. |
6 | | - |
7 | | -Download solutions • Generate metadata • Update README • Push to GitHub automatically |
8 | | - |
9 | | -Built with ❤️ in Python |
10 | | - |
11 | | -</div> |
12 | | - |
13 | | -## Badges |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | -## ✨ Features |
23 | | - |
24 | | -- ✅ Automatic LeetCode authentication |
25 | | -- ✅ Fetch recent accepted submissions |
26 | | -- ✅ Download source code |
27 | | -- ✅ Save metadata |
28 | | -- ✅ Git automation |
29 | | -- ✅ README generation |
30 | | -- ✅ Statistics tracking |
31 | | -- ✅ GitHub Actions automation |
32 | | -- ✅ Unit tested |
| 3 | +Automatically synchronize accepted LeetCode submissions to GitHub. |
33 | 4 |
|
| 5 | +--- |
34 | 6 |
|
35 | | -## 🏗️ Architecture |
| 7 | +## 📈 Progress |
36 | 8 |
|
37 | 9 | ```text |
| 10 | +░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ |
| 11 | +
|
| 12 | +Solved: 0 / 300 Problems |
| 13 | +
|
| 14 | +📊 Statistics |
| 15 | +Difficulty Solved |
| 16 | +🟢 Easy 0 |
| 17 | +🟡 Medium 0 |
| 18 | +🔴 Hard 0 |
| 19 | +Total 0 |
| 20 | +🔥 Latest Accepted Problem |
| 21 | +
|
| 22 | +
|
| 23 | +| Field | Value | |
| 24 | +|------|------| |
| 25 | +| Problem ID | 1 | |
| 26 | +| Title | Two Sum | |
| 27 | +| Language | Python3 | |
| 28 | +| Runtime | 45 ms | |
| 29 | +| Memory | 17 MB | |
| 30 | +
|
| 31 | +
|
| 32 | +💻 Languages Used |
| 33 | +
|
| 34 | +- **Python3** : 4 |
| 35 | +
|
| 36 | +## 📚 Recent Accepted Problems |
| 37 | +
|
| 38 | +- 1 Two Sum |
| 39 | +- 295 Find Median From Data Stream |
| 40 | +- 1 Two Sum |
| 41 | +- 295 Find Median From Data Stream |
| 42 | +
|
| 43 | +
|
| 44 | +--- |
| 45 | +
|
| 46 | +✨ Features |
| 47 | +Automatic LeetCode synchronization |
| 48 | +Automatic Git commits |
| 49 | +Automatic GitHub push |
| 50 | +Metadata generation |
| 51 | +README generation |
| 52 | +GitHub Actions support |
| 53 | +Unit tests |
| 54 | +📂 Repository Structure |
| 55 | +storage/ |
| 56 | +└── solutions/ |
| 57 | + ├── 0011_Container_With_Most_Water/ |
| 58 | + │ ├── solution.py |
| 59 | + │ └── metadata.json |
| 60 | + └── .... |
| 61 | +⚙️ Workflow |
38 | 62 | LeetCode |
39 | | - │ |
40 | | - ▼ |
41 | | - Authentication |
42 | | - │ |
43 | | - ▼ |
44 | | - API Client |
45 | | - │ |
46 | | - ▼ |
47 | | - Parser |
48 | | - │ |
49 | | - ▼ |
50 | | - Downloader |
51 | | - │ |
52 | | - ▼ |
53 | | - Statistics |
54 | | - │ |
55 | | - ▼ |
56 | | - README Generator |
57 | | - │ |
58 | | - ▼ |
59 | | - Git Manager |
60 | | - │ |
61 | | - ▼ |
62 | | - GitHub |
63 | | -``` |
64 | | - |
65 | | -## ⚙️ Installation |
66 | | - |
67 | | -```bash |
68 | | -git clone https://github.com/arnav-on-code/LEETCODE_SYNC.git |
69 | | - |
70 | | -cd LEETCODE_SYNC |
71 | | - |
72 | | -python -m venv myenv |
73 | | - |
74 | | -pip install -r requirements.txt |
75 | | -``` |
76 | | - |
77 | | -## 🔐 Environment Variables |
78 | | - |
79 | | -Create a `.env` |
80 | | - |
81 | | -```text |
82 | | -LEETCODE_SESSION= |
83 | | -
|
84 | | -CSRF_TOKEN= |
85 | | -
|
86 | | -LEETCODE_USERNAME= |
87 | | -
|
88 | | -GITHUB_USER= |
89 | | -
|
90 | | -GITHUB_EMAIL= |
91 | | -``` |
92 | | - |
93 | | -## 🚀 Usage |
94 | | - |
95 | | -Run manually |
96 | | - |
97 | | -```bash |
98 | | -python main.py |
99 | | -``` |
100 | | - |
101 | | -Run tests |
102 | | - |
103 | | -```bash |
104 | | -pytest tests -v |
105 | | -``` |
106 | | - |
107 | | -Format code |
108 | | - |
109 | | -```bash |
110 | | -black . |
111 | | -``` |
112 | | - |
113 | | -Lint |
114 | | - |
115 | | -```bash |
116 | | -flake8 . |
117 | | -``` |
118 | | - |
119 | | -## 📊 Statistics |
120 | | - |
121 | | -Easy |
122 | | - |
123 | | -Medium |
124 | | - |
125 | | -Hard |
126 | | - |
127 | | -Total |
128 | | - |
129 | | -Languages |
130 | | - |
131 | | -Recent Problems |
132 | | - |
133 | | -Latest Accepted |
134 | | - |
135 | | -Last Sync |
136 | | - |
137 | | - |
138 | | -## 📂 Repository Structure |
139 | | - |
140 | | -```text |
141 | | -Leetcode_sync |
142 | | -│ |
143 | | -├── .github/ |
144 | | -├── config/ |
145 | | -├── github_sync/ |
146 | | -├── leetcode/ |
147 | | -├── storage/ |
148 | | -├── sync/ |
149 | | -├── tests/ |
150 | | -├── utils/ |
151 | | -├── README.md |
152 | | -├── requirements.txt |
153 | | -└── main.py |
154 | | -``` |
155 | | - |
156 | | -## 🧪 Testing |
157 | | - |
158 | | -Current Status |
159 | | - |
160 | | -- ✅ 23 Unit Tests |
161 | | -- ✅ GitHub Actions |
162 | | -- ✅ Lint Checks |
163 | | -- ✅ Automatic Synchronization |
164 | | - |
165 | | - |
166 | | -## 🤖 GitHub Actions |
167 | | - |
168 | | -Three workflows are configured. |
169 | | - |
170 | | -• tests.yml |
171 | | - |
172 | | -Runs all unit tests. |
173 | | - |
174 | | -• lint.yml |
175 | | - |
176 | | -Checks formatting and linting. |
177 | | - |
178 | | -• sync.yml |
179 | | - |
180 | | -Automatically synchronizes LeetCode submissions every 6 hours. |
181 | | - |
182 | | -## 🛣️ Roadmap |
183 | | - |
184 | | -- [x] Authentication |
185 | | - |
186 | | -- [x] Downloader |
187 | | - |
188 | | -- [x] Metadata |
189 | | - |
190 | | -- [x] Statistics |
191 | | - |
192 | | -- [x] README Generator |
193 | | - |
194 | | -- [x] GitHub Actions |
195 | | - |
196 | | -- [x] Unit Tests |
197 | | - |
198 | | -- [x] README Automation |
199 | | - |
200 | | -- [ ] Docker Image |
201 | | - |
202 | | -- [ ] Multi-language README |
203 | | - |
204 | | -- [ ] PyPI Package |
205 | | - |
206 | | - |
207 | | -## 📜 License |
208 | | - |
209 | | -This project is licensed under the MIT License. |
210 | | - |
211 | | -## 📖 About |
212 | | - |
213 | | -LeetCode Sync automatically downloads accepted LeetCode solutions, stores them with metadata, updates repository statistics, regenerates the project README, and synchronizes everything to GitHub. |
214 | | - |
215 | | -The project is designed with a modular architecture and includes automated testing, CI workflows, and Git integration. |
| 63 | + │ |
| 64 | + ▼ |
| 65 | +API |
| 66 | + │ |
| 67 | + ▼ |
| 68 | +Downloader |
| 69 | + │ |
| 70 | + ▼ |
| 71 | +Statistics |
| 72 | + │ |
| 73 | + ▼ |
| 74 | +README Generator |
| 75 | + │ |
| 76 | + ▼ |
| 77 | +Git |
| 78 | + │ |
| 79 | + ▼ |
| 80 | +GitHub |
| 81 | +⏰ Last Sync |
| 82 | +
|
| 83 | +2026-07-02 12:18:27 |
0 commit comments