cat-dev-null/epub-tools
Some tools I've developed for creating EPUBs
- Shell 97.4%
- Just 2.6%
EPUB Tools
These are some tools I've created to help develop EPUB files. This repo is meant to be added as a submodule for another repo; see the Usage section for more details.
See .hasrc for necessary dependencies.
Goals:
- EPUB files pass well-established validation
- XHTML files are consistently formatted
content.opffiles are consistently formatted
Components:
.tidyrc- the config file fortidyjustfile- contains the formulae forjust- run
just --listto see available formulae
- run
opf-lint.fish- a script to lint thecontent.opffile so that it is of uniform format- pass the path to the config file using
-c/--config, or it will use the includedopf-lint-config.json
- pass the path to the config file using
zip_book.fish- compresses a folder into a valid.epubfile
Usage
As previously mentioned, This repo is meant to be added as a submodule for another repo, like so:
# you can change "tools" to whatever you like
git submodule add https://codeberg.org/cat-dev-null/epub-tools.git tools
and then create a justfile in your repo that imports the justfile in this repo. For example:
# You MUST define this as the directory you added the submodule as
epub_tools_dir := 'tools'
import 'tools/justfile'