Added a script to compile the assets

This commit is contained in:
Nicholas Novak 2023-04-09 23:08:47 -07:00
parent 082491c168
commit 11cf183839

23
compile_assets.py Executable file
View File

@ -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",
]
)