cat-dev-null/epub-tools
1
0
Fork
You've already forked epub-tools
0
Some tools I've developed for creating EPUBs
  • Shell 97.4%
  • Just 2.6%
2026年04月10日 21:19:15 -06:00
.hasrc Initial commit, putting this stuff into its own repo for reuse 2026年04月02日 23:21:11 -06:00
.tidyrc Initial commit, putting this stuff into its own repo for reuse 2026年04月02日 23:21:11 -06:00
install-hooks.fish feat: changed around hook so more complex but flexible 2026年04月10日 21:19:15 -06:00
justfile feat: changed around hook so more complex but flexible 2026年04月10日 21:19:15 -06:00
LICENSE.md chore: added license 2026年04月10日 20:57:04 -06:00
opf-lint-config.json fix: spine entries can optionally have linear 2026年04月10日 12:45:55 -06:00
opf-lint.fish fix: spine entries can optionally have linear 2026年04月10日 12:45:55 -06:00
README.md Initial commit, putting this stuff into its own repo for reuse 2026年04月02日 23:21:11 -06:00
stamp-modified.fish feat: changed around hook so more complex but flexible 2026年04月10日 21:19:15 -06:00
update-modified.fish feat: changed around hook so more complex but flexible 2026年04月10日 21:19:15 -06:00
zip_book.fish fix: file order in zip deterministic 2026年04月10日 19:51:02 -06:00

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:

  1. EPUB files pass well-established validation
  2. XHTML files are consistently formatted
  3. content.opf files are consistently formatted

Components:

  • .tidyrc - the config file for tidy
  • justfile - contains the formulae for just
    • run just --list to see available formulae
  • opf-lint.fish - a script to lint the content.opf file so that it is of uniform format
    • pass the path to the config file using -c/--config, or it will use the included opf-lint-config.json
  • zip_book.fish - compresses a folder into a valid .epub file

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'