better display of description and time for a single photo
[photo-tags.git] / create_thumbnails.sh
index d1be98dc7df13d6d7e00d80846abce00e35b4197..3a6ad69872484d06c43dbf4c6824a38751781430 100755 (executable)
@@ -1,5 +1,22 @@
 #!/bin/bash
 
+#    copyright 2012,2013 Arun Persaud <arun@nubati.net>
+#
+#    This file is part of photo-tags.
+#
+#    Photo-tags is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    Photo-tags is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with Photo-tags.  If not, see <http://www.gnu.org/licenses/>.
+
 NICE="nice -19"
 
 # init some variables
@@ -22,8 +39,16 @@ dbprefix=${dbprefix//\//\\\/}
 limit=`$NICE sqlite3 $LOCALDB "select count(*) from photos"`
 
 
+function usage()
+{
+  echo "Usage: $0 [OPTIONS]"
+  echo " Options:"
+  echo "          -r          remove metadata from pictures"
+  echo "          -l NUMBER   only process NUMBER pictures"
+}
+
 # parse command line
-while getopts ":rl:" opt; do
+while getopts ":rl:h" opt; do
   case $opt in
     r)
       removemeta=1
@@ -31,6 +56,10 @@ while getopts ":rl:" opt; do
     l)
       limit=$OPTARG
       ;;
+    h)
+      usage
+      exit 0
+      ;;
     \?)
       echo "Invalid option: -$OPTARG" >&2
       exit 1