
Aseprite Export Script
A simple script to export aseprite files
I like using aseprite to create simple pixel art for games and various projects but having to export each time you make a change to the aseprite file gets boring quickly.
Luckily aseprite comes with a nice workable commandline that can be used to export your sprites automatically (via watchexec or nodemon) or via a single command after chagning your sprites and pressing ctrl+s
Heres the script i made for my needs
#!/bin/bash
# Exports each layer as a seperate png named by layer namefunction layerAse2png { aseprite -b --split-layers sprites/$1.aseprite --save-as public/assets/$1-{layer}.png}
# Exports all layers to a single pngfunction ase2png { aseprite -b sprites/$1.aseprite --save-as public/assets/$1.png}ase2png dice-bgase2png number-baselayerAse2png diceslayerAse2png end-texts
Works perfectly fine maybe i will make some github action to automate it on every commit where the assets change or something. If anyone knows how to do this in the libresprite cli or even better combine them both feel free to comment it here personally couldnt get libresprite to work with the cli.