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 details)
Built Distribution
File details
Details for the file letterboxed-0.0.6.tar.gz
.
File metadata
- Download URL: letterboxed-0.0.6.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a650d4910f7143df85c7dcbeb3df3e696c4c706a2094467751960face876fdf7 |
|
MD5 | 0e4c98a140177daeb2b3b2261732a00d |
|
BLAKE2b-256 | 32f2171406eaba1538408bc0f8a0086475cc6cb5bae9334791251b74e31707ec |
File details
Details for the file letterboxed-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: letterboxed-0.0.6-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8aa93275eee07b2be5fc0894aa2da183849dcaec21ec98318bd8dc38a4f5ed05 |
|
MD5 | d3aa7c6d87f0d9c03114358b4c3373d6 |
|
BLAKE2b-256 | 5e59f82e16ee17fab1297fda12ee21f292ba7522c251364dc07816f0efa4fdfd |