added getting words
This commit is contained in:
@@ -66,7 +66,29 @@ class Session:
|
||||
return u
|
||||
|
||||
|
||||
def build_word_dict():
|
||||
lines = [
|
||||
"""package words
|
||||
|
||||
var Words []string = []string{"""
|
||||
]
|
||||
|
||||
with open("/usr/share/dict/words", "r") as f:
|
||||
for l in f.readlines():
|
||||
lines.append(f'\t"{l.strip()}",')
|
||||
|
||||
lines.append("}")
|
||||
|
||||
with open("internal/words/dictionary.go", "w") as f:
|
||||
f.write("\n".join(lines))
|
||||
|
||||
exit()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
build_word_dict()
|
||||
|
||||
s = Session()
|
||||
print(s)
|
||||
s.add_user(name="Hazel")
|
||||
|
||||
Reference in New Issue
Block a user