package oepub

  1. Overview
  2. Docs

Entry point of the library to open epub archive

type t

The epub archive type

val parse : string -> t

parse file unzips the archive name file.

  • raises Zip.Error

    if the archive can not to be unzipped.

val close : t -> unit

close epub closes the underlying archive handler

val files : t -> string list

files epub returns the list of files contained in the archive

val handler : t -> Zip.in_file

handler epub returns the underlying zip handler

val read_entry : t -> string -> string option

read_entry epub filename returns the content of filename in epub. read_entry returns None if filename is not a file in epub.

val opf : t -> (Opf.t, Error.t) Stdlib.result

opf epub tries to parse the content.opf file

val toc : t -> (Toc.t, Error.t) Stdlib.result

toc epub tries to parse the toc.ncx file

OCaml

Innovation. Community. Security.