NAME
EBook::Ishmael::EBook - Interface for processing ebook documents
SYNOPSIS
use App::Ishmael::EBook;
my $ebook = App::Ishmael::EBook->new($file);
DESCRIPTION
EBook::Ishmael::EBook is a module used by ishmael to read ebook files. If you are looking for user documentation, you should consult the ishmael manual (this is developer documentation).
This page will not only detail EBook::Ishmael::EBook's methods, but some of the methods of the various specific ebook modules that this module uses, as they all (mostly) share the same API.
If you would like documentation on writing your own ebook format module, consult the documentation for EBook::Ishmael::EBook::Skeleton.
METHODS
$e = EBook::Ishmael::EBook->new($file, [ $type ])
Reads $file
and returns some ebook object, the exact class will depend the on the format of $file
or $type
. $type
is the name of the format you would like to read $file
as. If not specified, new()
will try to identify $file
's format automatically via a series of heuristics.
$html = $e->html()
Returns a string of the HTML-ified contents of the ebook object.
$meta = $e->meta()
Returns a hash ref of the ebook object's metadata.
SUBROUTINES
$type = ebook_id($file)
Identifies the ebook format of $file
using a series of heuristics. If $file
could not be identified, returns undef
.
EXPORTED VARIABLES
%EBOOK_FORMATS
Hash of ebook formats and their respective class.
AUTHOR
Written by Samuel Young, <samyoung12788@gmail.com>.
This project's source can be found on its Codeberg Page. Comments and pull requests are welcome!
COPYRIGHT
Copyright (C) 2025 Samuel Young
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.