
Cursewords, a crossword puzzle-solving interface for the terminal - rishabhd
https://parkerhiggins.net/2019/03/cursewords-crossword-puzzle-solving-interface-terminal/
======
iooi
This is awesome! I had no idea .puz files were a thing.

I wrote a "replica" of the NYTimes Crosswords while I was learning React [1].

[https://github.com/gzzo/crosswords](https://github.com/gzzo/crosswords)

Demo:

[https://shopkeeper-
capacity-56747.netlify.com/puzzle/oscar](https://shopkeeper-
capacity-56747.netlify.com/puzzle/oscar)

------
zem
very neat indeed.

relatedly, if anyone is interested in creating puz files from the command
line, i have a tool to do it:
[https://github.com/martindemello/pangrid](https://github.com/martindemello/pangrid).
it can read the acrosslite text format
[[https://www.litsoft.com/across/docs/AcrossTextFormat.pdf](https://www.litsoft.com/across/docs/AcrossTextFormat.pdf)]
and generate a .puz file from it.

~~~
thisisparker
This is very cool!

------
rcar
There's a great web-based tool for making your own puzzles available here:
[http://www.keiranking.com/phil/](http://www.keiranking.com/phil/) (with
export to the .puz format).

Really useful for both creating an initial grid and for suggesting possible
fill based on existing crossing words.

~~~
thisisparker
Huge fan of Phil! Keiran and I are both alumni of the Recurse Center
([https://www.recurse.com/](https://www.recurse.com/)) from around the same
time. It's become a real crossword programmer powerhouse.

------
ouryummydino
I think you've done a great job with the terminal interface/rendering.

Here's my own pet unfinished terminal .puz player:
[https://github.com/rparrett/puzterm](https://github.com/rparrett/puzterm)

Next to Cursewords, mine looks super clunky.

~~~
thisisparker
Oh man! I didn't know there was prior art. I think yours looks _great_ , Rob,
and I'm very eager to get it installed and compare notes. I'm impressed that
you got all the clues displayed at once.

------
pwinn
Where do I file bug reports? Any attempt to save results in: AttributeError:
'bytes' object has no attribute 'encode' on line 273.

Still, this is really, really good.

------
ericsoderstrom
This is great! Looks much sleeker than Across Lite.

Is there any way to change the keyboard shortcuts? Or even list what the
current shortcuts are? Both `space` and `return` toggle between across and
down. It would be nice if I could make `return` advanced to the next clue
instead, which is the default behavior in the NYT app.

~~~
thisisparker
There isn't such a way yet, but I want to do that in the future. (This 1.0
version doesn't have any kind of persistent settings, so there's not yet a
place to store custom key-mappings.)

In case you want to try out my defaults: `tab` and `shift+tab` advance/retreat
words to the next blank, and `page up` and `page down` (on a Mac, `fn` + `up`
or `down`) do blank-agnostic word advance/retreat.

(I also haven't documented this yet, but `[`/`]` and `{`/`}` do cursor-
perpendicular box-wise movement in blank-agnostic and blank-aware steps,
respectively. One of the hardest parts of this is just _describing_ these
kinds of movement.)

------
semitext
Very cool. Are there any public repositories of puz files, or at least some
sample puz file to test this out?

~~~
thisisparker
I wanted to ship it with an original demo puzzle but construction is really
hard! That's on the roadmap for the future.

~~~
raphlinus
Feel free to include
[http://levien.com/Social%20rule.puz](http://levien.com/Social%20rule.puz) ,
which has a Recurse theme. It's not top quality but I've had a number of
people tell me they enjoy it.

~~~
thisisparker
Raph! I loved that puzzle (and I've solved it in cursewords)! I may try to get
together a collection of freely licensed demo puzzles, and I'd be honored to
include this.

------
bb88
Now we just need to hook this to the cloud so I can save the state of any
puzzle, and add new puzzles to my personal puzzle repo easier.

~~~
Hackbraten
A locally mounted cloud storage directory may be all you need since the state
seems to be kept inside the .puz file itself.

~~~
thisisparker
This is correct. Also, since it's a terminal app, you can probably just ssh
into your puzzle box from wherever :)

------
zem
putting the clue numbers in the middle of the grid lines is a brilliant touch

