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

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