commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
OpenOffice, LibreOffice and OO Impress wordcount
In this example, the docx gets converted to Open Document .odt format.
For other formats, you'll need to specify the correct filter (Hint: see "Comments" link below for a nice list).
OpenDocument documents from OpenOffice.org,LibreOffice
and other applications, are actually ZIP archives.
Useful informations in these archives are in XML format.
Here we like it or do not. Anyway, the XML files have the unfortunate tendency to
not be indented, and for good reason: they consist of only one line!
To solve the problem and to use a proper editor on the content,
I proceed as follows.
You can also use :
zip document.odt content.xml
And it works with vi instead of nano !