O-section titles are few and far between; I think I have about 15 total, and already I’ve discarded one for requiring a particular brand of cell phone. π
On the menu today is o3read, with a quick bounce forward to odt2txt. Both are file converters.
odt2txt behaves much in the way you might expect: Tack on the file and it will draw out the content and send it to STDOUT. It works with .odt and .sxw files, making it a good choice for sending the contents to a new destination.
On the other hand, o3read is a little more cumbersome. A holdover from the Siag Office suite, it requires you to unzip the target .sxw file, pluck out the content.xml
file, then pipe the results on through.
Otherwise it will sit and stare at you — or worse trickle out a spiel of garbage. π For a while there, I thought it was broken.
o3read itself is less to my liking than its accompanying tools, o3totxt and o3tohtml. o3totxt is useful in sending raw text to the console (odt2txt style), and o3tohtml, as you might have inferred, couches everything in HTML. Which is useful.
Of course, you have to manhandle both in the same way as o3read, to get the results you want. This is where your razor-sharp scripting skills come together to create that singular command to encapsulate all three o3read tools. π
Or you could just stick with odt2txt. Up to you. π