Crossword and Word Puzzles (generate using LogosComAPI - python 3.6)

Page 1 of 1 (2 items)
This post has 1 Reply | 2 Followers

Posts 384
PJ | Forum Activity | Posted: Wed, Dec 6 2017 11:58 PM

I "wish" Logos Bible Software could create Crossword Puzzles for References I supply. Not one at a time, but for instance from a Passage list I supply. Because that is not available yet - I tried my own solution. I would like to share - because it could maybe proclaim the Word of God for another audience.

This is written in python 3.6 and make use of LogosComAPI

CrossWordEngine.pyw (Windows)

If you know how, you could maybe make it work for other another OS.


Reference Options:

1) Scan Clipboard
2) Capture Chapter
3) Active Panel
4) Entire Bible

Info (Reference Options):

1) Scan Clipboard

                a) scans the clipboard for references and generates one (1) crossword and (1) word puzzle from those references in the different sizes selected

                b) question generation are not supported yet for verse level

                c) the resulting crosswords and word puzzles are saved as *.bmp to a folder structure of %yourPathSelected%/af/Puzzles/PassageList/[XxY]/*.bmp

2) Capture Chapter

                a) Fill in the Reference Box that is now Enabled - each Chapter should be specified along (Ge 1, Ge 2, Mat 1, Rev 9)

                b) This also works with Scan References. Therefore the format of the text in the Reference Box can actually be anything containing References.

                c) Question generation are supported on Chapter level - you need to setup the questions first

                d) the resulting crosswords and word puzzles are saved as *.bmp to a folder structure of %yourPathSelected%/af/Puzzles/%Book%/%Chapter%/[XxY]/*.bmp

3) Active Panel

                a) Not supported yet - it will link to current Reference Active Bible

4) Entire Bible

                a) Fill in the starting book name in the Reference Box (Gen)

                b) Puzzles will be generated from this book up to Revelations

                b) Crosswords and Word Puzzles will  be generated according to the rules of "Capture Chapter" above



There are two dictionaries

1) Chapter Level

2) Global Level


Info (Dictionary):

A Dictionary are created for Preferred Bible. If you select another Preferred Bible and run the Compiler, all questions you created will be overwritten. I plan to support multiple languages - but it is not implemented yet.

When you run the CrossWord Compiler the first time.

                a) Create a CopyBibleVerses style containing only:



                b) Select it as the current style

                c) In CrossWord Compiler:

                               1) Select "Chapter Range" option and fill in "Ge 1" in the Reference Box.

                               2) Press Compile button

                               3) The compiler will create a dictionary folder structure in %MyDocuments%/CrossWordPuzzles/af/dictionary

                               4) Each Book will be a Folder with each chapter inside as a %Chapter%.txt file that contains a unique list of words greater than 3 characters in that chapter

                               5) There will also be a global_questions.txt file in the dictionary folder containing all word as in 4 above for the whole Bible


1) Chapter Level

                a) Open one of the text files created above

                b) Fill in according to your liking

                c) Format is WORD:Question 1|Question 2|etc...

                d) On Chapter Level the compiler will randomly select from these questions

                e) If the Chapter doesn't have a question for the WORD the compiler will fall back to the global Dictionary (global_questions.txt) and select a random question from there.

2) Global Level

                a) Used for global question generation

                b) Format is the same as Chapter Level

Size Options:

1) Size selection is not supported yet

2) All Sizes will be generated 10x10 ; 20x20; 30x30

3) Sizes are squares at this stage because of a bug in the algorithm where I accidently mixed up X and Y values. So – you can’t have a 10x20 grid for instance


Puzzle Completion:

1) If the compiler did not create a question.txt file next to a crossword then:

                a) You most probably ran it from "Scan Clipboard" - if the file is there with no questions:

                               a) Edit the Chapter or Global Dictionaries

                b) or create your own questions in your preferred Text Editor

                c) each time you run the compiler with the same folder selected the puzzles will be regenerated with another solution

2) I did not create a word-list for the Word Puzzles - you'll need to create it manually or just use the Word Puzzle document in Logos to create another Word Puzzle. This compiler is meant to generate lots of puzzles in a matter of seconds or minutes depending on the Reference supplied.



This is not suppose to be a complete solution. I just created it for a serious I am planning for 2018.

There will be bugs - but it is working on my system (Win 10 - Logos 7 - 8GB RAM - (SSD and HDD)

The algorithms are not of the best (I did not have any formal programming education) - but, they actually work (fast on my laptop)

Word Puzzles will not have Diagonal Entries because at this time it runs with the same algorithm as the Crosswords

The Crossword algorithm prefer at least one blank block between words.

Enjoy and notify me of bugs. I'll try to fix them somewhere in the future, I can't commit myself to it right now.

Disclaimer: I do not take any responsibility for any damage that may occur from using this python script. You run it at your own risk.

I do not know how to distribute python code other than to zip all files in the project. If it doesn't work - Please make it work and update me on how to do it - Thanks.

Files in

User Interface:

Folder Structure:

Sample Output (10x10):


Posts 897
Brother Mark | Forum Activity | Replied: Thu, Dec 7 2017 11:54 AM

This is GENIUS, and represents a significant amount of work.  I thank you on behalf of our community of users.

"I read dead people..."

Page 1 of 1 (2 items) | RSS