I was wondering if there were any thoughts about implementing a scripting file format that would allow one to automate tasks on gm9, if not, maybe that could be added to the list of long term enhancements ?
Unsure, will be left open for now
if it's not too hard to add, it could be nice to automate tasks that get repetitive. and for those who like Decrypt9WIP's menus but want to use GodMode9 since it's more updated or anything. some possible ideas are:
# copy file to another location
cp 1:/private/movable.sed 0:/gm9out/movable.sed
# copy file and generate .sha with it, and give it a different name
cp_hash S:/nand_minsize.bin 0:/gm9out/nand_backup.bin
# ... or do a safe restore
safe_restore 0:/gm9out/nand_backup.bin
# ... or verify hash and do a full restore
verify 0:/gm9out/nand_backup.bin # stop executing if it fails?
cp 0:/gm9out/nand_backup.bin
# mount and copy individual partitions from a nand backup
mount 0:/gm9out/nand_backup.bin
cp I:/twln.bin S:/twln.bin
cp I:/agbsave.bin S:/agbsave.bin
unmount # there's only one thing mounted at a time so an argument isn't needed
# mount and dump eShop tickets
mount 1:/dbs/ticket.db
cp T:/eshop 0:/gm9out
unmount
I would use this. Since some NAND files don't have virtual links (like friendsave.bin on D9) I could just write a script to dump it. I'm going to be experimenting with a manual system transfer using godmode9 tomorrow and being able to write an export and import script would be amazing some time in the future.
I would recommend that scripts in a certain folder provided they have the appropriate extension (i.e. SD:/Files9/scripts/.s9 or SD:/Scripts9/.s9) appear under an option in the home button menu.
if/else/elseif/and/or statements would be helpful too
this would be really useful, and if you selected a script, you'd be given a prompt asking if you want to run it.
Everyone, take a look here. Trying your hand at some scripts of your own is recommended and encouraged. Also, give me feedback.
thanks @d0k3, it's good to know someone's working on it and that it probably will be a thing in a stable release. like seriously, if we get scripts with wide ranges of capabilities, we could just enter GM9, run a script, wait for it to finish the task and then exit. godmode9 will become half godspeed9 or something like that.
Implemented in https://github.com/d0k3/GodMode9/commit/78d9f1747a56aae47ba530197c9869105cf78b0f
See a sample script here and more.
@james-d-elliott - your proposal will be implemented, too. Closing this now...
Most helpful comment
if it's not too hard to add, it could be nice to automate tasks that get repetitive. and for those who like Decrypt9WIP's menus but want to use GodMode9 since it's more updated or anything. some possible ideas are: