From b0d4f79820eecafadaffc443df57eb0d18872b9e Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Wed, 14 Sep 2022 23:30:46 +0200 Subject: Added all patterns to the code and made that you could select between them with j and k and animate them with a and stop the animation with s --- presets/scripts/newfiles.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 presets/scripts/newfiles.py (limited to 'presets/scripts/newfiles.py') diff --git a/presets/scripts/newfiles.py b/presets/scripts/newfiles.py new file mode 100755 index 0000000..e304f44 --- /dev/null +++ b/presets/scripts/newfiles.py @@ -0,0 +1,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 + -- cgit v1.2.3