ddnet/scripts/wordlist.py

10 lines
297 B
Python
Raw Normal View History

print("#ifndef GENERATED_WORDLIST_H")
print("#define GENERATED_WORDLIST_H")
print("const char g_aFallbackWordlist[][32] = {")
with open("data/wordlist.txt") as f:
2020-12-02 14:22:26 +00:00
for line in f:
word = line.strip().split("\t")[1]
print("\t\"%s\", " % word)
print("};")
print("#endif // GENERATED_WORDLIST_H")