xword-dl icon indicating copy to clipboard operation
xword-dl copied to clipboard

RFE: iPuz output choice

Open ehcloninger opened this issue 1 year ago • 1 comments

In talking with the creator of the Forkyz Android app, I wonder if we could build support for writing iPuz into xword-dl as an option. iPuz has more metadata than puz, so some reasonable defaults would have to be inferred or chosen. There's already a library in PyPI to read/write the puzzles. I'll see if I can shoehorn in the support, but it may be beyond my meager skills.

ehcloninger avatar Aug 31 '23 14:08 ehcloninger

I played with this briefly today but I'm not sure I like the direction of it. svisser/crossword has 2 utility functions that read/write both puz and ipuz with their own data type holding the content. I was able to send the puzzle file read by xword-dl using cw = crossword.from_puz(puz) and create an iPuz using ipuz = crossword.to_ipuz(cw). Some of the puzzle structure gets lost in the transmission, so the puzzle grid ends up as nulls in the output.

I'm not sure this is a great use of time. I actually solved the thing that was causing the itch. I would load a bunch of crosswords I downloaded using xword-dl onto my phone. When I opened Forkyz, all the data was messed up in the picker. @yourealwaysbe explained how the import function works in the app and now those crosswords have the correct metadata in the picker.

ehcloninger avatar Sep 01 '23 18:09 ehcloninger