Last active
April 10, 2019 05:36
-
-
Save CSaratakij/c0a3631c8c90581e10fe4ad2a93601fd to your computer and use it in GitHub Desktop.
Nautilus convert .pdf to .jpg script intregation (multiple select files support)
This file contains 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 | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
COUNTER=0 | |
echo -e "Start converting files..." | |
notify-send "Start converting files..." | |
for path in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do | |
COUNTER=$(($COUNTER+1)) | |
echo -e "Converting File: $path" | |
echo -e $path | xargs -i convert -density 300 "$path" "${path%\.pdf}.jpg" & | |
done | |
wait | |
echo -e "Done" | |
notify-send "Done : convert $COUNTER files" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment