NAME

Palm::ProjectGutenberg - convert PG text files to Palm Doc format

DESCRIPTION

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.

SYNOPSIS

use Palm::ProjectGutenberg qw(pg2pdb);
pg2pdb($title, $infile, $outfile);

FUNCTIONS

There is only one function, which can be exported if you wish.

pg2pdb

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.

LIMITATIONS, BUGS and FEEDBACK

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.

SEE ALSO

Palm::Doc

http://gutenberg.org

AUTHOR, COPYRIGHT and LICENCE

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.

CONSPIRACY

This module is also free-as-in-mason software.