Article View: comp.text
Article #7025Re: extracting ASCII text from various ancient wordprocessor formats
From: Jeffrey C. Dege
Date: Mon, 14 Jun 1999 00:00
Date: Mon, 14 Jun 1999 00:00
67 lines
3328 bytes
3328 bytes
On 13 Jun 1999 22:44:22 -0500, Preston Landers <planders@mail.utexas.edu> wrote:
>Hi there,
>
>I'm looking for a Free Software program/script/whatever to help me
>extract ASCII text out of miscelaneus ancient wordprocessor formats.
>In particular, various old versions of WordPerfect on both DOS and
>Mac. I've searched the net high and low but haven't found ANYTHING to
>help me. I can do a simple translation with a Perl script to strip
>out the 8-bit characters, but the document is still next to unreable
>(no line breaks, etc.)
Most WP formats don't _have_ linebreaks. Paragraphs are formatted
at runtime.
>I thought there would be a GNU program to "get the text" out of a
>binary file but I can't seem to find it. That still doesn't solve the
>problem of making it semi-readable (proper line formatting.)
I do a "cat <filename> | strings | fmt"
Not perfect, but simple and easy.
strings(1) GNU Development Tools strings(1)
NAME
strings - print the strings of printable characters in
files
SYNOPSIS
strings
[-a|-|--all] [-f|--print-file-name] [-o] [--help]
[-v|--version] [-n
min-len|-min-len|--bytes=min-len] [-t
{o,x,d}[--target=bfdname] |--radix={o,x,d}] file
DESCRIPTION
For each file given, GNU strings prints the printable
character sequences that are at least 4 characters long
(or the number given with the options below) and are fol-
lowed by an unprintable character. By default, it only
prints the strings from the initialized and loaded sec-
tions of object files; for other types of files, it prints
the strings from the whole file.
FMT(1) FMT(1)
NAME
fmt - simple optimal text formatter
SYNOPSIS
fmt [-cstu] [-width] [-w width] [-p prefix] [--crown-mar-
gin] [--split-only] [--tagged-paragraph] [--uniform-spac-
ing] [--width=width] [--prefix=prefix] [--help] [--ver-
sion] [file ...]
DESCRIPTION
This manual page documents the GNU version of fmt. fmt is
a simple text formatter that fills and joins lines to pro-
duce output lines of (up to) the specified width (default
75). However fmt uses a best-fit line breaking algorithm,
by a simple version of "Breaking Paragraphs into Lines",
Donald E. Knuth and Michael F. Plass, Software--Practice
--
Never worry about theory as long as the machinery does what it's
supposed to do.
-- R. A. Heinlein
Technical Details
Message-ID:
<slrn7m8v3e.ha.jdege@jdege.visi.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<87iu8r8mzt.fsf@pbl.ddns.org>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1025b4,3f2a32c2f0d49f55 X-Google-Attributes: gid1025b4,public X-Google-Thread: 10bba1,3f2a32c2f0d49f55 X-Google-Attributes: gid10bba1,public From: jdege@jdege.visi.com (Jeffrey C. Dege) Subject: Re: extracting ASCII text from various ancient wordprocessor formats Date: 1999/06/14 Message-ID: <slrn7m8v3e.ha.jdege@jdege.visi.com> X-Deja-AN: 489303786 References: <87iu8r8mzt.fsf@pbl.ddns.org> X-Complaints-To: abuse@visi.com X-Trace: ptah.visi.com 929332192 209.98.6.59 (Sun, 13 Jun 1999 22:49:52 CDT) NNTP-Posting-Date: Sun, 13 Jun 1999 22:49:52 CDT Newsgroups: comp.text,gnu.misc.discuss