Skip to content

Commit 089cd18

Browse files
committed
- Add difficulty
- Add color for difficulty in excel - Query more Neetcode videos and update video dictionary
1 parent f0252e6 commit 089cd18

File tree

11 files changed

+3275
-294
lines changed

11 files changed

+3275
-294
lines changed

.DS_Store

8 KB
Binary file not shown.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.2.2
4+
- Add difficulty
5+
- Add color for difficulty in excel
6+
- Query more Neetcode videos and update video dictionary
7+
38
## 1.2.1
49
- Fixed issue with Neetcode titles including semicolons, resulting in ill-formatted Anki cards
510

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ When generating an Excel output, the resulting questions are saved in an `.xlsx`
7777
- [X] Use TQDM to show card generation progress
7878
- [X] Add support for exporting to an excel sheet
7979
- [X] Add support for showing neetcode solutions on the back of the card as a
80-
- [ ] Add support for getting the difficulty of questions
80+
- [X] Add support for getting the difficulty of questions
8181
- [ ] Add support for fetching premium questions via authentification
8282
- [ ] Add support for importing cards into Quizlet
8383
- [ ] Add support for fetching questions by topic or tag

leetcode_study_tool/formatters.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ def format_anki(url: str, slug: str, data: dict):
9090
if data["tags"]:
9191
problem += format_list_element("Tags", [tag["name"] for tag in data["tags"]])
9292

93+
if data["difficulty"]:
94+
problem += "<strong>Difficulty:</strong><br>"
95+
problem += f"<p>{data['difficulty']}</p>"
96+
9397
problem += ";"
9498

9599
if str(data["id"]) in LEETCODE_TO_NEETCODE:
@@ -161,6 +165,7 @@ def format_excel(url: str, slug: str, data: dict) -> List[Union[str, date]]:
161165
row = []
162166
row.append(data["id"])
163167
row.append(data["title"])
168+
row.append(data["difficulty"])
164169
row.append(get_url(url))
165170
row.append(date.today())
166171
row.append(", ".join([tag["name"] for tag in data["tags"]]))

0 commit comments

Comments
 (0)