File: wordlist.py

package info (click to toggle)
ddnet 19.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 68,960 kB
  • sloc: cpp: 195,050; ansic: 58,572; python: 5,568; asm: 946; sh: 941; java: 366; xml: 206; makefile: 31
file content (9 lines) | stat: -rw-r--r-- 313 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
print("#ifndef GENERATED_WORDLIST_H")
print("#define GENERATED_WORDLIST_H")
print("const char g_aFallbackWordlist[][32] = {")
with open("data/wordlist.txt", encoding="utf-8") as f:
	for line in f:
		word = line.strip().split("\t")[1]
		print(f"\t\"{word}\", ")
print("};")
print("#endif // GENERATED_WORDLIST_H")