Tools: Scripts for other formats
jaames opened this issue · comments
I am planning on adding more scripts for working with the various formats you can find in a Playdate game:
- pdv converter - convert gif sequences to and from the pdv video format
- pdi/pdt converter - convert images to and from the pdi/pdt image format
- pda converter - convert audio to and from the pda format
- pdz packing support - add the ability to repack files into a pdz to pdz.py
If anyone would like to help so this gets done faster, that would be appreciated!
I've started working on this. So far just a pdi to png or gif convertor that can optionally display the image on the console. It's incredibly crude right now, but I do hope to expand and polish it. I'm open to making it part of your excellent project (without which, my tool would not exist!), but maybe not yet as it's crude.
https://gitlab.com/AlanDeSmet/playdate-conversion
@AlanDeSmet Nice, looks good so far!
For the scripts in this project, my goal was to keep things small and functionally minimal so people could easily digest the code and build their own stuff from it. On that end I wouldn't worry about extreme polish too much - that effort is probably better focused on making the code clear and hackable. Open to ideas though!
It now supports pdt and and pdv files! I'm going to keep it off on its own for now, as I'm experimenting with organization and decidedly non-trivial redesigns (hopefully toward simplicity), are likely. Your comment made me reconsider my design, and I'm thinking of refactoring toward a much simpler core (useful for understanding and reuse) with the heavier tool built on top (which is what I want).
Once it's shaken out a bit more, I'll add it to my fork of your repo and send a pull request.
Great, I look forward to seeing that!
The pdz.py script already in this repo is a good example of what I had in mind - it's simple-ish (could perhaps be better) to follow, you can consume it as a module to read a pdz file in your own code, or you can run it as a script to dump a pdz's contents out to a directory. Though my Python is pretty rusty, so there may be better ways to accomplish this :)
Also I'm not sure how much experience you have with audio stuff, but dealing with ADPCM as used by the pda format can be a bit trippy if you haven't come across it before, I'd be happy to handle that unless you want to tackle it