https://github.com/gromnitsky/epub-zip
Make/correct EPUB 3 OCF ZIP Container using libzip
https://github.com/gromnitsky/epub-zip
epub libzip
Last synced: 9 months ago
JSON representation
Make/correct EPUB 3 OCF ZIP Container using libzip
- Host: GitHub
- URL: https://github.com/gromnitsky/epub-zip
- Owner: gromnitsky
- Created: 2023-02-08T17:43:07.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-10T08:05:27.000Z (almost 3 years ago)
- Last Synced: 2025-01-20T06:42:15.294Z (11 months ago)
- Topics: epub, libzip
- Language: C
- Homepage:
- Size: 52.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
~~~
$ wc -l *.c
91 epub-zip.c
59 epub-zip-mimetype-fix.c
150 total
~~~
Set `EPUB_ZIP_DEBUG=1` env var for verbose mode.
## epub-zip
Makes a proper EPUB 3 OCF ZIP Container:
* automatically adds `mimetype` file entry as a 1st file without
compression & extra fields;
* doesn't compress already compressed files like jpegs;
* won't allow adding non-supported file types like symlinks.
Usage:
$ epub-zip out.epub `find src`
## epub-zip-mimetype-fix
Corrects a botched EPUB 3 OCF ZIP Container in-place:
* moves `mimetype` file to the 1st position in an archive;
* removes compression & extra fileds from `mimetype` file.
Usage:
$ epub-zip-mimetype-fix file.epub
## Compilation
~~~
$ sudo dnf install libzip-devel # tested with 1.9.2
$ make
~~~
## License
MIT.