ofb/compile_assets.py

24 lines
633 B
Python
Raw Permalink Normal View History

2023-04-09 23:08:47 -07:00
#!/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",
]
)