Skip to content

Instantly share code, notes, and snippets.

@7shi
Last active May 10, 2020 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 7shi/2229f9197548068f1ea52e5162084743 to your computer and use it in GitHub Desktop.
Save 7shi/2229f9197548068f1ea52e5162084743 to your computer and use it in GitHub Desktop.
[py] Novial dictionary converter (OBSOLETE!)
# extract tgz from http://www.blahedo.org/novial/nl.html
with open("novial.txt", "w", encoding="utf-8") as novial:
for i in range(ord("A"), ord("Z")):
with open("%c.txt" % i, encoding="iso-8859-1") as f:
lines = f.readlines()
texts = []
for i, line in enumerate(lines):
line = line.strip()
if i > 1 and not line:
if texts:
novial.write(" ".join(texts) + "\n")
texts = []
else:
texts += [line]
if texts: novial.write(" ".join(texts) + "\n")
@7shi
Copy link
Author

7shi commented May 10, 2020

This script is obsolete. Please use below:
https://gist.github.com/7shi/6a037b089eff7b14b7d8982d76ec9d08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment