Crates.io | puzuzu |
lib.rs | puzuzu |
version | 0.1.1 |
source | src |
created_at | 2021-09-27 00:39:28.13233 |
updated_at | 2021-09-27 00:53:24.837091 |
description | A crossword puz file parser |
homepage | https://github.com/rivertam/puzuzu |
repository | https://github.com/rivertam/puzuzu |
max_upload_size | |
id | 456727 |
size | 34,919 |
The primary deliverable of the Puzuzu project is currently a CLI program which allows the user to solve crossword puzzles with a TUI.
Packaged and delivered using npm, the node package manager.
npm i -g puzuzu
puzuzu -f path/to/puz-file.puz
TODO: Make controls visible from inside the TUI
This program has been tested on a small handful of files. The ./test_files
directory is currently just cloned from
puzpy, but only the washpost.puz
test has
been fairly thoroughly tested. Additionally, my brother (Zack Berman)
contributed a mini (zack.puz
) that has been thoroughly tested.
Known absent features include
The UI has been built using the following technologies:
The library is a relatively thin wrapper around the wasm/Rust library. It's been tested using both node and webpack, though it has yet to be tested in the browser.
import { Puzzle } from 'puzuzu';
import * as fs from 'fs';
async main() {
const buffer = fs.readFileSync('./path/to/puzzle.puz');
const puzzle = await Puzzle.fromPuz(buffer);
const clues = puzzle.clues();
// clues.across and clues.down are arrays of {
// clueNumber: number;
// text: string;
// row: number;
// column: number;
// length: number;
// }
console.log(clues.across);
console.log(clues.down);
// grid is a two dimensional array of { black: boolean, solution: string }
const grid = puzzle.grid();
}
While the Rust Crate currently primarily exists to support TypeScript usecase, it can be used standalone in either a wasm or Rust context.
The source code for the crate can be found in the ./rust
directory.
TODO: More documentation for the Rust
This project is licensed under either of
at your option.