Writerperfect conversion tools for legacy file formats

My recent work on the Microsoft Multiplan and Quattro Pro for DOS formats made me think how far LibreOffice has come over the past years in its support of legacy file formats. These formats are supported through software libraries that are developed within the Document Liberation Project (DLP). This project was set up in 2014 by The Document Foundation, which is also the home of LibreOffice. Aside from their use in LibreOffice, these libraries are also the foundation of a set of stand-alone command-line tools that allow you to convert a wide range of legacy file formats to the OpenDocument formats and EPUB.
Much of the available information about these libraries and tools is scattered across different platforms. The command-line tools are also surprisingly hard to find, even though they have been around for a long time. This short post is an attempt at bringing the most important information I could find about them together.
Libraries
The projects page on the Document Liberation Project website lists all libraries and tools that are developed as part of the project. The “Import libraries” section is particularly interesting. Many of these libraries support multiple file formats, but this is not always obvious from their names. More detailed information, including the file formats they support, is available on their Wiki page. As an example, for the libwps library, the Wiki page currently shows 10 different formats, including Quattro Pro and Lotus 123 spreadsheets1.
Command-line tools
The DLP import libraries are also used in a set of command-line conversion tools. These tools are quite difficult to find. For a start, their source code is hidden away in the libpwd library, as a sub-project called writerperfect. I haven’t (yet) tried to compile the tools myself, but binaries are available for various Linux-based platforms. For Debian-based systems, each binary that is built from the writerperfect source is provided as a separate Debian package, which results in 27 distinct tools/packages2. For convenience this table list all of these tools:
Tool | Description |
---|---|
abw2epub | AbiWord to EPUB format converter |
abw2odt | AbiWord to OpenDocument converter |
cdr2odg | Corel Draw graphics to OpenDocument converter |
ebook2epub | other E-Book formats to EPUB converter |
ebook2odt | E-Book formats to OpenDocument converter |
fh2odg | Freehand to OpenDocument converter |
key2odp | Keynote to OpenDocument converter |
mwaw2epub | old Mac formats to EPUB converter |
mwaw2odf | old Mac formats to OpenDocument converter |
numbers2ods | Apple Numbers spreadsheet documents to OpenDocument converter |
pages2epub | Apple Pages to EPUB converter |
pages2odt | Apple Pages text documents to OpenDocument converter |
pmd2odg | Apple Pagemaker to OpenDocument converter |
pub2odg | Publisher documents to OpenDocument converter |
qxp2epub | QuarkXPress to EPUB converter |
qxp2odg | QuarkXPress to OpenDocument graphics converter |
sd2epub | StarOffice to OpenDocument converter |
sd2odf | StarOffice to OpenDocument converter |
vsd2odg | Visio to OpenDocument converter |
wks2ods | Works spreadsheet documents to OpenDocument converter |
wpd2epub | WordPerfect document to EPUB converter |
wpd2odt | WordPerfect to OpenDocument converter |
wpg2odg | WordPerfect Graphics to OpenDocument converter |
wps2epub | Works text document to EPUB converter |
wps2odt | Works text documents to OpenDocument converter |
zmf2epub | Zoner Draw to EPUB converter |
zmf2odg | Zoner Draw to OpenDocument converter |
Installation (Debian)
The binary package names are identical to the tool names, so in order to install the “wks2ods” tool from its Debian package, use this:
sudo apt install wks2ods
All other tools follow the same pattern. As with the underlying import libraries, the tool names don’t always immediately give away what formats they support. The documentation is also quite minimal. As an example, despite its name, the “wks2ods” tool supports a range of legacy spreadsheet formats that goes far beyond “Works spreadsheet documents”. The information on the import libraries Wiki page and some experimentation should get you a long way though.
Using the command-line tools
The basic usage of these tools is very simple. Taking the “wks2ods” tool as an example again:
wks2ods [OPTIONS] INPUT [OUTPUT]
Here, INPUT
is the input file, and OUTPUT
defines the output file. If OUTPUT
is omitted, the tool will print flat ODF to standard output. The tool has the following options:
--encoding ENCODING
: this sets the INPUT encoding.--list-encodings
: this shows the available encodings and then exits.--password PASSWORD
: this sets a password to open the input file.--stdout
: this prints the result as flat XML to standard output.
All tools share the same general command-line interface (note that I haven’t tried all of them, so there may be minor differences that I’m not aware of!).
Examples
In the simplest case we can just run “wks2ods” with the name of the input and output files as command-line arguments. For example, the command below converts a Quattro Pro for DOS spreadsheet to OpenDocument Spreadsheet format:
wks2ods WHATEVER.WQ2 WHATEVER.ods
You may need to use the --encoding
option to define the encoding of the input file. It’s a good idea to always inspect the output file for any obvious encoding problems.
The following command converts a WordPerfect file to OpenDocument Text format with the “wpd2odt” tool:
wpd2odt WHATEVER.WPD WHATEVER.odt
And this converts a WordPerfect file to EPUB using the “wpd2epub” tool:
wpd2epub WHATEVER.WPD WHATEVER.epub
Final thoughts
Since the Writerperfect tools are based on the same software libraries that are also used by LibreOffice, the conversion results will be identical to a LibreOffice conversion in most cases. The main advantage of these tools is that they can be easily integrated in automated workflows, independent of the LibreOffice applications.
Further resources
-
spreadsheets
- Writerperfect conversion tools for legacy file formats
- Quattro Pro for DOS revisited: an obsolete format no more?
- Emulating Microsoft Multiplan spreadsheets in DOSBox-X
- On The Significant Properties of Spreadsheets
- PDF/A as a preferred, sustainable format for spreadsheets?
- Quattro Pro for DOS: an obsolete format at last?
Comments