EpubFixer

command module
v0.0.0-...-8aebe2e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2020 License: MIT Imports: 7 Imported by: 0

README

EpubFixer

Warning: This project has been written in one night for one set of e-books which were freezing my e-reader. I don't plan to spend more time on this project unless i found new set of books which won't work for me.

This tool out of the box works only for specific set of books. It should preserve required information but will lose unsupported optional tags.

EpubFixer fixes epub file with recreating and modifying spike and list of refitems. It needs to be modified for specific purpose but right now it gives a simple base for parsing EPUB files. Right now it's removing one specific file from each spine and remove additional identifiers.

Usage

EpubFixer (file1) (file2) ... (fileN)

For each file '(fileN).fixed.epub' will be produced

(For developers) How it works

For each filename ProcessFile(filename) is executed. It opens zip reader for path then parse zip archive to EPUB structure, patch it then serialize to epub file. There is possibility that some optional tags aren't implemented for xml files.

So this version can only remove file and modify rootfiles/container. To modify or filter content of htmls, code needs to be upgraded. Probably some wrapper around zip.File structure which will give option to read from raw archive or hold file in buffer which will be modified. This way should save some memory.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL