Thanks! @Grant it looks like this might be a R package with support for converting flextext files: phonfieldwork: Linguistic Phonetic Fieldwork Tools version 0.0.11 from CRAN. I don’t think I’ve seen a comparable package for Python.
One outstanding challenge with the script is that there still isn’t a way to make the text naturally wrap when pasted into a document without sufficient space on a single line, but as far as I know there is no way to automate that with Word/LibreOffice Writer/Google Docs. This is one of the reasons @pathall has been promoting the use of web technologies, because they make it possible to dynamically wrap multiple lines of text based on the size of the window.
So, this script is really just a temporary (and admittedly flimsy) band-aid until we find a more robust solution!
I will probably give it at least one more update, as I want to learn how to use a XML parser instead of processing the code line-by-line, and there are still some errors with reduplication and compounds.