joshbduncan / word-search-generator

Make awesome Word Search puzzles!
MIT License
75 stars 24 forks source link

Add an option to generate puzzles with lowercase letters? #58

Closed P233 closed 10 months ago

P233 commented 10 months ago

Firstly, thank you so much for developing this project. I've been searching for a word search generator for quite some time.

I understand that using uppercase letters is a tradition, but I plan to use this tool to assist my 7-year-old daughter in learning English as a second language. Lowercase letters would be more suitable for her.

Could you please consider adding an option to generate puzzles with lowercase letters?

Thank you again for your work on this fantastic project!

joshbduncan commented 10 months ago

Hey, great to hear you are getting some use out of the package!

A few questions...

  1. Are you wanting all lowercase letters or are you wanting to mix and match UPPER and lowercase?
  2. Are you using the package via the command line interface or directly from within Python?

Just let me know the answers to the above and I'm sure I can get something implemented in the next release for you. Cheers!

P233 commented 10 months ago

Hi @joshbduncan, thank you very much!

  1. All letters in the puzzle are in lowercase.
  2. Utilize this package directly within Python.

I plan to gather new words from her reading books (e.g., Frog and Toad), create word search puzzles, and engage in play together until she becomes familiar with these words. Afterward, I'll encourage her to start reading the book. This is why I'd like to have all lowercase letters in the puzzle and intend to manage new words by creating a Python file and executing this package within it.

joshbduncan commented 10 months ago

Thanks for responding. I'll get this implemented in the next version (coming very soon) and let you know when it is live. Thanks!

joshbduncan commented 10 months ago

Ok, I got implemented. It is not officially released yet but you can install it directly from GitHub using the following command...

pip install git+https://github.com/joshbduncan/word-search-generator

Once installed, you can set the lowercase=True argument in the show method. The argument also works for the save method.

from word_search_generator import WordSearch

p = WordSearch("cat dog ant", size=5)
p.show(lowercase=True)
# or
p.save(format="PDF", solution=True, lowercase=True)

Works from the command line (CLI) too...

$ word-search cat bat rat -lc -s 5
 -----------
WORD SEARCH
-----------
 a r o t p
 n f y s c
 t r d k a
 u o c o t
 r r u q g

Find these words: ant, cat, dog
* Words can go E, NE, S, and, SE

Answer Key: ant S @ (1, 1), cat S @ (5, 2), dog SE @ (3, 3)
P233 commented 10 months ago

Works like a charm. Thank you so much!

I am not familiar with Python. I didn't realize it would take that much effort. I really appreciate your help!

joshbduncan commented 10 months ago

My pleasure!