~rootmos/scripts

52c3386e82239944d8235656b64f2ca9eddcb29e — Gustav Behm a month ago 9182e51
pylint, yes yes...
1 files changed, 3 insertions(+), 6 deletions(-)

M scripts.py
M scripts.py => scripts.py +3 -6
@@ 3,7 3,6 @@
import os
import sys
import tomllib
import json

script_dir = os.path.dirname(os.path.realpath(__file__))



@@ 29,7 28,6 @@ def run(scripts, o):
            o.write("\n")

        for fn, s in section.get("scripts", {}).items():
            pass
            o.write("* ")
            o.write(fn)
            d = s.get("description")


@@ 43,8 41,7 @@ if __name__ == "__main__":
        scripts = tomllib.load(f)

    try:
        o = open(sys.argv[1], "w")
        with open(sys.argv[1], "w", encoding="utf-8") as o:
            run(scripts, o)
    except IndexError:
        o = sys.stdout

    run(scripts, o)
        run(scripts, sys.stdout)