perl script to turn word documents into txt mockup for fimfiction · 5:09pm May 16th, 2015
Hey all,
Here's a small perl script I wrote using Win32::OLE to convert a doc or docx into a .txt formatted using the wiki-formatting we use here on fimfiction.
So I went ahead and attached a link.
The problems?
1. it requires a copy of word installed (otherwise windows OLE won't work, because perl's Win32::OLE is basically perl doing vbscript's job.)
2. It's kind of slow (I suspect my brute force iteration of the characters in the document was probably not the fastest way to do it.)
3. it requires you to be running windows perl (though, Win32::OLE probably goes without saying )
So here's a link to the perl script (shrewdly renamed to .pl.txt so browsers and the web server would treat it as text, instead of a script.)
Let me know if anyone knows how to speed it up, or if there's an escape option for the formatting here so I can inline the text.
The link: https://static.merkelhaus.us/wordToWikiText.pl.txt
Thanks again,
MintGreenConspiracy
P.S. If someone has a better way to encode doc files, let me know. Or if know of a real docx/doc parser that doesn't require a word installation, and a windows machine.