From f0029a24d9ed0c371c7993a09515a895a68c2602 Mon Sep 17 00:00:00 2001 From: Antonio Vivace Date: Tue, 7 May 2024 21:14:52 +0200 Subject: [PATCH] entries: fix slug for gbamicrojam23 --- .../{gbamicrojam => gbamicrojam23}/+x0pM_.png | Bin .../{gbamicrojam => gbamicrojam23}/OUQgtM.png | Bin .../{gbamicrojam => gbamicrojam23}/TvW4CW.png | Bin .../{gbamicrojam => gbamicrojam23}/VM2sR.png | Bin .../{gbamicrojam => gbamicrojam23}/eCE3My.png | Bin .../{gbamicrojam => gbamicrojam23}/etn_4_.png | Bin .../{gbamicrojam => gbamicrojam23}/game.json | 0 .../licenses/agbabi.txt | 0 .../licenses/butano.txt | 0 .../licenses/crt0.s.txt | 0 .../licenses/ctti.txt | 0 .../licenses/cult-of-gba-bios.txt | 0 .../licenses/etl.txt | 0 .../licenses/gba-link-connection.txt | 0 .../licenses/gba-modern.txt | 0 .../licenses/gbt-player.txt | 0 .../licenses/libtonc.txt | 0 .../licenses/maxmod.txt | 0 .../licenses/posprintf.txt | 0 .../licenses/ugba.txt | 0 .../microjam23.gba | Bin scripts/1_typetag.py | 27 ++++++++++++++++++ 22 files changed, 27 insertions(+) rename entries/{gbamicrojam => gbamicrojam23}/+x0pM_.png (100%) rename entries/{gbamicrojam => gbamicrojam23}/OUQgtM.png (100%) rename entries/{gbamicrojam => gbamicrojam23}/TvW4CW.png (100%) rename entries/{gbamicrojam => gbamicrojam23}/VM2sR.png (100%) rename entries/{gbamicrojam => gbamicrojam23}/eCE3My.png (100%) rename entries/{gbamicrojam => gbamicrojam23}/etn_4_.png (100%) rename entries/{gbamicrojam => gbamicrojam23}/game.json (100%) rename entries/{gbamicrojam => gbamicrojam23}/licenses/agbabi.txt (100%) rename entries/{gbamicrojam => gbamicrojam23}/licenses/butano.txt (100%) rename entries/{gbamicrojam => gbamicrojam23}/licenses/crt0.s.txt (100%) rename entries/{gbamicrojam => gbamicrojam23}/licenses/ctti.txt (100%) rename entries/{gbamicrojam => gbamicrojam23}/licenses/cult-of-gba-bios.txt (100%) rename entries/{gbamicrojam => gbamicrojam23}/licenses/etl.txt (100%) rename entries/{gbamicrojam => gbamicrojam23}/licenses/gba-link-connection.txt (100%) rename entries/{gbamicrojam => gbamicrojam23}/licenses/gba-modern.txt (100%) rename entries/{gbamicrojam => gbamicrojam23}/licenses/gbt-player.txt (100%) rename entries/{gbamicrojam => gbamicrojam23}/licenses/libtonc.txt (100%) rename entries/{gbamicrojam => gbamicrojam23}/licenses/maxmod.txt (100%) rename entries/{gbamicrojam => gbamicrojam23}/licenses/posprintf.txt (100%) rename entries/{gbamicrojam => gbamicrojam23}/licenses/ugba.txt (100%) rename entries/{gbamicrojam => gbamicrojam23}/microjam23.gba (100%) create mode 100644 scripts/1_typetag.py diff --git a/entries/gbamicrojam/+x0pM_.png b/entries/gbamicrojam23/+x0pM_.png similarity index 100% rename from entries/gbamicrojam/+x0pM_.png rename to entries/gbamicrojam23/+x0pM_.png diff --git a/entries/gbamicrojam/OUQgtM.png b/entries/gbamicrojam23/OUQgtM.png similarity index 100% rename from entries/gbamicrojam/OUQgtM.png rename to entries/gbamicrojam23/OUQgtM.png diff --git a/entries/gbamicrojam/TvW4CW.png b/entries/gbamicrojam23/TvW4CW.png similarity index 100% rename from entries/gbamicrojam/TvW4CW.png rename to entries/gbamicrojam23/TvW4CW.png diff --git a/entries/gbamicrojam/VM2sR.png b/entries/gbamicrojam23/VM2sR.png similarity index 100% rename from entries/gbamicrojam/VM2sR.png rename to entries/gbamicrojam23/VM2sR.png diff --git a/entries/gbamicrojam/eCE3My.png b/entries/gbamicrojam23/eCE3My.png similarity index 100% rename from entries/gbamicrojam/eCE3My.png rename to entries/gbamicrojam23/eCE3My.png diff --git a/entries/gbamicrojam/etn_4_.png b/entries/gbamicrojam23/etn_4_.png similarity index 100% rename from entries/gbamicrojam/etn_4_.png rename to entries/gbamicrojam23/etn_4_.png diff --git a/entries/gbamicrojam/game.json b/entries/gbamicrojam23/game.json similarity index 100% rename from entries/gbamicrojam/game.json rename to entries/gbamicrojam23/game.json diff --git a/entries/gbamicrojam/licenses/agbabi.txt b/entries/gbamicrojam23/licenses/agbabi.txt similarity index 100% rename from entries/gbamicrojam/licenses/agbabi.txt rename to entries/gbamicrojam23/licenses/agbabi.txt diff --git a/entries/gbamicrojam/licenses/butano.txt b/entries/gbamicrojam23/licenses/butano.txt similarity index 100% rename from entries/gbamicrojam/licenses/butano.txt rename to entries/gbamicrojam23/licenses/butano.txt diff --git a/entries/gbamicrojam/licenses/crt0.s.txt b/entries/gbamicrojam23/licenses/crt0.s.txt similarity index 100% rename from entries/gbamicrojam/licenses/crt0.s.txt rename to entries/gbamicrojam23/licenses/crt0.s.txt diff --git a/entries/gbamicrojam/licenses/ctti.txt b/entries/gbamicrojam23/licenses/ctti.txt similarity index 100% rename from entries/gbamicrojam/licenses/ctti.txt rename to entries/gbamicrojam23/licenses/ctti.txt diff --git a/entries/gbamicrojam/licenses/cult-of-gba-bios.txt b/entries/gbamicrojam23/licenses/cult-of-gba-bios.txt similarity index 100% rename from entries/gbamicrojam/licenses/cult-of-gba-bios.txt rename to entries/gbamicrojam23/licenses/cult-of-gba-bios.txt diff --git a/entries/gbamicrojam/licenses/etl.txt b/entries/gbamicrojam23/licenses/etl.txt similarity index 100% rename from entries/gbamicrojam/licenses/etl.txt rename to entries/gbamicrojam23/licenses/etl.txt diff --git a/entries/gbamicrojam/licenses/gba-link-connection.txt b/entries/gbamicrojam23/licenses/gba-link-connection.txt similarity index 100% rename from entries/gbamicrojam/licenses/gba-link-connection.txt rename to entries/gbamicrojam23/licenses/gba-link-connection.txt diff --git a/entries/gbamicrojam/licenses/gba-modern.txt b/entries/gbamicrojam23/licenses/gba-modern.txt similarity index 100% rename from entries/gbamicrojam/licenses/gba-modern.txt rename to entries/gbamicrojam23/licenses/gba-modern.txt diff --git a/entries/gbamicrojam/licenses/gbt-player.txt b/entries/gbamicrojam23/licenses/gbt-player.txt similarity index 100% rename from entries/gbamicrojam/licenses/gbt-player.txt rename to entries/gbamicrojam23/licenses/gbt-player.txt diff --git a/entries/gbamicrojam/licenses/libtonc.txt b/entries/gbamicrojam23/licenses/libtonc.txt similarity index 100% rename from entries/gbamicrojam/licenses/libtonc.txt rename to entries/gbamicrojam23/licenses/libtonc.txt diff --git a/entries/gbamicrojam/licenses/maxmod.txt b/entries/gbamicrojam23/licenses/maxmod.txt similarity index 100% rename from entries/gbamicrojam/licenses/maxmod.txt rename to entries/gbamicrojam23/licenses/maxmod.txt diff --git a/entries/gbamicrojam/licenses/posprintf.txt b/entries/gbamicrojam23/licenses/posprintf.txt similarity index 100% rename from entries/gbamicrojam/licenses/posprintf.txt rename to entries/gbamicrojam23/licenses/posprintf.txt diff --git a/entries/gbamicrojam/licenses/ugba.txt b/entries/gbamicrojam23/licenses/ugba.txt similarity index 100% rename from entries/gbamicrojam/licenses/ugba.txt rename to entries/gbamicrojam23/licenses/ugba.txt diff --git a/entries/gbamicrojam/microjam23.gba b/entries/gbamicrojam23/microjam23.gba similarity index 100% rename from entries/gbamicrojam/microjam23.gba rename to entries/gbamicrojam23/microjam23.gba diff --git a/scripts/1_typetag.py b/scripts/1_typetag.py new file mode 100644 index 0000000..85b8a4c --- /dev/null +++ b/scripts/1_typetag.py @@ -0,0 +1,27 @@ +""" +Change entries with "homebrew" as typetag to "tool" +""" + +import json +import os + +entries_list = os.listdir("../entries") +mock = False + +for entry in entries_list: + with open(f"../entries/{entry}/game.json", "r+") as f: + changes = False + manifest = json.load(f) + + if "typetag" in manifest: + if manifest["typetag"] == "homebrew": + manifest["typetag"] = "tool" + print(manifest["slug"], "HOMEBREW -> TOOL") + changes = True + else: + print(manifest["slug"], "No typetag") + print(manifest) + if not mock and changes is True: + f.seek(0) # <--- should reset file position to the beginning. + json.dump(manifest, f, indent=4, ensure_ascii=False) + f.truncate() # remove remaining part