updated archive management scripts...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-03-28 02:16:33 +03:00
parent 6caf422ce7
commit b499255a7c
5 changed files with 84 additions and 27 deletions

View File

@ -117,9 +117,10 @@ JSON_NAME="%-:1d/${METADATA_DIR}/%f.json"
if [ -z $SKIP_ARCHIVE ] ; then
exiftool -if '$jpgfromraw' -b -jpgfromraw -w "$PREVIEW_NAME" \
-execute -if '$previewimage' -b -previewimage -w "$PREVIEW_NAME" \
-execute '-FileModifyDate<DateTimeOriginal' -tagsfromfile @ \
-srcfile "$PREVIEW_NAME" -overwrite_original \
-execute -j -w "$JSON_NAME" \
-execute '-FileModifyDate<DateTimeOriginal' -addtagsfromfile @ \
-srcfile "$PREVIEW_NAME" '-all>all' '-xmp' \
-overwrite_original \
-execute -j -G -w "$JSON_NAME" \
-common_args --ext jpg -r "./$ARCHIVE_ROOT" -progress
fi
@ -288,7 +289,7 @@ fi
# build cache...
if [ -z $SKIP_CACHE ] ; then
# a little tweak to make build cache work...
export PYTHONIOENCODING=UTF-8
export PYTHONIOENCODING=UTF-8
#if [ -z $TOTAL ] ; then
# export TOTAL=`find . -path '*hi-res (RAW)/*.jpg' | wc -l`
#fi

View File

@ -4,6 +4,16 @@ DATE=`date +%Y%m%d`
COUNT=1
TITLE=""
RSYNC=rsync
RSYNCFLAGS="-arptgoA --info=progress2,flist --human-readable"
CP=cp
CPFLAGS=-Rpfv
# override default...
COPY=$RSYNC
COPYFLAGS=$RSYNCFLAGS
# base mount dir...
# systems with /mnt
if [ -d /mnt ] ; then
@ -32,6 +42,8 @@ while true ; do
echo " process-archive.sh after copying."
echo " -b|-base the base dir to look for drives in"
echo " default: $BASE"
echo " --rsync use rsync (default)"
echo " --cp use cp"
echo
exit
;;
@ -52,6 +64,16 @@ while true ; do
BASE=1
shift
;;
-cp|--cp)
COPY=cp
COPYFLAGS=-Rpfv
break
;;
-rsync|--rsync)
COPY=$RSYNC
COPYFLAGS=$RSYNCFLAGS
break
;;
*)
break
;;
@ -118,29 +140,34 @@ while true ; do
# XXX do a real three digit count...
# single flash card...
SCOUNT=`printf "%03d" $COUNT`
if [ -z $MULTI ] ; then
DIR="./- ${DATE}.00${COUNT}${TITLE}/"
while [ -e "$DIR" ] ; do
DIR="${DATE}.${SCOUNT}${TITLE}"
while [ -e *"$DIR"* ] ; do
COUNT=$((COUNT+1))
DIR="./- ${DATE}.00${COUNT}${TITLE}/"
SCOUNT=`printf "%03d" $COUNT`
DIR="${DATE}.${SCOUNT}${TITLE}"
done
BASE_DIR=$DIR
# multiple flash cards shoot...
else
BASE_DIR="./- ${DATE}${TITLE}/"
DIR="${BASE_DIR}/${DATE}.00${COUNT}/"
while [ -e "$DIR" ] ; do
BASE_DIR="${DATE}${TITLE}/"
DIR="${BASE_DIR}/${DATE}.${SCOUNT}"
while [ -e *"$DIR"* ] ; do
COUNT=$((COUNT+1))
DIR="${BASE_DIR}/${DATE}.00${COUNT}/"
SCOUNT=`printf "%03d" $COUNT`
DIR="${BASE_DIR}/${DATE}.${SCOUNT}"
done
fi
# normalize paths...
BASE_DIR="./- ${BASE_DIR}/"
DIR="./- $DIR/"
mkdir -vp "$DIR"
echo "Copying files from $1..."
cp -Rpfv ${BASE}/${DRIVE}/* "$DIR"
$COPY $COPYFLAGS ${BASE}/${DRIVE}/* "$DIR"
echo "Copying files: done."

View File

@ -117,9 +117,10 @@ JSON_NAME="%-:1d/${METADATA_DIR}/%f.json"
if [ -z $SKIP_ARCHIVE ] ; then
exiftool -if '$jpgfromraw' -b -jpgfromraw -w "$PREVIEW_NAME" \
-execute -if '$previewimage' -b -previewimage -w "$PREVIEW_NAME" \
-execute '-FileModifyDate<DateTimeOriginal' -tagsfromfile @ \
-srcfile "$PREVIEW_NAME" -overwrite_original \
-execute -j -w "$JSON_NAME" \
-execute '-FileModifyDate<DateTimeOriginal' -addtagsfromfile @ \
-srcfile "$PREVIEW_NAME" '-all>all' '-xmp' \
-overwrite_original \
-execute -j -G -w "$JSON_NAME" \
-common_args --ext jpg -r "./$ARCHIVE_ROOT" -progress
fi
@ -288,7 +289,7 @@ fi
# build cache...
if [ -z $SKIP_CACHE ] ; then
# a little tweak to make build cache work...
export PYTHONIOENCODING=UTF-8
export PYTHONIOENCODING=UTF-8
#if [ -z $TOTAL ] ; then
# export TOTAL=`find . -path '*hi-res (RAW)/*.jpg' | wc -l`
#fi

View File

@ -4,6 +4,16 @@ DATE=`date +%Y%m%d`
COUNT=1
TITLE=""
RSYNC=rsync
RSYNCFLAGS="-arptgoA --info=progress2,flist --human-readable"
CP=cp
CPFLAGS=-Rpfv
# override default...
COPY=$RSYNC
COPYFLAGS=$RSYNCFLAGS
# base mount dir...
# systems with /mnt
if [ -d /mnt ] ; then
@ -32,6 +42,8 @@ while true ; do
echo " process-archive.sh after copying."
echo " -b|-base the base dir to look for drives in"
echo " default: $BASE"
echo " --rsync use rsync (default)"
echo " --cp use cp"
echo
exit
;;
@ -52,6 +64,16 @@ while true ; do
BASE=1
shift
;;
-cp|--cp)
COPY=cp
COPYFLAGS=-Rpfv
break
;;
-rsync|--rsync)
COPY=$RSYNC
COPYFLAGS=$RSYNCFLAGS
break
;;
*)
break
;;
@ -118,29 +140,34 @@ while true ; do
# XXX do a real three digit count...
# single flash card...
SCOUNT=`printf "%03d" $COUNT`
if [ -z $MULTI ] ; then
DIR="./- ${DATE}.00${COUNT}${TITLE}/"
while [ -e "$DIR" ] ; do
DIR="${DATE}.${SCOUNT}${TITLE}"
while [ -e *"$DIR"* ] ; do
COUNT=$((COUNT+1))
DIR="./- ${DATE}.00${COUNT}${TITLE}/"
SCOUNT=`printf "%03d" $COUNT`
DIR="${DATE}.${SCOUNT}${TITLE}"
done
BASE_DIR=$DIR
# multiple flash cards shoot...
else
BASE_DIR="./- ${DATE}${TITLE}/"
DIR="${BASE_DIR}/${DATE}.00${COUNT}/"
while [ -e "$DIR" ] ; do
BASE_DIR="${DATE}${TITLE}/"
DIR="${BASE_DIR}/${DATE}.${SCOUNT}"
while [ -e *"$DIR"* ] ; do
COUNT=$((COUNT+1))
DIR="${BASE_DIR}/${DATE}.00${COUNT}/"
SCOUNT=`printf "%03d" $COUNT`
DIR="${BASE_DIR}/${DATE}.${SCOUNT}"
done
fi
# normalize paths...
BASE_DIR="./- ${BASE_DIR}/"
DIR="./- $DIR/"
mkdir -vp "$DIR"
echo "Copying files from $1..."
cp -Rpfv ${BASE}/${DRIVE}/* "$DIR"
$COPY $COPYFLAGS ${BASE}/${DRIVE}/* "$DIR"
echo "Copying files: done."

View File

@ -1433,6 +1433,7 @@ var BrowserClassPrototype = {
// XXX render of nested lists does not affect the parent list(s)...
// ...need to render lists and items both as a whole or independently...
// XXX should this use vanilla DOM or jQuery???
// XXX add a left button type/option -- expand/collapse and friends...
var BrowserPrototype = {
__proto__: BaseBrowser.prototype,
@ -1644,7 +1645,7 @@ var BrowserPrototype = {
.run(function(){
// class...
// XXX should be done here or in the config???
this.classList.add('sub-list-header')
this.classList.add('sub-list-header', 'traversable')
item.collapsed
&& this.classList.add('collapsed')