Add command-line option to simplify all content and quit.

Issue #98 resolved
Peridexis Errant
created an issue

This would run the raw-linter, simplify mods and graphics packs, check that baselines were downloaded etc. and in general ensure things are cleaned up and minimized.

This would be very useful for me and probably other pack maintainers, so it's a medium-term priority.

Adding a way to simplify keybindings would also be great; loading from a file and saving back to it.

Comments (6)

  1. Michael Madsen repo owner

    I've prepared an initial implementation of this - triggered by the unlisted parameter --release-prep - which will, in order:

    • Increase log level to INFO
    • Change log output to go to stdout instead of stderr
    • Run raw linting
    • Download baseline, if required
    • Simplify graphics
    • Simplify mods

    Although this can be used with the binary build, I recommend running from source for this operation to get live feedback. The build cannot deliver this because it only has stdout.txt; PyInstaller prevents any stdout output from going through when the executable does not mark itself as a console executable (which PyLNP doesn't).

    If all goes well, the program exits with a status code of 0; otherwise it will be non-zero. The exact return code depends on the error; currently the potential failing steps are raw linting (return code 3) and failed version detection during baseline download (return code 4).

    If you want keybind simplification as well, please add a method to do this to the keybinds module (similar to what's in graphics and mods).

  2. Log in to comment