TagSpaces is an offline, open source, document manager with tagging support
updating the thumb generation script to support linux
uggrock6ba92ca6078b
diff --git a/data/web/thumbgen.sh b/data/web/thumbgen.shindex 9f5b0d589..54970c705 100755--- a/data/web/thumbgen.sh+++ b/data/web/thumbgen.sh@@ -17,12 +17,19 @@ generate_thumbnails() {if [ "x$CHECKTYPE" == "ximage" ];thenthumbfile="$thumbdir/$(basename "$file").png"- CHECKSIZE=`stat -f "%z" "$file"` # this returns the filesizeCHECKWIDTH=`identify -format "%W" "$file"` # this returns the image width- FILEDATE=`stat -f "%c" "$file"` # this returns the file timestamp++ #CHECKSIZE=`stat -f "%z" "$file"` # MAC this returns the filesize+ CHECKSIZE=`stat -c %s "$file"` # LINUX this returns the filesize++ #FILEDATE=`stat -f "%c" "$file"` # MAC this returns the file timestamp+ FILEDATE=`stat -c %Z "$file"` # LINUX this returns the file timestamp++ #echo "File - $file - Date: $FILEDATE - Size: $CHECKSIZE"if [ -f "$thumbfile" ]; then- THUMBFILEDATE=`stat -f "%c" "$thumbfile"`+ #THUMBFILEDATE=`stat -f "%c" "$thumbfile"` # MAC+ THUMBFILEDATE=`stat -c "%Z" "$thumbfile"`if [ $THUMBFILEDATE -gt $FILEDATE ]; thenecho "$file is not changed"continue@@ -30,7 +37,7 @@ generate_thumbnails() {fi# next 'if' is true if either filesize >= 200000 bytes OR if image width >=201- if [ $CHECKSIZE -ge 200 ] || [ $CHECKWIDTH -ge 201 ]; then+ if [ $CHECKSIZE -ge 200000 ] || [ $CHECKWIDTH -ge 201 ]; thenecho "$file -> $thumbfile"convert -thumbnail 400 "$file" "$thumbfile"fi