package oepub

  1. Overview
  2. Docs

Source file opf.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(*****************************************************************************)
(*                                                                           *)
(*  Copyright (C) 2024 Yves Ndiaye                                           *)
(*                                                                           *)
(* This Source Code Form is subject to the terms of the Mozilla Public       *)
(* License, v. 2.0. If a copy of the MPL was not distributed with this       *)
(* file, You can obtain one at https://mozilla.org/MPL/2.0/.                 *)
(*                                                                           *)
(*****************************************************************************)

type t = {
  title : string;
  author : string option;
  metadata : Metadata.entries;
  manifest : Manifest.ref Manifest.t;
  spine : Spine.t;
}

let create ?author ~title metadata manifest spine =
  { title; author; metadata; manifest; spine }

let title opf = opf.title
let author opf = opf.author
let metadata opf = opf.metadata
let manifest opf = opf.manifest
let spine opf = opf.spine