aboutsummaryrefslogtreecommitdiff
path: root/tools/autoformat.nom
blob: de25292e1ffb0985f6a5dd9b0e4e92c7e7a18495 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env nomsu -V2.4.4.3
use "core"
use "lib/os.nom"
%args = (command line args)
%inplace = (no)
if (%args.1 is "-i"):
    %inplace = (yes)
    remove index 1 from %args

for %path in %args:
    for file %filename in %path:
        %formatted = ".."
            #!/usr/bin/env nomsu -V\(Nomsu version)
            \((parse (read file %filename) from %filename) as nomsu)
        
        if %inplace: write %formatted to file %filename
        ..else: say %formatted