More Than Word(s)
All of the above-mentioned applications have various requirements: some rely heavily on pre-installed libraries (such as KWord), some are rather resource hungry (StarOffice/OpenOffice), others are expensive and/or not open sourced. However, all of them try to preserve a certain style or a certain way of formatting a document.
While this is certainly useful and important, I have found that I have no use whatsoever for a word processor, no matter which one. In 90% of the cases where some thoughtless person sends me a .doc file, the information contained within the document could have been communicated easily in plain text in a fraction of the file size.
So let's talk business now and see how we can extract the necessary information from proprietary file formats. There are a few tools worth mentioning, and their beauty lies in the fact that we do not even need X because they are all command-line tools.
antiword takes a Word document as input and extracts the information contained in it, converting it to plain ASCII text or to PostScript. It tries to maintain the formatting as much as possible, and it does a fairly decent job of it.
It's quick, and because it is a command-line tool, we can redirect the output to another process or file for further modification. To take a quick glance at the content of the file, you could pipe the output to less:
antiword HUGE.DOC | less
Or, if you'd rather have a hard copy:
antiword -p letter HUGE.DOC | lprI found antiword so useful that I replaced my previous mailcap-entry for handling of MS Word files (which I used to call abiword) with the following line:
application/msword;antiword %s | vim -This allows me to read through .doc attachments from my mail reader (mutt), and since I pipe the output right into my favorite editor, I even can make modifications and save it to another file. Note that by placing this entry into my ~/.mailcap, all applications respecting this file will use antiword and vim to display .docs. If you are using a graphical browser such as Netscape, you might want to use a different editor or use the -g switch for vim to spawn a GUI front end.
If you are a hardcore minimalist, you will find that the command strings, part of the GNU binutils package, is often sufficient to extract the plain text information from a .doc file. However, antiword has the significant advantage over strings in that it can also extract images in addition to text.
For details on the use of the various options and on how to extract images from a Word file, see antiword at www.winfield.demon.nl/index.html.
The other application, formerly known as mswordview and now available as wv, has been around for quite some time. When I first installed Red Hat 5.2 a few years ago, the Netscape browser used mswordview as the standard application to handle .doc files, as it converted them quite reliably into nice HTML. Note that I'm not talking about wordview, a Microsoft product. The similarity in the name caused the author to rename his tool.
While it certainly is great for a browser to use an application that turns Word files into HTML, this is not always the ideal output format. Therefore, wv now includes a whole set of tools to convert Word documents into a large variety of formats, including, but not limited to, ASCII text, HTML, LaTeX, PostScript and PDF. wv is published under the GPL and is available for free download.
So far we've seen how we can read Word documents and even what options there are to write documents that, in Winworld, would most likely be done in Word. But I can't help concluding that the word processor itself, as an application, is not required or is useless in the vast majority of cases.
The typical user trying to write a simple progress report, for example, usually follows a certain scheme: writes something, uses mouse to highlight the text, uses mouse to point and click and select bold, presses Return a number of times, presses Space a number of times, decides he/she doesn't like it, presses Delete a number of times, uses mouse to point and click and select italics, repeats.
I am fully aware that this is not the proper way to utilize a powerful word processor, but let's face it, that's exactly how the majority of users (those for whom these “user-friendly” applications are designed) work. The efforts required to enter a table of contents, a bibliography, cross-references, etc., can only be imagined.
Eventually, the outcome is a document that takes hours to prepare and that looks only the way it should on this platform using a particular version of this word processor. To avoid such bad practices, let's investigate some alternative methods for preparing platform-independent documents.
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- The Firebird Project's Firebird Relational Database
- Stunnel Security for Oracle
- My +1 Sword of Productivity
- SUSE LLC's SUSE Manager
- Non-Linux FOSS: Caffeine!
- Managing Linux Using Puppet
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Parsing an RSS News Feed with a Bash Script
- Google's SwiftShader Released
- Doing for User Space What We Did for Kernel Space
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide