Launch Week Day 4: Introducing Data Exports.Learn More
Socket
Book a DemoSign in
Socket

github.com/bmaupin/go-epub

Package Overview
Dependencies
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/bmaupin/go-epub

Source
Go Modules
Version
v1.1.0
Version published
Created
Source

CI Coverage Status Go Report Card License GoDoc

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:

  • Make sure you have Java installed on your system

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

  • 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:

  • Set doCleanup = false in epub_test.go

  • Run the tests (see below)

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

Run tests

go test

FAQs

Package last updated on 02 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts