Table des matières

Mes scripts pour Nautilus

Copier tous les fichiers sauf les RAW depuis un appareil photo raccordé en USB

leaveRawCp
#! /bin/bash
#Nautilus script that copy only non RAW files from camera to Disk
#Images are placed in /Your_destination/Year/Month/Day path
 
#Set extension of your RAW file here will not be copied. All other files wil be copied
RAW="NEF"
 
#Set root destination repositorie of your Picures
DESTINATION_REP=~/Images
 
for image in $NAUTILUS_SCRIPT_SELECTED_URIS
  do
      IMAGE_NAME=${image##*/} #${image##*/} Extract file name from URI
      if [[ ${IMAGE_NAME#*.} != $RAW ]] # ${image#*.} extract extension from file name
      then
          DESTINATION=$DESTINATION_REP/$(date -r $IMAGE_NAME +%Y)/$(date -r $IMAGE_NAME +%m)/$(date -r $IMAGE_NAME +%d)
          mkdir -p $DESTINATION
          cp $IMAGE_NAME $DESTINATION
      fi
done

Déplacer tous les fichiers sauf les RAW depuis un appareil photo raccordé en USB

leaveRawMv
#! /bin/bash
#Nautilus script that copy only non RAW files from camera to Disk
#Images are placed in /Your_destination/Year/Month/Day path
 
#Set extension of your RAW file here will not be copied. All other files wil be copied
RAW="NEF"
 
#Set root destination repositorie of your Picures
DESTINATION_REP=~/Images
 
for image in $NAUTILUS_SCRIPT_SELECTED_URIS
  do
      IMAGE_NAME=${image##*/} #${image##*/} Extract file name from URI
      if [[ ${IMAGE_NAME#*.} != $RAW ]] # ${image#*.} extract extension from file name
      then
          DESTINATION=$DESTINATION_REP/$(date -r $IMAGE_NAME +%Y)/$(date -r $IMAGE_NAME +%m)/$(date -r $IMAGE_NAME +%d)
          mkdir -p $DESTINATION
          mv $IMAGE_NAME $DESTINATION
      fi
done

Afficher la somme de contrôle MD5 d'un fichier

Dépendance : Zenity

Md5Sum
#! /bin/bash
zenity --info --title "MD5 Hash" --text $(md5sum $1)