Documentation
¶
Index ¶
- func ContentBuilder(body body.Body, rt reftype.ReferenceType) *contentBuilder
- func ContentReferenceBuilder(title string) *contentReferenceBuilder
- func Create(e *epub.Epub, writer io.Writer) error
- func EpubBuilder(m epub.Metadata) *epubBuilder
- func MakeSlice[T interface{ ... }](t ...T) []T
- func MetadataBuilder(title string, l lang.Language, i ident.Identifier) *metadataBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentBuilder ¶
func ContentBuilder(body body.Body, rt reftype.ReferenceType) *contentBuilder
ContentBuilder initializes a new builder with the provided body and reference type.
func ContentReferenceBuilder ¶
func ContentReferenceBuilder(title string) *contentReferenceBuilder
ContentReferenceBuilder initializes a new builder with a specific title.
func Create ¶
Create takes a populated Epub structure and writes the finalized EPUB file to the provided io.Writer using the internal output creator.
func EpubBuilder ¶
EpubBuilder initializes a new builder with the provided metadata.
func MakeSlice ¶
func MakeSlice[T interface {
epub.Content | epub.ContentReference
}](t ...T) []T
This function allows the creation of a slice of Content or ContentReference. Both types are private to Liber so this could be useful to create slice and append values dynamically.
func MetadataBuilder ¶
func MetadataBuilder(title string, l lang.Language, i ident.Identifier) *metadataBuilder
MetadataBuilder initializes a new builder with the mandatory Dublin Core elements: title, language, and a unique identifier (UUID or ISBN).
Types ¶
This section is empty.