Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Minor documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaupin committed Jun 17, 2016
1 parent 0b1a5bd commit 4269f54
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions pkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ const (
xmlnsDc = "http://purl.org/dc/elements/1.1/"
)

// pkg implements the package file (package.opf), which contains metadata about
// the EPUB (title, author, etc) as well as a list of files the EPUB contains.
// pkg implements the package document file (package.opf), which contains
// metadata about the EPUB (title, author, etc) as well as a list of files the
// EPUB contains.
//
// Sample: https://github.com/bmaupin/epub-samples/blob/master/minimal-v32/EPUB/package.opf
// Sample: https://github.com/bmaupin/epub-samples/blob/master/minimal-v3plus2/EPUB/package.opf
// Spec: http://www.idpf.org/epub/301/spec/epub-publications.html
type pkg struct {
xml *pkgRoot
Expand Down
4 changes: 2 additions & 2 deletions toc.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ type toc struct {
// This holds the body XML for the EPUB v3 TOC file (nav.xhtml). Since this is
// an XHTML file, the rest of the structure is handled by the xhtml type
//
// Sample: https://github.com/bmaupin/epub-samples/blob/master/minimal-v32/EPUB/nav.xhtml
// Sample: https://github.com/bmaupin/epub-samples/blob/master/minimal-v3plus2/EPUB/nav.xhtml
// Spec: http://www.idpf.org/epub/301/spec/epub-contentdocs.html#sec-xhtml-nav
navXML *tocNavBody

// This holds the XML for the EPUB v2 TOC file (toc.ncx). This is added so the
// resulting EPUB v3 file will still work with devices that only support EPUB v2
//
// Sample: https://github.com/bmaupin/epub-samples/blob/master/minimal-v32/EPUB/toc.ncx
// Sample: https://github.com/bmaupin/epub-samples/blob/master/minimal-v3plus2/EPUB/toc.ncx
// Spec: http://www.idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.4.1
ncxXML *tocNcxRoot

Expand Down
4 changes: 2 additions & 2 deletions write.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func createEpubFolders(tempDir string) {
// Write the contatiner file (container.xml), which mostly just points to the
// package file (package.opf)
//
// Sample: https://github.com/bmaupin/epub-samples/blob/master/minimal-v32/META-INF/container.xml
// Sample: https://github.com/bmaupin/epub-samples/blob/master/minimal-v3plus2/META-INF/container.xml
// Spec: http://www.idpf.org/epub/301/spec/epub-ocf.html#sec-container-metainf-container.xml
func writeContainerFile(tempDir string) {
containerFilePath := filepath.Join(tempDir, metaInfFolderName, containerFilename)
Expand Down Expand Up @@ -373,7 +373,7 @@ func (e *Epub) writeMedia(tempDir string, mediaMap map[string]string, mediaFolde

// Write the mimetype file
//
// Sample: https://github.com/bmaupin/epub-samples/blob/master/minimal-v32/mimetype
// Sample: https://github.com/bmaupin/epub-samples/blob/master/minimal-v3plus2/mimetype
// Spec: http://www.idpf.org/epub/301/spec/epub-ocf.html#sec-zip-container-mime
func writeMimetype(tempDir string) {
mimetypeFilePath := filepath.Join(tempDir, mimetypeFilename)
Expand Down

0 comments on commit 4269f54

Please sign in to comment.