App-Pod2Epub

 view release on metacpan or  search on metacpan

bin/pod2epub  view on Meta::CPAN


    # Add some other metadata to the OPF file.
    $epub->add_meta_item( 'Pod2epub version',    $App::Pod2Epub::VERSION );
    $epub->add_meta_item( 'EBook::EPUB version', $EBook::EPUB::VERSION );


    # Get the user supplied or default css file name.
    $css_filename = get_css_file( $css_filename );


    # Add package content: stylesheet, font, xhtml
    $epub->copy_stylesheet( $css_filename, 'styles/style.css' );
    $epub->copy_xhtml( $xhtml_filename, 'text/main.xhtml', linear => 'no' );


    # Add Pod headings to table of contents.
    set_table_of_contents( $epub, $parser->{'to_index'} );


    # Generate the ePub eBook.
    $epub->pack_zip( $out_filename );

bin/pod2epub  view on Meta::CPAN

            return $css_filename;
        }
        else {
            warn "CSS file $css_filename not found.\n";
        }
    }

    # If the css file doesn't exist or wasted supplied create a default.
    ( $css_fh, $css_filename ) = tempfile();

    print $css_fh "h1         { font-size: 110%; }\n";
    print $css_fh "h2, h3, h4 { font-size: 100%; }\n";

    close $css_fh;

    return $css_filename;
}


###############################################################################
#
# add_cover()

bin/pod2epub  view on Meta::CPAN

The input file containing Pod documentation.

=item B<-o or --outfile>

The output ePub file. This is a required argument.

=item B<-s or --stylesheet>

Specify the CSS stylesheet that the ePub eBook will use. If none is supplied the following minimal stylesheet is used:

    h1         { font-size: 110%; }
    h2, h3, h4 { font-size: 100%; }

=item B<-c or --cover>

Add an image for use as a book cover.

=item B<-t or --title>

Add the ePub book title. Defaults to "Pod Document". A future release will parse this from the Pod document where possible.

=item B<-a or --author>



( run in 1.668 second using v1.01-cache-2.11-cpan-ceb78f64989 )