✨ Mergepdf function that I can't actually use
This commit is contained in:
parent
ae3d0197e6
commit
e86bc7ca88
1 changed files with 24 additions and 0 deletions
24
fish/.config/fish/functions/mergepdf.fish.symlink
Normal file
24
fish/.config/fish/functions/mergepdf.fish.symlink
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
function mergepdf -d "Merge PDF files, preserving hyperlinks"
|
||||
argparge 'h/help' -- $argv
|
||||
|
||||
if set -q _flag_h
|
||||
printf '%b' \
|
||||
"Merge PDF files, preserving hyperlinks.\n" \
|
||||
"\n" \
|
||||
"Usage: mergepdf [-h|--help] [input.pdf ...]\n" \
|
||||
"\n" \
|
||||
"Options:\n" \
|
||||
"-h|--help: Show this message.\n"
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
if [ "$(uname)" != "Darwin" ]
|
||||
echo "Sorry, this script is only for macOS!"
|
||||
return
|
||||
end
|
||||
|
||||
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=_merged.pdf $argv
|
||||
end
|
Loading…
Reference in a new issue