Saturday, January 15, 2011

I like crossword puzzles....

I'm not one of those record-breaking NY Times crossword solvers. I just like to do the occasional puzzle.

One form available uses the Across Lite software from litsoft.com. The two week repository here is in the Across Lite format.

Some sites make PDFs of their crosswords available. For example, http://www.brainsonly.com/servlets-newsday-crossword/newsdaycrosswordPDF?pm=pdf&puzzle=1101151&data=%3CNAME%3E110115%3C%2FNAME%3E%3CTYPE%3E1%3C%2FTYPE%3E. In the URL here, the pertinent things to change are puzzle=xxxxxxx and data=%3CNAME%3Exxxxxx and %3CTYPE%3E1%3C%2FTYPE%3E. The format for the "puzzle=xxxxxxx" is YYMMDDx. If the number 1 is used at the end, a blank grid and clues are pulled up. If the number 2 is used at the end, the grid, clues and solution are pulled up as a PDF. The data=%3CNAME%3Exxxxxx portion should match the date string (YYMMDD) used previously. The last element is %3CTYPE%3E1%3C%2FTYPE%3E. If you're using 1 to download the clues and grid, this part will look like %3CTYPE%3E1%3C%2FTYPE%3E. If you're downloading the clues, grid and solution, this becomes %3CTYPE%3E2%3C%2FTYPE%3E. As an example, here's the resulting URL for the New Year's Day puzzle and solution:

http://www.brainsonly.com/servlets-newsday-crossword/newsdaycrosswordPDF?pm=pdf&puzzle=1101012&data=%3CNAME%3E110101%3C%2FNAME%3E%3CTYPE%3E2%3C%2FTYPE%3E

I've got my machine set to download the puzzle from http://www.chron.com/apps/games/xword/puzzles/ every day. The first thing I used for that is a program for Windows (originally *nix) called wget. Here's one place to get wget for Windows. After you've got wget, you need to create and schedule something like a batch file. Here's what mine looks like (the italic part):

@echo off
echo %%date%% = %date%


for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
set dow=%%i
set month=%%j
set day=%%k
set year=%%l
)

wget "http://www.chron.com/apps/games/xword/puzzles/today.puz" -O chron/chron.com_%month%-%day%-%year%.puz


I typed all that into Notepad and saved it as chron.bat. Be sure to save it named *.bat and set the "Save as type" to "all files". That's if you're using Windows Notepad. Save this batch file in the same directory where the executable file for wget is located. From there, all that remains is to set this batch file up as a recurring task using Windows Task Scheduler. Mine runs daily.

No comments: