
168
|
Chapter 7, Terminal Empowerment
#52 View Microsoft Word Documents in a Terminal
HACK
HACK
#52
View Microsoft Word Documents in a
Terminal Hack #52
Avoid the load time of OpenOffice.org and view Microsoft Word documents in
a terminal.
The simplest way to view a Microsoft Word document in a terminal is to use
the
catdoc command. But catdoc turns a Word document to plain text,
which does little or nothing to preserve the format of the original Word doc-
ument. Obviously, it’s nearly impossible to view a Word document in a ter-
minal exactly the way it would look in Word. Heck, competing word
processors have trouble importing Word documents without upsetting the
format, and they have the advantage of being a graphical desktop applica-
tion. But this hack is still a vast improvement over the popular catdoc pro-
gram, because it preserves at least some of the formatting of the original
document by converting the Word document to HTML.
You’ll need both the wvWare set of file conversion utilities and the hybrid
web browser/pager w3m, along with a little scripting magic to view Word
documents in a terminal or console while retaining at least some of the origi-
nal formatting.
Figure 7-2. Transparent and tinted urxvt terminal