aboutsummaryrefslogtreecommitdiff
path: root/presets/newfiles.py
diff options
context:
space:
mode:
Diffstat (limited to 'presets/newfiles.py')
-rw-r--r--presets/newfiles.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/presets/newfiles.py b/presets/newfiles.py
new file mode 100644
index 0000000..954dd74
--- /dev/null
+++ b/presets/newfiles.py
@@ -0,0 +1,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
+