pg2pdb - convert PG text files to Palm Doc format
This is a very simple wrapper around the Palm::Doc module that re-formats files from Project Gutenberg so that they look better on a small screen. It does this by removing line breaks apart from at paragraph breaks.
pg2pdb "King Solomon's Mines" 2166.txt king-solomons-mines.pdb
All three parameters are compulsory and are, in order:
The title of the book
The name of a file containing the plain-text of the book. This should not contains HTML markup. It works best if you choose a plain ASCII file instead of ISO 8859-1, as PalmOS doesn't handle weird character sets very well.
The name of a file to write the encoded version of the text to. You should then hotsync this to your PalmOS device in the usual way.
This is subject to the limitations of Palm::Doc - eg that all documents produced are compressed.
I welcome feedback about my code, including constructive criticism. Bug reports should be made using http://rt.cpan.org/ or by email, and should include the a brief description of the bug and a small text file that provokes it and which I can freely distribute with the code as part of its automated test suite in the future.
Palm::ProjectGutenberg
Palm::Doc
http://gutenberg.org
David Cantrell <david@cantrell.org.uk>
Copyright 2009 David Cantrell <david@cantrell.org.uk>
This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively.
This module is also free-as-in-mason software.
To install Palm::ProjectGutenberg, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Palm::ProjectGutenberg
CPAN shell
perl -MCPAN -e shell install Palm::ProjectGutenberg
For more information on module installation, please visit the detailed CPAN module installation guide.