diff options
| author | 2026-07-18 13:34:49 -0400 | |
|---|---|---|
| committer | 2026-07-18 13:45:01 -0400 | |
| commit | 72f5ec3ce777fc05150856f1841e60b0f5c9f8f7 (patch) | |
| tree | 9b26fd3b314bcf3a2259704c076d819212f172f0 /ini/gen_ini_file.py | |
| parent | e6b1631d27f9fe54f3cdd3d7ee1e65d726927e3c (diff) | |
| download | cetris-72f5ec3ce777fc05150856f1841e60b0f5c9f8f7.tar.gz cetris-72f5ec3ce777fc05150856f1841e60b0f5c9f8f7.tar.bz2 cetris-72f5ec3ce777fc05150856f1841e60b0f5c9f8f7.zip | |
restore old frontends as they were
Minimal changes, just enough to get them building and running.
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'ini/gen_ini_file.py')
| -rw-r--r-- | ini/gen_ini_file.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ini/gen_ini_file.py b/ini/gen_ini_file.py new file mode 100644 index 0000000..acf078d --- /dev/null +++ b/ini/gen_ini_file.py @@ -0,0 +1,35 @@ +import base64 +from random import randint + +MAX_LINES = 12 + +def random_line(): + num = randint(0, 99999999); + keyb64 = base64.b64encode(bytes(ascii(num), encoding="ASCII")) # i have no idea + key = str(keyb64, encoding="utf8") + key = key[:len(key)-2] + + valueb64 = base64.b32encode(bytes(ascii(num), encoding="ASCII")) # yeah + value = str(valueb64, encoding="utf8") + value = value[:len(value)-3] + return key + "=" + value + "\n" + +def random_section(): + num = randint(0, 99999999); + secb64 = base64.b64encode(bytes(ascii(num), encoding="ASCII")) + sec = str(secb64, encoding="utf8") + return '[' + sec[:len(sec)-2] + ']\n' + +f = open("random.ini", "w") + +lines = 0 + +f.write(random_section()) +while(lines <= MAX_LINES): + if randint(0, 5) == 1: + f.write('\n') + f.write(random_section()) + f.write(random_line()) + lines += 1 + +f.close() |