aboutsummaryrefslogtreecommitdiff
path: root/presets/parse.py
blob: fb06bce0c2b4686a195db70a976e0f6e5a3f578c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python3


with open("/home/pengu/test/rust-dev/gof-rs/presets/patterns-striped.txt", "r") as file:
    with open("./new.txt", "w") as newfile:
        cnt = 0
        for line in file.readlines():
                if line != '\n':
                    if cnt > 0:
                        newfile.write("\n")
                    if len(line) < 73 and line != '\n':
                        txt = line.rstrip().center(72, ".") + '\n'
                        newfile.write(txt)
                    cnt = 0
                if line == '\n':
                    cnt += 1