Created
May 22, 2025 14:30
-
-
Save bonnebulle/62ec48150fbaa0e403b2bf39e0a5c269 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### | |
## WHAT + HOW | |
# THUNAR ACTION fusion PDFs -- using pdftk | |
# ACTION : /bin/bash /usr/bin/batch_pdf_fusion_inputs.sh %f %F | |
# -- Multi select files -- | |
# %f == current folder -> pwd | |
# %F == files | |
# | |
## ORG | |
# filelist="" | |
# for fichier in $(pwd)/*.pdf | |
# do | |
# echo "pdf : $fichier" | |
# filelist+=" "${fichier} | |
# done | |
## | |
filelist="${@:2}" | |
destination="${@:1}" | |
#echo | |
echo $filelist | |
notify-send.sh "TEST" "$filelist" -t 12000 -u low | |
#echo | |
first=$1 | |
# pwd=$(dirname ${first}) | |
pwd=$1 | |
cd $pwd | |
file_name=$(basename $2) | |
final_path_name=$pwd/FUS_${file_name} | |
echo $final_path_name | |
notify-send.sh "$file_name" "$final_path_name" -t 12000 -u low | |
notify-send.sh "$pwd" -t 12000 -u low | |
pdftk ${filelist} cat output ${final_path_name} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment