From 5daaa029649418e37949e2fc0509b436c3dd2f11 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 7 Sep 2015 15:06:45 +0300 Subject: [PATCH] updated workflow scripts... Signed-off-by: Alex A. Naanou --- scripts/process-archive.sh | 7 +++++++ scripts/update-exif.sh | 13 ++++++++++--- ui (gen4)/lib/widget/browse.js | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/process-archive.sh b/scripts/process-archive.sh index 7d86fe03..c3270ad2 100755 --- a/scripts/process-archive.sh +++ b/scripts/process-archive.sh @@ -212,6 +212,7 @@ if [ -z $SKIP_PREVIEWS ] ; then #export TOTAL=$(find . -type d -name 'hi-res (RAW)' -exec ls "{}" \; | wc -l) # XXX do not know how to pass and modify a var... #export CUR=1 + #export TOTAL=`find . -path '*hi-res (RAW)/*.jpg' | wc -l` find . -path '*hi-res (RAW)/*.jpg' -exec bash -c 'makepreview "$SIZE" "{}"' \; fi @@ -224,6 +225,9 @@ if ! [ -z "$COMMON_PREVIEWS" ] ; then if ! [ -e "./$COMMON_PREVIEWS" ] ; then mkdir -p "./$COMMON_PREVIEWS" fi + #if [ -z $TOTAL ] ; then + # export TOTAL=`find . -path '*hi-res (RAW)/*.jpg' | wc -l` + #fi find . -type d \ -name 'preview (RAW)' \ -print \ @@ -235,6 +239,9 @@ fi # build cache... if [ -z $SKIP_CACHE ] ; then + #if [ -z $TOTAL ] ; then + # export TOTAL=`find . -path '*hi-res (RAW)/*.jpg' | wc -l` + #fi if ! [ -z "$COMMON_PREVIEWS" ] && [ -e "./$COMMON_PREVIEWS/preview (RAW)" ] ; then buildcache "./$COMMON_PREVIEWS/preview (RAW)" else diff --git a/scripts/update-exif.sh b/scripts/update-exif.sh index 6e71d975..9a34e68a 100755 --- a/scripts/update-exif.sh +++ b/scripts/update-exif.sh @@ -17,19 +17,26 @@ exifup(){ true } -# XXX this does not support absolute paths... if [[ $1 != "" ]] ; then if ! [ -d "$1" ] ; then echo "\"$1\": is not a directory." exit 1 fi - cd "./$1/DCIM/" + if [ -e "$1/DCIM/preview/" ] ; then + cd "$1/DCIM/" + else + cd "$1" + fi exifup ./preview/ exifup ./hi-res/ cd "$DIR" else for d in */DCIM/ ; do - cd "./$d" + if [ -e "$1/DCIM/preview/" ] ; then + cd "$d" + else + cd "$d/../" + fi exifup ./preview/ exifup ./hi-res/ cd "$DIR" diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js index 2d14d704..4698b8d2 100755 --- a/ui (gen4)/lib/widget/browse.js +++ b/ui (gen4)/lib/widget/browse.js @@ -16,6 +16,7 @@ if(typeof(module) !== 'undefined' && module.exports){ define(function(require){ var module = {} +console.log('>>> browse') // XXX