mirror of
https://github.com/9001/copyparty.git
synced 2025-10-02 14:42:28 -06:00
14 lines
314 B
Python
Executable file
14 lines
314 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import codecs
|
|
|
|
for fn in os.listdir("."):
|
|
if not fn.endswith(".txt"):
|
|
continue
|
|
with open(fn, "rb") as f:
|
|
s = f.read().decode("utf-8")
|
|
b = codecs.encode(s, "rot_13").encode("utf-8")
|
|
with open(fn.replace("txt", "r13"), "wb") as f:
|
|
f.write(b)
|