|
4 | 4 |
|
5 | 5 | ## Features |
6 | 6 |
|
7 | | -* **Problem Fetching:** LeetCode.py fetches the problem details directly from `leetcodeDb.json` ~~LeetCode's official API, allowing you to access all the necessary information about a problem~~. |
| 7 | +* **Problem Fetching:** LeetCode.py fetches the problem details directly from ~~`leetcodeDb.json`~~ LeetCode's official API, allowing you to access all the necessary information about a problem. |
8 | 8 |
|
9 | 9 | * **Code Snippet Retrieval:** With LeetCode.py, you can easily retrieve code snippets for a specific problem. |
10 | 10 |
|
11 | 11 | * **Code Editing:** You can modify and edit the code directly within the terminal, saving you the hassle of switching between multiple applications. |
12 | 12 |
|
13 | 13 | * **ASCII Art:** LeetCode.py provides a beautiful ASCII art for each problem, making your coding experience more enjoyable. |
14 | 14 |
|
15 | | -* **Language Support:** LeetCode.py supports only **Python**. |
| 15 | +* **Language Support:** LeetCode.py supports ~~only **Python**~~ all languages except Python2. |
16 | 16 |
|
17 | 17 | ### Installation |
18 | 18 | ``` |
19 | 19 | git clone https://github.com/hrdkmishra/leetcode.py.git |
20 | 20 | cd leetcode.py |
| 21 | +python3 -m venv venv |
| 22 | +source venv/bin/activate |
21 | 23 | pip install -r requirements.txt |
22 | 24 | ``` |
23 | 25 |
|
24 | 26 | ### Usage |
25 | 27 |
|
| 28 | +#### note: `lc.py --lib` for fixing python-leetcode lib issue |
| 29 | + |
26 | 30 | First you need to enter your leetcode session and crsf token |
27 | 31 | ``` |
28 | | -python leetcode.py |
| 32 | +python lc.py |
29 | 33 | ``` |
30 | 34 | to fetch the problem |
31 | 35 | ``` |
32 | | -python leetcode.py -q/--question <question_number> |
| 36 | +python lc.py -q/--question <question_number> |
33 | 37 | ``` |
34 | 38 |  |
35 | 39 |
|
36 | | -to fetch problems in range |
| 40 | +to fetch problems in range (might not work always) |
37 | 41 | ``` |
38 | | -python leetcode.py -q/--question <question_number>:<question_number> |
| 42 | +python lc.py -q/--question <question_number>:<question_number> |
39 | 43 | ``` |
40 | 44 |  |
41 | 45 |
|
42 | 46 | to solve the problem |
43 | 47 | ``` |
44 | | -python leetcode.py -s/--solve <question_number> |
| 48 | +python lc.py -s/--solve <question_number> |
45 | 49 | ``` |
46 | 50 |  |
47 | 51 |
|
| 52 | +to test the code |
| 53 | +``` |
| 54 | +python lc.py -t/--test code_editor/filename |
| 55 | +``` |
| 56 | + |
| 57 | +to submit the code |
| 58 | +``` |
| 59 | +python lc.py -u/--submit code_editor/filename |
| 60 | +``` |
| 61 | + |
48 | 62 | ## Features to be added |
49 | 63 |
|
50 | | -1. [ ] code submission |
51 | | -2. [ ] testing the user code |
52 | | -3. [ ] code submission status |
53 | | -4. [ ] code submission result |
54 | | -5. [ ] code submission result details |
55 | | -6. [ ] -h/--help |
| 64 | +1. [x] code submission |
| 65 | +2. [x] testing the user code |
| 66 | +3. [x] code submission status |
| 67 | +4. [x] code submission result |
| 68 | +5. [x] code submission result details |
| 69 | +6. [x] -h/--help |
56 | 70 | 7. [ ] color theme |
| 71 | +8. [x] fixed python-leetcode lib issue |
| 72 | +9. [x] add support for other languages except python2 |
| 73 | + |
0 commit comments