Set up ability to run commands from the terminal

This commit is contained in:
Andrew Miner
2025-10-06 20:57:46 -06:00
parent a8b6e6b15e
commit 4637137152
18 changed files with 231 additions and 49 deletions
@@ -0,0 +1,35 @@
from tungston.interface.runner import Runner as BaseRunner
from tungston.core.world import World
from tungston.modpack.mysteriousisland.biomecatalog import CATALOG as biomes
from tungston.modpack.mysteriousisland.depositcatalog import CATALOG as deposits
from tungston.modpack.mysteriousisland.mineralcatalog import CATALOG as minerals
from tungston.modpack.mysteriousisland.mobcatalog import CATALOG as mobs
from tungston.generator.markdown.reportwriter import ReportWriter
from tungston.generator.markdown.biomereport import BiomeReport
from tungston.generator.markdown.mineralreport import MineralReport
import sys
# Constants ########################################################################################
REPORT_PATH = "./output/markdown/mysteriousisland"
# Class ############################################################################################
class Runner(BaseRunner):
def _command_writeReports(self):
writer = ReportWriter([
BiomeReport(self.world),
MineralReport(self.world)
])
writer.write(REPORT_PATH)
# Script ###########################################################################################
if __name__ == "__main__":
Runner(World(biomes, deposits, minerals, mobs)).run(sys.argv)