Skip to content

Commit f28f96d

Browse files
committed
Ps
1 parent 1ae02c3 commit f28f96d

File tree

5 files changed

+42
-11
lines changed

5 files changed

+42
-11
lines changed
File renamed without changes.

Leetcode/.gitkeep

Whitespace-only changes.
File renamed without changes.

README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@ Additionally, consider sharing it with the community using the badges below.
7272

7373
<br>
7474

75-
| Status | Goal | Progress Report | ETA |
76-
|:------: |:------------------------------------------------------: |:---------------: |:--------------: |
77-
| 🚧 | Create Indexes for Each Difficulty Level | `in progress` | 📅 13/01/2024 |
78-
| 📅 | Create a Template for each Challenge README.md | `scheduled` | 📅 19/01/2024 |
79-
| ✔️ | Create Links for Each Challenge Folder under Index. | `ready` | 📅 11/01/2024 |
80-
| 📅 | Automate the tracking process. | `scheduled` | 📅 03/02/2024 |
81-
| 🚧 | Fix the Share Buttons | `in progress` | 📅 14/01/2024 |
75+
| Status | Goal | Progress Report | ETA |
76+
|:------: |:----------------------------------------------------------------: |:---------------: |:--------------: |
77+
| 🚧 | Create Indexes for Each Difficulty Level | `in progress` | 📅 13/01/2024 |
78+
| 📅 | Create a Template for each Challenge README.md | `scheduled` | 📅 19/01/2024 |
79+
| | Create Template for initiating a README.md & empty solution.py. | `in progress` | 📅 13/01/2024 |
80+
| ✔️ | Create Links for Each Challenge Folder under Index. | `ready` | 📅 11/01/2024 |
81+
| 📅 | Automate the tracking process. | `scheduled` | 📅 03/02/2024 |
82+
| 🚧 | Fix the Share Buttons | `in progress` | 📅 14/01/2024 |
8283

8384
## Lessons Learned
8485

helper.py

+34-4
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,40 @@ def get_immediate_subdirectories(a_dir):
55
return [name for name in os.listdir(a_dir)
66
if os.path.isdir(os.path.join(a_dir, name))]
77

8+
9+
# Repository Directory
10+
811
current_d = dirname(abspath(__file__))
12+
13+
# Platforms
914
Codewars = current_d + '\Codewars'
15+
HackerRank = current_d + '\HackerRank'
16+
Exercism = current_d + '\Exercism'
17+
Leetcode = current_d + '\Leetcode'
18+
19+
# Platform Index Location
1020
Codewars_README = os.path.normpath(Codewars + '\README.md')
21+
HackerRank_README = os.path.normpath(HackerRank + '\README.md')
22+
Exercism_README = os.path.normpath(Exercism + '\README.md')
23+
Leetcode_README = os.path.normpath(Leetcode + '\README.md')
1124

25+
# Delete Every Platform Index before Reindexing
1226
open(Codewars_README, 'w').close()
27+
open(HackerRank_README, 'w').close()
28+
open(Exercism_README, 'w').close()
29+
open(Leetcode_README, 'w').close()
30+
31+
# Codewars
1332

33+
# for each difficulty level
1434
for x in get_immediate_subdirectories(os.path.normpath(Codewars)):
15-
challenges = get_immediate_subdirectories(os.path.normpath(Codewars + '\\' + x))
1635

36+
# Each difficulty README
37+
Difficulty_README = os.path.normpath(Codewars + '\\' + x + '\\README.md')
38+
39+
# Each difficulty's challenges
40+
challenges = get_immediate_subdirectories(os.path.normpath(Codewars + '\\' + x))
41+
1742
with open(Codewars_README, "a", encoding="utf-8") as f:
1843
f.write("\n")
1944
f.write("## " + str(x))
@@ -28,12 +53,17 @@ def get_immediate_subdirectories(a_dir):
2853
f.write("\n")
2954
f.close()
3055

31-
# Add Links to Folders for Each Challenges
32-
# Test spaces between the Challenges
56+
with open(Difficulty_README, "a", encoding="utf-8") as ff:
57+
ff.write("\n")
58+
ff.write("- [" + str(y) + "](https://github.com/gzachariadis/Python.Challenges/tree/main/Codewars/" + x + '/' + str(y).replace(' ', '%20') + ')')
59+
ff.write("\n")
60+
ff.close()
61+
62+
3363
# Add invididual Indexes for Each Level
3464
# Everything should be in Alphabetical Order
3565

3666
# Use Remove first and last character from string under 8-kyu as a Template for every other file.
3767
# Find a way to create a template folder with README.md template and an empty python file each time I want to submit a new challenge.
38-
# Add a To-do Road Map to the README.md
68+
3969

0 commit comments

Comments
 (0)