Skip to content

Commit ceb5824

Browse files
committed
- add emoji horde survival to games.json, add absolutely horrible screenshot and add it to the sidebar
1 parent eabfd74 commit ceb5824

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

data/games.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
},
6868
{
6969
"id": "animals",
70-
"title": "Catching Game for Cats 🐱",
70+
"title": "Catching Game for Cats \ud83d\udc31",
7171
"description": "A fun game for cats where they have to catch the moving objects!",
7272
"url": "games/animals.html",
7373
"screenshot": "screenshots/screenshot_4.png",
@@ -504,5 +504,16 @@
504504
"aiPowered": true,
505505
"featured": true,
506506
"date": "2025-03-02"
507+
},
508+
{
509+
"id": "emoji_horde_survival",
510+
"title": "Emoji Horde Survival",
511+
"description": "Survive emoji hordes, collect power-ups, unleash synergistic abilities.",
512+
"url": "games/emoji_horde_survival.html",
513+
"screenshot": "screenshots/screenshot_166.png",
514+
"type": "game",
515+
"aiPowered": false,
516+
"featured": true,
517+
"date": "2025-04-03"
507518
}
508519
]

screenshots/screenshot_166.png

13.7 KB
Loading

sidebar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ <h2>Tools by ChatGPT</h2>
251251
<li><a href="/tools/web_accessibility_checker.html">Web Accessibility Checker</a></li>
252252
<li><a href="/tools/cron_expression_builder.html">Cron Expression Builder</a></li>
253253
<li><a href="/tools/markdown_table_generator.html">Markdown Table Generator</a></li>
254+
<li><a href="/games/emoji_horde_survival.html">Emoji Horde Survival</a></li>
254255
<!-- end -->
255256
</ul>
256257
</div>

util/new_entry.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,16 @@ def take_screenshot(driver, url, screenshot_file):
152152
if __name__ == "__main__":
153153
base_dir = get_base_dir()
154154

155-
# Get the latest added file from git
156-
latest_file = get_latest_git_added_file("tools", base_dir) or get_latest_git_added_file("games", base_dir)
155+
# Ask the user what type of entry they're adding
156+
entry_type = ""
157+
while entry_type not in ["tool", "game"]:
158+
entry_type = input("Are you adding a tool or a game? (tool/game): ").lower()
159+
if entry_type not in ["tool", "game"]:
160+
print("Please enter either 'tool' or 'game'.")
161+
162+
# Get the latest added file from git based on the entry type
163+
directory = "tools" if entry_type == "tool" else "games"
164+
latest_file = get_latest_git_added_file(directory, base_dir)
157165

158166
if latest_file:
159167
file_path = latest_file
@@ -174,7 +182,8 @@ def take_screenshot(driver, url, screenshot_file):
174182
if confirm != "yes":
175183
entry_name = input("Enter the tool/game name: ")
176184
else:
177-
file_path = input("Enter the file path: ")
185+
print(f"No recently added file found in the {directory} directory.")
186+
file_path = input(f"Enter the {entry_type} file path: ")
178187
full_path = base_dir / file_path
179188

180189
# Try to extract name from HTML title
@@ -184,15 +193,12 @@ def take_screenshot(driver, url, screenshot_file):
184193
print(f"Found title in HTML: {entry_name}")
185194
confirm = input(f"Use '{entry_name}' as the name? (yes/no): ").lower()
186195
if confirm != "yes":
187-
entry_name = input("Enter the tool/game name: ")
196+
entry_name = input(f"Enter the {entry_type} name: ")
188197
else:
189-
entry_name = input("Enter the tool/game name: ")
198+
entry_name = input(f"Enter the {entry_type} name: ")
190199

191200
description = input("Enter the description: ")
192201

193-
# Determine if it's a tool or game based on the file path
194-
entry_type = "tool" if "tools" in file_path.lower() else "game"
195-
196202
# Ask for additional JSON fields
197203
ai_powered = input("Is this AI powered? (yes/no): ").lower() == "yes"
198204
featured = input("Should this be featured? (yes/no): ").lower() == "yes"

0 commit comments

Comments
 (0)