1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-12-28 15:57:19 +00:00
dotfiles/fish/functions/reflow.fish

11 lines
324 B
Fish

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