mirror of
https://github.com/Phantop/dotfiles
synced 2024-12-22 05:06:59 +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