Skip to content

wmentor/epub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

epub

Golang epub reader library

Summary

  • Written on pure Go
  • Require Go version >= 1.14

Install

go get github.com/wmentor/epub

Usage

package main

import (
  "fmt"
  "os"

  "github.com/wmentor/epub"
)

func main() {

  err := epub.Reader("./data/test.epub", func(chapter string, chapterHTML []byte) bool {
    fmt.Println(chapter)
  })
  if err != nil {
    panic(err)
  }

  // print epub to Stdout as text
  epub.ToTxt("./data/test.epub", os.Stdout)
}