MichaelWehar / Crossword-Layout-Generator

Crossword Layout Generator - Open Source
http://michaelwehar.com/crosswords
MIT License
56 stars 17 forks source link

Parsing the json to get the picture in the Readme? #1

Closed jordanscience closed 4 years ago

jordanscience commented 4 years ago

Hi,

Thanks for this code but how can I parse the json to get it displayed like you showed in the picture?

Thanks

MichaelWehar commented 4 years ago

Hi Jordan,

Thank you very much for submitting an issue!

First, you need to create your input json. I named this input_json.

Second, you need to generate the layout: var layout = generateLayout(input_json);

Then, you can access the output json with layout.result. The output json has startx, starty, position, and orientation attached to every entry from input_json.

Also, you can access a plain text grid (with html line breaks) with layout.table_string.

Ultimately, this library just computes the json data and can draw the grid in plain text. It's up to the you to build your own UI.

I built a crossword UI for someone a couple years ago. I'm reaching out to them to see if they might be willing to make it open source. No promises, but it's worth a try.

If you would like help building a crossword UI, I would be happy to talk with you about this directly.

I hope that you have a great day!

Mike

jordanscience commented 4 years ago

Hi Mike ,

Thank you for answering :)

For now , I am not sure about building it. If I do so , I let you know and share the code with you :)

Thanks , Jordan

Le 13 nov. 2019 à 17:48, Michael Wehar notifications@github.com a écrit :

 Hi Jordan,

Thank you very much for submitting an issue!

First, you need to create your input json called input_json.

Second, you need to generate the layout: var layout = generateLayout(input_json);

Next, you can access the output json with layout.result. The output json has startx, starty, position, and orientation attached to every entry from input_json.

Also, you can access a plain text grid (with html line breaks) with layout.table_string.

Ultimately, this library just computes the json data and can draw the grid in plain text. It's up to the user to build their own UI.

I built a crossword UI for someone a couple years ago. I'm reaching out to them to see if they might be willing to make it open source. No promises, but it's worth a try.

If you would like help building a crossword UI, I would be happy to talk with you about this directly.

Hope that you have a great day!

Mike — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

MichaelWehar commented 4 years ago

Thank you very much for asking a good question!

Please feel free to contact me if you decide to move forward with building it. :)

MichaelWehar commented 4 years ago

I reach out to them asking if we could possibly make the crossword UI that I previously worked on open source. I'll let you know if I ever hear back from them.

Hope that you have a nice weekend!

jordanscience commented 4 years ago

Thanks !

Have a good week end

Le 16 nov. 2019 à 10:16, Michael Wehar notifications@github.com a écrit :

 I tried to reach out to them, but never heard back. I'll let you know if I ever hear back from them.

Hope that you have a nice weekend!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

TidyData commented 2 years ago

@MichaelWehar very cool project, any hopes of that crossword UI becoming open source?
Thanks for offering this!

MichaelWehar commented 2 years ago

Thank you very much for your kind message @TidyData !

My student and I actually built a different crossword puzzle generator together. It requires large word lists though.

See here: https://www.crosswordconstruction.com

Maybe we can make this open source at some point.

I hope that you have a great day!