Skip to main content

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 '-l'.

$ letterboxed -h
usage: letterboxed [-h] (-n | -l top-rgt-lft-btm) [-d <file>]

NYT Letterboxed Two-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.
-d <file>           Dictionary File

# 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

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.4.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

letterboxed-0.0.4-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page