Which CLI application should I use to convert Word template (*.dot file) to the plain text?
I have several Microsoft Word template files. They have *.dot
extension:
$ file file.dot file.dot: Composite Document File V2 Document, Little Endian, Os: Windows, Version 6.1, Code page: 1252, Author: user, Template: file.dot, Last Saved By: user, Revision Number: 2, Name of Creating Application: Microsoft Office Word, Total Editing Time: 01:00, Last Printed: Tue Nov 21 14:41:00 1995, Create Time/Date: Fri Dec 20 11:46:00 2019, Last Saved Time/Date: Fri Dec 20 11:46:00 2019, Number of Pages: 3, Number of Words: 300, Number of Characters: 1713, Security: 0
I need to convert them to plain text using some CLI application.
Is it possible?
Solution 1:
You can use LibreOffice in the terminal.
soffice --headless --convert-to txt:Text YOUR-DOCUMENT-HERE.DOT
Check out the sources
Source1
Source2
Solution 2:
There is also antiword
(use deb-package), which extracts plain text from old (pre-XML) Word documents in a very efficient, but not always entirely correct way.