Coding 2024-03-06
To all indications, the conversion script works now. Tally of bugs:
- I needed to rework the code to extract node metadata, because the rinky-dink parser was failing to empty the stack, which prevented some metadata from being recorded. (There may be Bonus Bugs hiding in here, because the parser is meant to handle input that I have no intention to produce, because I failed to rein in scope creep.)
- I copied code from another project to find elements using xpaths. That code turned out to have never run, and it was slightly broken.
- I failed to anticipate the sheer number of ways that Python will pickle "a set full of strings", and had to allow-list a bunch more opcodes.
- I realized that I'd allow-listed so many opcodes that I should also look into writing a custom unpickler that only loads trusted globals. The first time, I forgot which global I actually needed to trust.
All of this was ultimately not too bad.
With all of that taken care of, I'm all set to start migrating text into the outline... Except that my eyes hurt and I just really want to lie down and doodle. So I'm going to go do that.
Good night.