🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

github.com/mathieu-keller/opf

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/mathieu-keller/opf

v1.2.0
Source
Go
Version published
Created
Source

Epub parser

This parser only supports epub version 3.0 so far. This parser also only reads MetaData and Manifest.

How to use?

binaryFile, err := os.ReadFile("./test_epub_v3_0.epub")
if err != nil {
    println(err.Error())
	return;
}
zipReader, err := zip.NewReader(bytes.NewReader(binaryFile), int64(len(binaryFile)))
if err != nil {
    println(err.Error())
	return;
}
book, err := OpenBook(zipReader)
if err != nil {
    println(err.Error())
	return;
}

After that, all metadata and manifest data can be found in the book Object

FAQs

Package last updated on 12 Aug 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