GuteBook (version 0.5) Copyright (C) 2009 Nick Rapallo (nrapallo)
Usage: gutebook.pl [options] [Project Gutenberg EText-No. | link to ZIP|HTML]
where [options] include:
  -a, --author   "AUTHOR"   override the Author name detected
  -t, --title    "TITLE"    override the Book title detected
  -c, --category "CATEGORY" override default "Project Gutenberg"
  -h, --help     command line help screen (also seen with no parameters)

 Input/Source:
  --PGnum #     override EText-No. detection if no # in input file name
  --keepzip     keep PG .zip file downloaded (local/cache copy for re-edits)
  --keephtm     keep PG .htm file extracted from downloaded .zip (or .txt)
  --usegm       use GutenMark for internal .txt to .htm; otherwise abort

 Output formats:
 (any or all)
  --1150 --1200 eBookwise .imp created by eBook Publisher
  --1100        Rocket eBook .rb created by eBook Publisher
  --epub --lrf  Sony PRS .epub/.lrf created by calibre
  --mobi        Mobipocket .mobi created by calibre
  --lit         Microsoft .lit created by calibre
  --srcepub     single .xhtml (non-Sony) .epub created by calibre
  --pdb         eReader .pdb created by calibre
  --zip         Not yet implemented - reserved for calibre .zip

 Output options:
  --outdir DIR  specify DIR where converted ebooks placed; default install dir
  --nobatch     do not created dos batch file for later re-edits
  -v, --verbose printout messages about this conversion
  --debug       printout more detailed messages about the conversion

 HTML options:
  --LRmargins $ specify overall <body> left/right margins; default $="2%"
  --indent  $   specify overall <body> para. text indents; default $="2em"
  --fixpre1 $   suffix for  <pre> for .mobi; default $="<small><tt>"
  --fixpre2 $   prefix for </pre> for .mobi; default $="</tt></small>"
  -p, --pb  $   pagebreaks on max. 2 HTML Tags, like $="h1 h2"; default $="h2"
  --nojustify   specify no <body> justification; default is justified text
  --nopara      specify no <body> para. separation; default is blank line sep.
  --pbwithin    pagebreak tags within anchor links to Chapter headings (mobi)
  --pbnofirst   ignore pagebreak on first pagebreak HTML Tag
  --pbfirsth1   force pagebreak on first <h1>
  --pbtoc       force pagebreak at TOC location
  --tocname     omit the "toc" anchor name inserted before TOC (.mobi/.imp)
  --noPGtrailer do not insert PG trailer (Booktitle/Author/Released/EText-No.)
  --PGheader    retain PG header (preamble); default is to strip it out
  --PGfooter    retain PG footer (legalese); default is to strip it out
  --PGpagenum   retain/display PG page numbers; default is to strip them out
  --imgsrc      strip all except "src=" within <img> tags
  --centerh     force all <h1> to <h6> tags to be centered.
  --smallerfont specify overall <body> text a font-size smaller
  --largerfont  specify overall <body> text a font-size larger
  --search      Custom Perl RegEx search string expression; use \" for any "
  --replace     Custom Perl RegEx replace string expression; use \" for any "
  --modi        Custom Perl RegEx "i" modifier for case indifferent
  --modg        Custom Perl RegEx "g" modifier for global replacements
  --noimgfix    Not yet implemented - do not re-save images for compatibility
  --cover       Not yet implemented - extract "cover image" into new cover.htm
  --addtoc      Not yet implemented - create TOC from pagebreak Tags
  --addtocend   Not yet implemented - place created TOC above at end

For more about these HTML options/fixes/filters, see GuteBook-readme.txt

If (blank) file called 'calibreold' (no .ext) exists in install directory,
then use v0.5 (stable) calibre instead of new v0.6 (beta/release) calibre

Retrieves the specified Project Gutenberg file, unzips it and filters it.
Provide the PG Etext number and it will try and download the relevant
HTML (or text) version.  Alternatively, you can specify a previously
downloaded ZIP file or an already extracted PG HTML file.
  e.g. gutebook.pl 17297
  e.g. gutebook.pl http://www.gutenberg.org/files/17297/17297-h.zip
  e.g. gutebook.pl c:\dl\17297-h.zip
  e.g. gutebook.pl c:\dl\17297-h\17297-h.htm
