STY: Adjust spaces / update Markdown TODO

This commit is contained in:
Martin Thoma
2022-03-22 21:37:36 +01:00
parent 66b5297dae
commit 9b90ba6133
2 changed files with 27 additions and 25 deletions

View File

@@ -1,16 +1,16 @@
# TODO list # TODO list
game | csharp | java | javascript | kotlin | lua | perl | python | ruby | rust | vbnet game | C# | Java | JS | Kotlin | Lua | Perl | Python | Ruby | Rust | VB.NET
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- ------------------------------ | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
01_Acey_Ducey | ✅ | ✅ | ✅ | ⬜️ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ 01_Acey_Ducey | ✅ | ✅ | ✅ | ⬜️ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
02_Amazing | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ✅ | ✅ | ✅ 02_Amazing | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ✅ | ✅ | ✅
03_Animal | ✅ | ✅ | ✅ | ✅ | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ⬜️ 03_Animal | ✅ | ✅ | ✅ | ✅ | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ⬜️
04_Awari | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ⬜️ 04_Awari | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ⬜️
05_Bagels | ✅ | ✅ | ✅ | ✅ | ⬜️ | ✅ | ✅ | ✅ | ✅ | ⬜️ 05_Bagels | ✅ | ✅ | ✅ | ✅ | ⬜️ | ✅ | ✅ | ✅ | ✅ | ⬜️
06_Banner | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ✅ 06_Banner | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ✅
07_Basketball | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ 07_Basketball | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | | ⬜️ | ⬜️
08_Batnum | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ 08_Batnum | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ✅
09_Battle | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ 09_Battle | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️
10_Blackjack | ✅ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ⬜️ | ✅ | ⬜️ 10_Blackjack | ✅ | | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ⬜️ | ✅ | ⬜️
11_Bombardment | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ⬜️ 11_Bombardment | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ⬜️
12_Bombs_Away | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ 12_Bombs_Away | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️
13_Bounce | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ 13_Bounce | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️
@@ -19,6 +19,7 @@
16_Bug | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ 16_Bug | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️
17_Bullfight | ✅ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ 17_Bullfight | ✅ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️
18_Bullseye | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ 18_Bullseye | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️
19_Bunny | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ⬜️
20_Buzzword | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ⬜️ 20_Buzzword | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ⬜️
21_Calendar | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ⬜️ 21_Calendar | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ⬜️
22_Change | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ✅ | ⬜️ 22_Change | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ✅ | ⬜️
@@ -36,7 +37,7 @@
34_Digits | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ 34_Digits | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️
35_Even_Wins | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ 35_Even_Wins | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️
36_Flip_Flop | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ 36_Flip_Flop | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️
37_Football | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ | ⬜️ | ⬜️ | ⬜️ | ⬜️ 37_Football | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ | ⬜️ | ⬜️ | ⬜️ | ⬜️
38_Fur_Trader | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ 38_Fur_Trader | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️
39_Golf | ✅ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ 39_Golf | ✅ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️
40_Gomoko | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ 40_Gomoko | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️
@@ -68,7 +69,7 @@
66_Number | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ✅ | ⬜️ 66_Number | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ✅ | ⬜️
67_One_Check | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ 67_One_Check | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️
68_Orbit | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ 68_Orbit | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️
69_Pizza | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ 69_Pizza | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | | ⬜️ | ⬜️
70_Poetry | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ 70_Poetry | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️
71_Poker | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ⬜️ | ⬜️ | ⬜️ | ⬜️ 71_Poker | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ | ⬜️ | ⬜️ | ⬜️ | ⬜️
72_Queen | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ 72_Queen | ⬜️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️
@@ -95,4 +96,3 @@
93_23_Matches | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️ 93_23_Matches | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ⬜️ | ⬜️
94_War | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ✅ | ✅ | ✅ | ✅ | ⬜️ 94_War | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ✅ | ✅ | ✅ | ✅ | ⬜️
95_Weekday | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ✅ | ⬜️ 95_Weekday | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ⬜️ | ✅ | ⬜️
96_Word | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | ✅ | ✅ | ✅ | ⬜️ | ✅

View File

@@ -40,8 +40,8 @@ def get_data(checklist_orig: List[str], root_dir: str = "..") -> List[List[str]]
empty_boxes = ["⬜️" for _ in checklist_orig] empty_boxes = ["⬜️" for _ in checklist_orig]
checklist = empty_boxes[:] checklist = empty_boxes[:]
for dir_name, subdir_list, file_list in os.walk(root_dir):
for dir_name, subdir_list, file_list in sorted(os.walk(root_dir)):
# split_dir[1] is the game # split_dir[1] is the game
# split_dir[2] is the language # split_dir[2] is the language
split_dir = dir_name.split(os.path.sep) split_dir = dir_name.split(os.path.sep)
@@ -49,7 +49,7 @@ def get_data(checklist_orig: List[str], root_dir: str = "..") -> List[List[str]]
if len(split_dir) == 2 and split_dir[1] not in ignore_folders: if len(split_dir) == 2 and split_dir[1] not in ignore_folders:
if prev_game == "": if prev_game == "":
prev_game = split_dir[1] prev_game = split_dir[1]
checklist[0] = split_dir[1] checklist[0] = f"{split_dir[1]:<30}"
if prev_game != split_dir[1]: if prev_game != split_dir[1]:
# it's a new dir # it's a new dir
@@ -75,8 +75,10 @@ def get_data(checklist_orig: List[str], root_dir: str = "..") -> List[List[str]]
def write_file(path: str, languages: List[str], strings_done: List[List[str]]) -> None: def write_file(path: str, languages: List[str], strings_done: List[List[str]]) -> None:
dashes = " | ".join(["---"] * (len(languages) + 1)) dashes_arr = ["---"] * (len(languages) + 1)
write_string = f"# TODO list\n game | {' | '.join(languages)}\n{dashes}\n" dashes_arr[0] = "-" * 30
dashes = " | ".join(dashes_arr)
write_string = f"# TODO list\n {'game':<30}| {' | '.join(languages)}\n{dashes}\n"
sorted_strings = list( sorted_strings = list(
map(lambda l: " | ".join(l) + "\n", sorted(strings_done, key=lambda x: x[0])) map(lambda l: " | ".join(l) + "\n", sorted(strings_done, key=lambda x: x[0]))
) )
@@ -87,17 +89,17 @@ def write_file(path: str, languages: List[str], strings_done: List[List[str]]) -
if __name__ == "__main__": if __name__ == "__main__":
languages = [ languages = {
"csharp", "csharp": "C#",
"java", "java": "Java",
"javascript", "javascript": "JS",
"kotlin", "kotlin": "Kotlin",
"lua", "lua": "Lua",
"perl", "perl": "Perl",
"python", "python": "Python",
"ruby", "ruby": "Ruby",
"rust", "rust": "Rust",
"vbnet", "vbnet": "VB.NET",
] }
strings_done = get_data(["game"] + languages[:]) strings_done = get_data(["game"] + list(languages.keys()))
write_file("TODO.md", languages, strings_done) write_file("TODO.md", list(languages.values()), strings_done)