Create docx file using Python-docx?
I would like to convert an .md or .txt file to a docx, locally. I've been using the docverter workflow, and I'm really happy with it, but it still needs an internet connection, which is sometimes not possible.
I recently found Python-docx on github (https://github.com/python-openxml/python-docx) which seems to do exactly that.
I don't have a clue about working in Python. Is this something Editorial can do in a workflow with a python step?
Is Python-docx even possible to use on an iOS device?
If not, does anyone have any ideas about how to do the conversion?
FYI, all I'm really trying to do is send an Editorial file to Word (for iPad) using "open in". I can make Word appear as a sharesheet destination by just giving the file a .docx extension, but of course it won't open in Word.
Thanks for any advice.
I am pretty sure this isn't possible, since
lxml, which is not installed on Pythonista or Editorial and is a C library rather than a native Python module and therefore can't be user-installed. It would require either a) Ole to include
lxmlas part of the app, or b) someone to rework
-xlsxto use another XML-parsing module, like say
I would dearly love to be proven wrong, though.
The app makeDoc by toketaWare
Can use x-callbacks and will create docx files from markup and text.
@roosterboy197 I have had some success in the past simply replacing
lxmlfunctions with their
xmlequivalents (only works in some places). I remember getting one module to work by replacing
sucessfully. I don't know how heavily
lxmlis used, but in some cases,
xmlcan be used to do the same operations slightly less efficiently.