diff --git a/pack/resources/resourcepack/required/modfest-assets/assets/minecraft/texts/credits.json b/pack/resources/resourcepack/required/modfest-assets/assets/minecraft/texts/credits.json new file mode 100644 index 0000000..9f3d744 --- /dev/null +++ b/pack/resources/resourcepack/required/modfest-assets/assets/minecraft/texts/credits.json @@ -0,0 +1,684 @@ +[ + { + "section": "ModFest Participants", + "disciplines": [ + { + "discipline": "Unstable Timepiece", + "titles": [ + { + "title": "author", + "names": [ + "chai" + ] + } + ] + }, + { + "discipline": "Legacy Landscape", + "titles": [ + { + "title": "author", + "names": [ + "sylv" + ] + } + ] + }, + { + "discipline": "Everwinter", + "titles": [ + { + "title": "author", + "names": [ + "thefluffycart55" + ] + } + ] + }, + { + "discipline": "Chronoception", + "titles": [ + { + "title": "author", + "names": [ + "chromonym" + ] + } + ] + }, + { + "discipline": "MoreTraps", + "titles": [ + { + "title": "author", + "names": [ + "notryken" + ] + } + ] + }, + { + "discipline": "Gastroarchaeology", + "titles": [ + { + "title": "author", + "names": [ + "nateplays95", + "a11v1r15" + ] + } + ] + }, + { + "discipline": "Past-el Palettes", + "titles": [ + { + "title": "author", + "names": [ + "mynamesraph" + ] + } + ] + }, + { + "discipline": "Chickensaurs", + "titles": [ + { + "title": "author", + "names": [ + "hyperpigeon", + "lumiscosity" + ] + } + ] + }, + { + "discipline": "Tanglr", + "titles": [ + { + "title": "author", + "names": [ + "theepicblock" + ] + } + ] + }, + { + "discipline": "SuperMod", + "titles": [ + { + "title": "author", + "names": [ + "tomate0613" + ] + } + ] + }, + { + "discipline": "Temporang", + "titles": [ + { + "title": "author", + "names": [ + "doublepi" + ] + } + ] + }, + { + "discipline": "FOUP", + "titles": [ + { + "title": "author", + "names": [ + "xfacthd" + ] + } + ] + }, + { + "discipline": "Charta", + "titles": [ + { + "title": "author", + "names": [ + "d4rkness_king" + ] + } + ] + }, + { + "discipline": "Nyctography", + "titles": [ + { + "title": "author", + "names": [ + "darkhax" + ] + } + ] + }, + { + "discipline": "The Arcane path of Chemistry", + "titles": [ + { + "title": "author", + "names": [ + "zuperz" + ] + } + ] + }, + { + "discipline": "Buildcraft-Legacy", + "titles": [ + { + "title": "author", + "names": [ + "thepigcat76" + ] + } + ] + }, + { + "discipline": "Glow Sheep", + "titles": [ + { + "title": "author", + "names": [ + "mclegoman" + ] + } + ] + }, + { + "discipline": "Mecha Soldier PLASTAR", + "titles": [ + { + "title": "author", + "names": [ + "pug", + "khazoda", + "lemmaeof", + "snakefangox", + "kneelawk", + "mattidragon" + ] + } + ] + }, + { + "discipline": "Dissolution", + "titles": [ + { + "title": "author", + "names": [ + "leo60228" + ] + } + ] + }, + { + "discipline": "Crimes Against the JVM", + "titles": [ + { + "title": "author", + "names": [ + "prismatic" + ] + } + ] + }, + { + "discipline": "Shrink Ray", + "titles": [ + { + "title": "author", + "names": [ + "theblindbandit6" + ] + } + ] + }, + { + "discipline": "Dated Draughts", + "titles": [ + { + "title": "author", + "names": [ + "ssblur" + ] + } + ] + }, + { + "discipline": "Glowbrick's Printing Press Mod", + "titles": [ + { + "title": "author", + "names": [ + "krysawyr", + "bitflare", + "azinx" + ] + } + ] + }, + { + "discipline": "Spleef Toys", + "titles": [ + { + "title": "author", + "names": [ + "chai" + ] + } + ] + }, + { + "discipline": "Interstellar", + "titles": [ + { + "title": "author", + "names": [] + } + ] + }, + { + "discipline": "Paper Pyrotechnics", + "titles": [ + { + "title": "author", + "names": [ + "sisby_folk" + ] + } + ] + }, + { + "discipline": "Rewind Watch", + "titles": [ + { + "title": "author", + "names": [ + "gaming32" + ] + } + ] + }, + { + "discipline": "HyphaPiracea", + "titles": [ + { + "title": "author", + "names": [ + "phanastrae" + ] + } + ] + }, + { + "discipline": "Magisterium", + "titles": [ + { + "title": "author", + "names": [ + "reoseah" + ] + } + ] + }, + { + "discipline": "Days Gone By", + "titles": [ + { + "title": "author", + "names": [ + "prismatic" + ] + } + ] + }, + { + "discipline": "Pocketwatchery", + "titles": [ + { + "title": "author", + "names": [ + "afamiliarquiet", + "hexvolt" + ] + } + ] + }, + { + "discipline": "Amy's Industrious Mod", + "titles": [ + { + "title": "author", + "names": [ + "applebax", + "chai" + ] + } + ] + }, + { + "discipline": "FBombs", + "titles": [ + { + "title": "author", + "names": [ + "chai", + "milkyfur", + "shirojr", + "lufurrius" + ] + } + ] + }, + { + "discipline": "Life in a Bubble", + "titles": [ + { + "title": "author", + "names": [] + } + ] + }, + { + "discipline": "SakuraCake", + "titles": [ + { + "title": "author", + "names": [ + "awakened_redstone" + ] + } + ] + }, + { + "discipline": "Kill Youkai With Knives", + "titles": [ + { + "title": "author", + "names": [ + "pug" + ] + } + ] + }, + { + "discipline": "Wandering Rana", + "titles": [ + { + "title": "author", + "names": [ + "ultrusbot" + ] + } + ] + }, + { + "discipline": "Mystcraft: Ageless", + "titles": [ + { + "title": "author", + "names": [ + "mynamesraph" + ] + } + ] + }, + { + "discipline": "Rods from God", + "titles": [ + { + "title": "author", + "names": [ + "skynotthelimit" + ] + } + ] + }, + { + "discipline": "familiar magic", + "titles": [ + { + "title": "author", + "names": [ + "afamiliarquiet" + ] + } + ] + }, + { + "discipline": "Parachymistry", + "titles": [ + { + "title": "author", + "names": [ + "sneakedy", + "byantine08", + "tuffetspider", + "devmc", + "auzdin" + ] + } + ] + }, + { + "discipline": "5 Hour Energy", + "titles": [ + { + "title": "author", + "names": [ + "pug" + ] + } + ] + }, + { + "discipline": "Minecon Ruins", + "titles": [ + { + "title": "author", + "names": [ + "chai" + ] + } + ] + }, + { + "discipline": "ModernUtils", + "titles": [ + { + "title": "author", + "names": [ + "roboxgamer" + ] + } + ] + }, + { + "discipline": "CyberNinja", + "titles": [ + { + "title": "author", + "names": [ + "ckenja", + "baguchi" + ] + } + ] + }, + { + "discipline": "Skycat's Lucky Blocks", + "titles": [ + { + "title": "author", + "names": [ + "skycatminepokie" + ] + } + ] + }, + { + "discipline": "Minimal-Exchange", + "titles": [ + { + "title": "author", + "names": [ + "thepigcat76" + ] + } + ] + }, + { + "discipline": "Timewarp", + "titles": [ + { + "title": "author", + "names": [ + "dooji" + ] + } + ] + }, + { + "discipline": "CraftSense", + "titles": [ + { + "title": "author", + "names": [ + "dooji" + ] + } + ] + }, + { + "discipline": "Armistice: the Peace Engines", + "titles": [ + { + "title": "author", + "names": [ + "divineinversion", + "lgmrszd", + "superkat32", + "callmeecho", + "trudle", + "hamaindustries", + "nulb", + "virtualilith", + "worldwidepixel" + ] + } + ] + }, + { + "discipline": "Shattered Stopwatch", + "titles": [ + { + "title": "author", + "names": [ + "sisby_folk" + ] + } + ] + }, + { + "discipline": "Colourful Clocks", + "titles": [ + { + "title": "author", + "names": [ + "chefmooon" + ] + } + ] + }, + { + "discipline": "Future Things", + "titles": [ + { + "title": "author", + "names": [ + "twins730" + ] + } + ] + }, + { + "discipline": "MineFactorial", + "titles": [ + { + "title": "author", + "names": [ + "emmathemartian" + ] + } + ] + }, + { + "discipline": "Unearth", + "titles": [ + { + "title": "author", + "names": [ + "ira_the_56", + "squishy_com", + "itsmecryptic", + "artificial_fever" + ] + } + ] + }, + { + "discipline": "Kinetic Weaponry", + "titles": [ + { + "title": "author", + "names": [ + "myriantics" + ] + } + ] + }, + { + "discipline": "R\u00f6hrchen", + "titles": [ + { + "title": "author", + "names": [ + "sammy" + ] + } + ] + }, + { + "discipline": "Just Another Witchery Remake", + "titles": [ + { + "title": "author", + "names": [ + "anatevka", + "mrsterner", + "techtastic" + ] + } + ] + }, + { + "discipline": "Life-Size Bdubs", + "titles": [ + { + "title": "author", + "names": [ + "superkat32" + ] + } + ] + } + ] + } +] diff --git a/scripts/e.py b/scripts/e.py new file mode 100755 index 0000000..d2efb12 --- /dev/null +++ b/scripts/e.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python3 +import json +import os +import shutil +import subprocess +import sys +import tempfile +import tomllib +import urllib.request +from pathlib import Path + +import common +from assemble_packwiz import SubmissionLockfileFormat +from common import Ansi + + +def main(): + modrinth_api = "https://api.modrinth.com/v2" + repo_root = common.get_repo_root() + constants_file = repo_root / "constants.jsonc" + submissions_file = repo_root / "submissions.json" + submission_lock_file = repo_root / "submissions-lock.json" + packwiz_pack_toml = repo_root / "pack" / "pack.toml" + packwiz = common.check_packwiz() + + common.fix_packwiz_pack(packwiz_pack_toml) + + constants = common.jsonc_at_home(common.read_file(constants_file)) + + # Download the json + event_name = constants["event"] + if event_name == None: + print(f"{Ansi.WARN}No event name defined. Treating it as if there were zero submissions{Ansi.RESET}") + print(f"Was this unintentional? Check {constants_file.relative_to(repo_root)} and make sure it defines \"event\"") + submission_data = [] + else: + submissions_url = f"https://platform.modfest.net/event/{event_name}/submissions" + with urllib.request.urlopen(submissions_url) as submissions: + submission_data = json.load(submissions) + + credits = [] + for s in submission_data: + credits.append({ + "discipline": s["name"], + "titles": [ + { + "title": "author", + "names": s["authors"] + } + ] + }) + print(json.dumps(credits)) + +if __name__ == "__main__": + main()