mirror of
https://github.com/Phantop/dotfiles
synced 2024-11-21 14:22:45 +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