Advertisement
phillips321

photo_thumbCreateAll.sh

May 9th, 2011
495
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.71 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # ---------------------------------------------------------------------
  4. # limitations: extensions supportés jpg JPG
  5. #
  6. # dépend des scripts suivant :
  7. # - photo_thumbElem.sh
  8. #    qui dépend de
  9. #    - photo_thumbCheckExist.sh
  10. #
  11. # Author/Contact : "ruchbach" sur nas-forum  // "ruchbach" on forum.synology.com
  12. # ---------------------------------------------------------------------
  13. # fichier de conf utilisé par /usr/syno/bin/synothumb:
  14. # /usr/syno/etc.defaults/thumb.conf
  15. #
  16.  
  17. # interface utilisateur
  18.  
  19.  
  20. # DISPLAY MULTILANGUE
  21. # --------------------------
  22. FR=`echo $LANG | grep fr | wc -l`
  23. if [ $FR == 1 ]
  24. then
  25.   echo " Ce script genere les miniatures pour photostation "
  26.   echo "---------------------------------------------------"
  27. else
  28.   echo " This script generates automatically thumbansil for photostation "
  29.   echo "-----------------------------------------------------------------"
  30. fi
  31.  
  32. # inputs
  33. # ------
  34.  
  35. # $1 = repertoire
  36. export inputDir="$1"
  37.  
  38. # récupère les jpg et JPG puis converti
  39. find "$inputDir" \( -type f -a \( -name "*.JPG" -o -name "*.jpg" \) ! -path "*@eaDir*" \) -exec photo_thumbElem.sh {} \;
  40.  
  41. # FINAL DISPLAY
  42. if [ $FR == 1 ]
  43. then
  44.   echo "--------------------------------------------"
  45.   echo "- il faut maintenant relancer l'indexation -"
  46.   echo "- pour que les miniatures soient prises en -"
  47.   echo "- compte dans photo-station                -"
  48.   echo "-------------------- FIN -------------------"
  49. else
  50.   echo "-----------------------------------------"
  51.   echo "- you should now launch re-index in DSM -"
  52.   echo "- for the thumbnails to be taken into   -"
  53.   echo "- account by photo-station              -"
  54.   echo "-------------------- END ----------------"
  55. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement