puz2js
v1.0.1
Published
Convert .puz files (Across Lite) to javascript objects
Downloads
4
Readme
puz2js
Converts binary Across Lite (.puz) files to javascript objects listing title, author, copyright, notepad, and clues/answers.
Based on Jim Horne's excellent AcrossLiteToText library. All credit goes to Jim for the parsing logic. Check out his XWordInfo site for tons of great crosswording resources!
Basic usage:
const puz2js = require('puz2js')
, fs = require('fs');
const puzzleBytes = fs.readFileSync('/path/to/.puz file');
const parsedPuzzle = puz2js(puzzleBytes);
/* get across clues */
const across = parsedPuzzle.clues.filter((v, i) => {
return v.direction = 'Across'
});