Skip to content

Commit

Permalink
Don't record missing words already in missing.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinbjornt committed Nov 30, 2024
1 parent b2752d9 commit 4da6998
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@
metadata = e.read_metadata()

CATEGORIES = read_wordlist("data/catwords.txt")
KNOWN_MISSING_WORDS = read_wordlist("missing.txt")


# Get all entries in each category and store in dict
CAT2ENTRIES = {}
Expand Down Expand Up @@ -281,7 +283,7 @@ async def _save_missing_word(word: str):
await file.write(f"{word}\n")

if not exact or not results:
if re.match(r"^[a-zA-Z]+$", q):
if re.match(r"^[a-zA-Z]+$", q) and q not in KNOWN_MISSING_WORDS:
await _save_missing_word(q)

return TemplateResponse(
Expand Down
13 changes: 13 additions & 0 deletions missing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,7 @@ scorekeeper
scoreboard
autostereogram
internalize
internalized
convertibility
deflator
sideline
Expand Down Expand Up @@ -1734,6 +1735,7 @@ shopper
commuter
bonanza
jitter
jittery
kerfuffle
congregant
unpayable
Expand Down Expand Up @@ -4611,3 +4613,14 @@ subornate
ball-bearing
unencumbered
epithalamus
supramaximal
infographic
iridescence
affectionately
effluvia
cervico-
disconfirm
disconfirmation
conflicted
intradermal

0 comments on commit 4da6998

Please sign in to comment.