1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-25 00:03:29 +00:00

fish: add mutool-based pdf reflow

This commit is contained in:
Phantop 2024-07-23 09:26:32 -04:00
parent 7a33f8f5d6
commit 42ac3f0327

View file

@ -0,0 +1,10 @@
function reflow
argparse p/pdf -- $argv
parallel mutool convert -O preserve-images -o {.}.xhtml {} ::: $argv
if set -q _flag_pdf
parallel mutool convert -o {.}_reflow.pdf {.}.xhtml ::: $argv
else
parallel pandoc {.}.xhtml -o {.}.epub ::: $argv
end
parallel rm {.}.xhtml ::: $argv
end