This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

photo_thumbCreateAll.sh

By: phillips321 on May 9th, 2011  |  syntax: Bash  |  size: 1.71 KB  |  views: 390  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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
clone this paste RAW Paste Data