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


with open("/home/pengu/test/rust-dev/gof-rs/presets/new.txt", "r") as file:
        cnt = 0
        content = ""
        for line in file.readlines():
            if line != '\n':
                content += line.rstrip().center(72, ".") + '\n'
            if line == '\n':
                with open(f"./pattern{cnt}.txt", "w") as pat:
                    pat.write(content)
                    content = ""
                    cnt += 1