Palm::ProjectGutenberg - convert PG text files to Palm Doc format
This is a very simple wrapper around Palm::Doc 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.
You are unlikely to want to use this from within your own code, it really ony exists for the suporting pg2pdb script to use, which is also distributed and installed with this module.
use Palm::ProjectGutenberg qw(pg2pdb); pg2pdb($title, $infile, $outfile);
There is only one function, which can be exported if you wish.
This takes three parameters, all of them compulsory. They are, in order, the e-book's title, the name of a file containing the plain-text, and the name of a file to write the encoded version to.
This is subject to the limitations of Palm::Doc - eg that all documents produced are compressed.
There is no way of passing texts back and forth in variables or as file handles - it's filenames or not at all. This is because it's really only intended for use by the pg2pdb script. If you want that extra functionality, please provide a patch with tests.
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 smallest possible chunk of code, along with any necessary text data, which demonstrates the bug. Ideally, this will be in the form of files which I can drop in to the module's test suite.
David Cantrell <email@example.com>
Copyright 2009 David Cantrell <firstname.lastname@example.org>
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.