epub-metadata-2.0.2: Library and utility for parsing and manipulating ePub OPF package data

Codec.Epub.Opf.Package

Description

Data types for working with the metadata of ePub documents

These data types were constructed by studying the IDPF OPF specification for ePub documents found here:

http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html

Synopsis

Documentation

data Package Source

package tag

Constructors

Package 

Fields

opVersion :: String

version attr

opUniqueId :: String

unique-identifier attr

opMeta :: Metadata

metadata child element contents

opManifest :: [ManifestItem]

manifest child element contents. One required

opSpine :: Spine

spine child element contents

opGuide :: [GuideRef]

guide child element contents

Instances

data MetaTitle Source

package/metadata/dc:title tag, xml:lang attr, content

Constructors

MetaTitle (Maybe String) String 

data MetaCreator Source

package/metadata/dc:creator tag, opf:role attr, opf:file-as attr, content

data MetaDate Source

package/metadata/dc:date tag, opf:event attr, content

Constructors

MetaDate (Maybe String) String 

Instances

data MetaId Source

package/metadata/dc:identifier tag, id attr, opf:scheme attr, content

Constructors

MetaId String (Maybe String) String 

Instances

data Metadata Source

package/metadata tag

Constructors

Metadata 

Fields

metaTitles :: [MetaTitle]

at least one required

metaCreators :: [MetaCreator]
 
metaContributors :: [MetaCreator]
 
metaSubjects :: [String]

dc:subject tags

metaDescription :: Maybe String

dc:description tags

metaPublisher :: Maybe String

dc:publisher tag

metaDates :: [MetaDate]
 
metaType :: Maybe String

dc:type tag

metaFormat :: Maybe String

dc:format tag

metaIds :: [MetaId]

at least one required

metaSource :: Maybe String

dc:source tag

metaLangs :: [String]

dc:language tags, at least one required

metaRelation :: Maybe String

dc:relation tag

metaCoverage :: Maybe String

dc:coverage tag

metaRights :: Maybe String

dc:rights tag

Instances

data ManifestItem Source

package/manifest/item tag

Constructors

ManifestItem 

Fields

mfiId :: MFItemId

id attr

mfiHref :: MFItemHref

href attr

mfiMediaType :: MFItemMediaType

media-type attr

data SpineItemref Source

package/spine/itemref tag

Constructors

SpineItemref 

Fields

siIdRef :: MFItemId

idref attr. Must reference item in manifest

siLinear :: Maybe Bool

linear attr

data Spine Source

package/spine tag

Constructors

Spine 

Fields

spineToc :: MFItemId

toc attr. Must reference the NCX in the manifest

spineItemrefs :: [SpineItemref]
 

Instances

data GuideRef Source

package/guide/reference tag

Constructors

GuideRef 

Fields

grType :: String

type attr. Must follow 13th edition of the Chicago Manual of Style

grTitle :: Maybe String

title attr

grHref :: String

href attr. Must reference item in manifest

Instances

emptyMetadata :: MetadataSource

Note: This isn't valid as-is, some required values are empty lists!