From 11cf18383973b42f56a03547d3771c838e3f80d3 Mon Sep 17 00:00:00 2001 From: Nicholas Novak <34256932+NickyBoy89@users.noreply.github.com> Date: Sun, 9 Apr 2023 23:08:47 -0700 Subject: [PATCH] Added a script to compile the assets --- compile_assets.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 compile_assets.py diff --git a/compile_assets.py b/compile_assets.py new file mode 100755 index 0000000..9e2b72f --- /dev/null +++ b/compile_assets.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 + +import os +import subprocess + +asset_path = "Assets/ofb-assets" + +for root, dirs, files in os.walk(asset_path): + for file in files: + if file.endswith("aseprite"): + new_file = file.rstrip("aseprite") + "png" + print(f"Compiling {root}/{file} to {root}/{new_file}") + subprocess.run( + [ + "aseprite", + f"{root}/{file}", + "-b", + "--sheet", + f"{root}/{new_file}", + "--sheet-type", + "horizontal", + ] + )