Clue is a pattern-matching tool for when you're stuck on a crossword. Give it p_rs__c_o_s
and it will find "perspicuous" for you. There are lots of these things already; why write another one?
- Mobile-friendly (I usually only have a phone or iPad to hand)
- British spelling variants (there are already enough US-centric tools)
- Mostly for fun
It's written in two parts: the server (little more than a node app wrapping a database query on the dictionary file) and an HTML/JS page that acts as the client.
The master
branch of this repo contains the server, and the gh-pages
branch contains the HTML as an example interface.
- node.js (tested with v0.8.20 – v0.10.32)
- sqlite3 for node (tested with v2.1.5 – v3.0.2)
git clone https://github.com/hjst/clue.git
cd clue
npm install
(fetch & install node libs, if needed)node server.js
(or equivalent, depending on your deploy target)
The dictionary is derived from the SCOWL collection. There might be better sources, but SCOWL is at least reasonably well known, free, and has separate British/American lists. If you know of a more suitable source I would be very grateful to hear of it.
Build the dictionary database by running make dictionary.db
. This will grab the latest SCOWL files, select & filter the British ones, load them into an sqlite database and drop you at the prompt ready to play. Check the Makefile
for the gritty details.
The HTML example interface in the gh-pages
branch uses the following bits from other people:
- Dave Gamache's Skeleton boilerplate
- Detective designed by Simon Child from The Noun Project
- CSS loader animation courtesy of cssload.net
- jQuery 2
I originally wrote clue to use grep
but then wasn't sure where it was going to live and thought perhaps some effort to make it portable might not be a terrible idea. Given the exclusively read-only nature of the thing, sqlite was an obvious choice. My crude benchmarks showed that LIKE
in sqlite3 was roughly even in performance with grep -i
on this dataset, which was good enough for me.