Solve the daily Letterboxed word puzzle from the New York Times.
Project description
Letterboxed Solver
Python module to solve the daily word puzzle from the New York Times.
Installation
python -mpip install letterboxed
Usage
You will need a local dictionary file in order to use this module if you want to specify custom puzzles with the -l
argument.
$ letterboxed -h
usage: letterboxed [-h] (-n | -l top-rgt-lft-btm | -r) [-d <file>] [-g word1,word2]
NYT Letterboxed Solver
options:
-h, --help show this help message and exit
-n Pull today's puzzle from the NYTimes website.
-l top-rgt-lft-btm Specify the letters you want on the box.
-r Generate a random letterbox puzzle.
-d <file> Dictionary File
-g word1,word2 Make a guess on the supplied letterbox.
# Puzzle for December 8, 2023
$ letterboxed -d /usr/share/dict/american-english -l CTO-UFM-QZB-INA -d /usr/share/dict/american-english-huge
quiz -> zombification
$ letterboxed -n
Today's puzzle is CTO-UFM-QZB-INA
quiz -> zombification
quoz -> zombification
$ letterboxed -l CTO-UFM-QZB-INA -g quiz,zombification -d /usr/share/dict/american-english-huge
You got it!
$ letterboxed -r -d /usr/share/dict/american-english
Your letterbox puzzle is
vdi-tsn-aeo-mrl
Run `letterboxed -l vdi-tsn-aeo-mrl -g your,guess` to make a guess.
Example python module usage:
from letterboxed import Letterbox
with open("/usr/share/dict/american-english-small", "r") as fp:
dict = fp.read().split("\n")
lbox = Letterbox((('a', 'e', 'g'), ('h','i','l'), ('c', 'm', 'v'), ('p', 'o', 't')), dict)
for pair in lbox.solve():
print(" -> ".join(pair))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
letterboxed-0.0.6.tar.gz
(6.7 kB
view hashes)
Built Distribution
Close
Hashes for letterboxed-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8aa93275eee07b2be5fc0894aa2da183849dcaec21ec98318bd8dc38a4f5ed05 |
|
MD5 | d3aa7c6d87f0d9c03114358b4c3373d6 |
|
BLAKE2b-256 | 5e59f82e16ee17fab1297fda12ee21f292ba7522c251364dc07816f0efa4fdfd |