Word-search-generator

Latest version: v3.5.3

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

3.3.0

Added

- New pre-built mask shapes: [Club](https://github.com/joshbduncan/word-search-generator/wiki/Pre-Built-Mask-Shapes#Club), [Fish](https://github.com/joshbduncan/word-search-generator/wiki/Pre-Built-Mask-Shapes#Fish), [Flower](https://github.com/joshbduncan/word-search-generator/wiki/Pre-Built-Mask-Shapes#Flower), and [Spade](https://github.com/joshbduncan/word-search-generator/wiki/Pre-Built-Mask-Shapes#Spade)
- Testing for built-in masks shapes based on known output
- 'tools/build_masks_output_dict.py' tool for generating known built-in shapes output dict for us in testing

Fixed

- During mask generation, each class and subclass now refers to their own `build_mask()` method instead of the base class.
- Incorrect horizontal center calculation for `Spade` and `Club` masks on even sized masks.

Changed

- The `.random_words()` method default to **NOT** resetting the puzzle size.
- Radius calculation for the `RegularPolygon` mask.
- If the `random_words()` method is called on an empty `WordSearch()` object, an appropriate puzzle size is calculated.
- Cleaned up variable naming a bit to make things clear
- cli.py `BUILTIN_SHAPES` -> `BUILTIN_MASK_SHAPES_OBJECTS`
- shapes.py `MASK_SHAPES` -> `BUILTIN_MASK_SHAPES`
- Cleaned up calculation of built-in shape objects
- Cleaned up imports for 'test/__init__.py'
- README and wiki mention puzzle masking.

Removed

- `make_header()` function no longer needed as header is created with f-strings now

3.2.0

Changed

- Moved build system from setup.cfg to pyproject.toml
- Added [ruff](https://github.com/charliermarsh/ruff) to the dev tool set (plus tox, pre-commit)
- Fixed all ruff suggestions
- Moved flake8 settings to .flake8 file since pyproject.toml isn't supported
- Changed 'mode' on CSV and JSON open context managers to 'x' and let that handle any exceptions

Removed

- `export.validate_path()`

3.1.0

Added

- `PuzzleNotGenerated` is raised if a mask is applied to a puzzle that had yet to be generated, either because it doesn't yet have words or doesn't yet have a size.
- `PuzzleSizeError` is now raised if the current puzzle size is smaller than the shortest words in the wordlist.
- Additional tests to keep coverage at 100%.

Changed

- `WordSearch.random_words()` now accepts an "action" argument. This determines whether the random words are added ("ADD") to the current wordlist or replace ("REPLACE") the current wordlist. Defaults to "REPLACE".
- `no_duped_words()` refactored to speed up puzzle generation especially on large puzzles and puzzles with large wordlists.
- `fill_words()` refactored to stop adding words or secret words if placed words > `config.max_puzzle_words`.
- `try_to_fit_word()` refactored to no longer use deepcopy. While trying a new word, all changes are made to the actual puzzle, changes are also tracked in `previous_chars`. If a word ends up not fitting, the function backtracks and reset the puzzle to the `previous_chars`.
- `calc_puzzle_size()` now maxes out at `config.max_puzzle_words` no matter the caculation result.
- Generation tests updated to work with above changes.

Removed

- `no_matching_neighbors()`
- `capture_all_paths_from_position()`

3.0.0

Added

- Puzzle Masking
- Puzzle output (show(), save()) crops output to the puzzle mask so no dead space
- Key is offset by cropped bounding box
- CLI implementation
- -m, --mask Mask the puzzle to a particular shape (choices: circle, diamond, triangle, heart, hexagon, octagon, pentagon, star).
- -im, --image-mask Mask the puzzle shape to a provided image (accepts: BMP, JPEG, PNG).
- Project [documentation](https://github.com/joshbduncan/word-search-generator/wiki)
- `random_words()` method to add random words to a puzzle.
- Word class now tracks all coordinates of word (using this in place of keeping a separate 'solution' puzzle)
- Testing to make sure key only shows placed words in response to bug fixed in v2.0.1

Changed

- CSV export no longer includes the solution
- Moved all types from 'types.py' file to appropriate object files to help with type checking
- no_duped_words() function was edited to no longer accept a WordSearch object to make testing easier
- `.show()`, `.save()`, and `.json` now crop the puzzle to the masked active area (bounding box)
- `utils.get_random_words()` now returns a list instead of a string

2.0.1

Added

- All puzzle output (stdout, csv, pdf) all indicate that '*' before a word in the key mean that word is secret (not listed in the word list) (e.g. 'Puzzle Key (*= Secret Words): ...').
- Only shows if secret words are actually present.

Fixed

- Answer Key and .placed_... properties were showing all words and not only words placed in the puzzle.
- JSON method returns correct word list.

2.0.0

Added

- Test for csv output with solution
- Secret Words (contributed by Chris J.M. [duck57](https://github.com/duck57))
- The WordSearch object can now accept a list of secret bonus words
- are included in the puzzle but not listed in the word list
- are included in the answer key and tagged with an `*` like '\*word'.
- A puzzle can consist of only secret words
- Implemented in the CLI as -x, --secret-words
- Introduced the Direction class
- Allows for specifying either a preset numeric level or accepted cardinal direction for puzzle words.
- Implemented in the CLI as -d, --difficulty
- Testing for all new secret word features and accompanying functionality
- Updated README with new features
- New `-rx, --random-secret-words` CLI argument


Changed

- Most all supplemental function now work the base WordSearch object, reducing the of arguments needing to be passed around, and also reducing memory usage
- Puzzle config settings
- min_puzzle_size == 5
- max_puzzle_size == 50
- max_puzzle_words == 100
- PDF generator updated to work with larger puzzles and word lists
- Removed the tty input from the cli as it's confusing for most users.
- CLI flag -l, --level was combined with -d, --difficulty (for backward compatibility)
- Lots of types refactoring by contributed by [duck57](https://github.com/duck57)
- clean up __main__ call to cli
- Word class
- `WordSearch.words` property is now a set of `Word` objects
- Allows unused words to be kept around in case they fit in re-generated version o the puzzle.
- Allows easier tracking of all words properties
- Allows easier access to words of different types
- `WordSearch.words` == all available puzzle words
- `WordSearch.placed_words` == all words placed in the puzzle (no matter of word type)
- `WordSearch.hidden_words` == all available "regular" words
- `WordSearch.placed_hidden_words` == all "regular" words placed in the puzzle
- `WordSearch.secret_words` == all available "secret" words
- `WordSearch.placed_secret_words` == all "secret" words placed in the puzzle


Fixed

- [CLI with empty stdin causes error](https://github.com/joshbduncan/word-search-generator/issues/19)
- Corrected key coordinates to 1-based.

Page 2 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.