BUPE.Config (BUPE v0.6.5)

View Source

Configuration struct for building an EPUB.

Most fields map to the Package Definition metadata, which is the primary source of bibliographic and structural information about the publication.

Core EPUB metadata fields

  • title - Title of the EPUB publication.
  • creator - Person or organization responsible for the content.
  • contributor - Person or organization with a secondary role.
  • date - Publication date (not the last modification date). See Date and Time Formats.
  • modified - Modification date in UTC, terminated by the Z indicator.
  • identifier - Identifier such as a UUID, DOI, ISBN, or ISSN. Default: UUID.
  • language - Primary language of the publication. Default: "en".
  • version - EPUB specification version. Default: "3.0".
  • unique_identifier - Identifier unique to this publication.
  • source - Source publication this EPUB derives from.
  • type - Specialized publication type; see the EPUB Publication Types Registry.

For additional fields such as description, format, coverage, publisher, relation, rights, and subject, see the Package Metadata section of the EPUB specification.

Content and assets

  • pages - List of XHTML files or %BUPE.Item{} entries. Order controls navigation order in the EPUB.
  • styles - List of CSS files or %BUPE.Item{} entries.
  • scripts - List of JavaScript files or %BUPE.Item{} entries.
  • images - List of image files or %BUPE.Item{} entries.
  • cover - Whether to include a default cover page. Default: true.
  • logo - Image path for the cover page.

Summary

Functions

Creates a new BUPE.Config struct from the provided keyword list or map.

Types

contributor()

@type contributor() :: String.t()

creator()

@type creator() :: String.t()

t()

@type t() :: %BUPE.Config{
  audio: [map()],
  contributor: contributor(),
  cover: boolean(),
  coverage: String.t(),
  creator: creator(),
  date: String.t(),
  description: String.t(),
  fonts: [map()],
  format: String.t(),
  identifier: String.t(),
  images: [Path.t() | BUPE.Item.t()],
  language: String.t(),
  logo: String.t(),
  modified: String.t(),
  nav: list(),
  pages: [Path.t() | BUPE.Item.t()],
  publisher: String.t(),
  relation: String.t(),
  rights: String.t(),
  scripts: [Path.t() | BUPE.Item.t()],
  source: String.t(),
  styles: [Path.t() | BUPE.Item.t()],
  subject: String.t(),
  title: title(),
  toc: [map()],
  type: String.t(),
  unique_identifier: String.t(),
  version: String.t()
}

title()

@type title() :: String.t()

Functions

new(data)

Creates a new BUPE.Config struct from the provided keyword list or map.