Misko_2083
Member
- Joined
- Mar 15, 2015
- Messages
- 306
- Reaction score
- 18
Ovo je moja verzija skripta za Thunar custom akcije za rotaciju slika ili fotografija.
Napravite gimp-rotate.sh bilo gde želite sledeće sadržine:
Napravite da skript bude izvršni (chmod +x)
Sada, podesite Thunar
Napravite gimp-rotate.sh bilo gde želite sledeće sadržine:
Code:
#!/bin/sh
[HEADING=1]Rotate with python-fu[/HEADING]
if [ $# -ne 2 ];
then
echo ‘Usage: gimp-rotate.sh “file” [right|left|180]’
exit
fi
case “$2” in
right)
OPT=0
;;
left)
OPT=2
;;
180)
OPT=1
;;
*)
echo ‘Usage: gimp-rotate.sh “file” [right|left|180]’
exit
;;
esac
gimp -d -i --batch-interpreter=python-fu-eval -b - << EOF
import gimpfu
def rotate(filename):
img = pdb.gimp_file_load(filename, filename)
layer = pdb.gimp_image_merge_visible_layers(img, 1)
pdb.gimp_image_rotate(img, ‘${OPT}’)
pdb.gimp_file_save(img, layer, filename, filename)
pdb.gimp_image_delete(img)
rotate(’${1}’)
pdb.gimp_quit(1)
EOF
Sada, podesite Thunar
- Name: Rotate Right
Description: Rotate Right with GIMP
Command: for file in %F; do /path/to/gimp-rotate.sh $file right; done
Appearance: * - Images
- Name: Rotate Left
Description: Rotate Left with GIMP
Command: for file in %F; do /path/to/gimp-rotate.sh $file left; done
Appearance: * - Images
- Name: Rotate 180
Description: Rotate 180 with GIMP
Command: for file in %F; do /path/to/gimp-rotate.sh $file 180; done
Appearance: * - Images
Testirano na TRIOS Mia
Last edited: