1
0
Fork 0
mirror of https://github.com/NixOS/nix-pills synced 2024-09-16 03:30:13 -04:00

epub: Remove extra page breaks before headings

The sections are pretty short, leading to unnecessary pagination being required.
This commit is contained in:
Jan Tojnar 2024-04-06 23:42:05 +02:00
parent 3dd9e04dd9
commit 05407a5a2f

View file

@ -68,6 +68,8 @@
sed -Ei 's~(<h[1-6])(>.+) \{#([^\}]+)\}(</h[1-6]>)~\1 id="\3"\2\4~g' OEBPS/*.html
# Fix broken links in body.
sed -Ei 's/("[0-9a-z-]+\.)md(["#])/\1html\2/g' OEBPS/*.html
# Remove unnecessary page breaks, the sections are short.
substituteInPlace OEBPS/stylesheet.css --replace-fail "page-break-before: always;" ""
zip -q "../book/epub/Nix Pills.epub" **/*
)