Date: Wed, 27 May 2009 21:14:52 +0200 From: Roland Smith <rsmith@xs4all.nl> To: Kelly Jones <kelly.terry.jones@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Formatted text conversion Message-ID: <20090527191452.GC14687@slackbox.xs4all.nl> In-Reply-To: <26face530905270841l9a28ec9n9d33ec9665cd01c0@mail.gmail.com> References: <26face530905270841l9a28ec9n9d33ec9665cd01c0@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--w7PDEPdKQumQfZlR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Wed, May 27, 2009 at 08:41:56AM -0700, Kelly Jones wrote:
> I have e-books in several formats (DOC, LIT, PDF, RTF, HTML, TXT,
> etc). Is there a Unix command-line tool that converts between these
> formats?
Not a single tool. Although some conversions are possible using
different tools. Applications are listed as available under /usr/ports
unless stated otherwise. Ports that are marked with * are those that
I've used with reasonable results myself.
RTF -> HTML: textproc/rtf2html or textproc/unrtf
TXT -> HTML: I've used a simple perl script to do this in the past, but
I guess the textproc/txt2html does something similar.
TXT -> PDF: print/nenscript or print/enscript-letter to make postscript
files from text, then ps2pdf from print/ghostscript8 to
create PDF from the postscript files. *
PDF -> HTML: pdftohtml from graphics/poppler-utils *
HTML ->PDF: Firefox supports printing to a PDF file.
It seems LIT files are based on MS' CHM format. Maybe textproc/chm2pdf
will convert them to pdf?
There is an open-source tool for e-books (LIT format, among others):
http://calibre.kovidgoyal.net/ It is not available via ports though.
> If not, is there at least a tool that converts these formats to TXT?
DOC -> TXT: textproc/antiword *
HTML -> TXT: textproc/html2text
PDF -> TXT: pdftotext from graphics/poppler-utils *
Roland
P.S. A lot of public domain e-books are available in different formats
via Project Gutenberg [http://www.gutenberg.org]
--=20
R.F.Smith http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
--w7PDEPdKQumQfZlR
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (FreeBSD)
iEYEARECAAYFAkodkSwACgkQEnfvsMMhpyWOuACdE5sS1ExtEg1QBEzU9xx9XWOu
JZoAn1RcrEq/paluhqKuDrCUMIu7/eXY
=kq87
-----END PGP SIGNATURE-----
--w7PDEPdKQumQfZlR--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090527191452.GC14687>
