Go library for creating EPUB files
Find a file
Thomas Wodarek 6e2ec2e7aa
Merge pull request #5 from twodarek/twodarek-upgrade-deps
Upgrade deps to latest versions
2025-10-04 00:37:28 -04:00
.github Create go.yml 2025-03-21 21:14:15 -04:00
internal/storage Update refs to twodarek 2025-03-21 21:07:17 -04:00
testdata feat: Add Audio support (#62) 2023-05-02 13:16:44 -04:00
vendor Upgrade deps to latest versions 2025-10-03 23:03:21 -04:00
.gitignore Update refs to twodarek 2025-03-21 21:07:17 -04:00
CONTRIBUTING.md docs: Add more contribution guidelines 2021-07-21 13:08:39 -04:00
dirinfo.go chore: move the transitioning function to its own file 2021-10-12 08:49:52 +02:00
dirinfo_test.go chore: move the transitioning function to its own file 2021-10-12 08:49:52 +02:00
epub.go Update refs to twodarek 2025-03-21 21:07:17 -04:00
epub_test.go Update refs to twodarek 2025-03-21 21:07:17 -04:00
example_test.go Update refs to twodarek 2025-03-21 21:07:17 -04:00
fetchmedia.go fix bug 2023-08-13 15:23:20 +03:30
fetchmedia_test.go Run fetch media tests on both filesystems 2021-12-22 14:08:24 -08:00
fs.go Update refs to twodarek 2025-03-21 21:07:17 -04:00
go.mod Upgrade deps to latest versions 2025-10-03 23:03:21 -04:00
go.sum Upgrade deps to latest versions 2025-10-03 23:03:21 -04:00
LICENSE docs: Update license 2021-10-02 10:38:33 -04:00
NOTICE feat: Add Audio support (#62) 2023-05-02 13:16:44 -04:00
perf_test.go chore: various optimization 2021-09-16 21:36:05 +02:00
pkg.go feat: abstraction of the local filesystem 2021-10-11 16:19:21 +02:00
README.md docs: Add note project is unmaintained 2023-08-29 13:05:59 -04:00
toc.go Fix subsection marshaling and match navigation/spine order to silence warnings 2022-06-13 14:40:47 +02:00
write.go Update refs to twodarek 2025-03-21 21:07:17 -04:00
write_test.go feat: Add Audio support (#62) 2023-05-02 13:16:44 -04:00
xhtml.go update unit test 2023-08-04 00:36:54 +03:30

CI Coverage Status Go Report Card License GoDoc


⚠️ This project is unmaintained. Please use go-shiori/go-epub or another fork.

Features

  • Documented API
  • Creates valid EPUB 3.0 files
  • Adds an additional EPUB 2.0 table of contents (as seen here) for maximum compatibility
  • Includes support for adding CSS, images, and fonts

For an example of actual usage, see https://github.com/bmaupin/go-docs-epub

Contributions

Contributions are welcome; please see CONTRIBUTING.md for more information.

Development

Clone this repository using Git. Run tests as documented below.

Dependencies are managed using Go modules

Testing

EPUBCheck

EPUBCheck is a tool that will check an EPUB for validation errors.

If EPUBCheck is installed locally, it will be run alongside the Go tests. To install EPUBCheck:

  1. Make sure you have Java installed on your system

  2. Get the latest version of EPUBCheck from https://github.com/w3c/epubcheck/releases

  3. Download and extract EPUBCheck in the root directory of this project, e.g.

    wget https://github.com/IDPF/epubcheck/releases/download/v4.2.5/epubcheck-4.2.5.zip
    unzip epubcheck-4.2.5.zip
    

If you do not wish to install EPUBCheck locally, you can manually validate the EPUB:

  1. Set doCleanup = false in epub_test.go

  2. Run the tests (see below)

  3. Upload the generated My EPUB.epub file to http://validator.idpf.org/

Run tests

go test