mirror of
https://github.com/Phantop/dotfiles
synced 2025-04-23 13:24:34 +00:00
fish: add mutool-based pdf reflow
This commit is contained in:
parent
7a33f8f5d6
commit
42ac3f0327
10
fish/functions/reflow.fish
Normal file
10
fish/functions/reflow.fish
Normal 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
|
Loading…
Reference in a new issue