]> zdv2.bktei.com Git - BK-2020-03.git/blobdiff - user/gthumb/keep.org
fix(user/bkfeh):Use webp, not webm
[BK-2020-03.git] / user / gthumb / keep.org
index c5548cd0e480800ebdf1cdb820655b0dda63caf5..a4c1c61a5ba5f643152741a815648bed7b071136 100644 (file)
@@ -8,11 +8,11 @@ kept in a ~keep/~ directory along with any adjacent files that share
 the same stem located within the same directory
 (e.g. ~dir1/file123.*~). Also moved are matching files in directories
 neighboring the originalʼs parent directory (e.g. ~dir2/file123.*~).
 the same stem located within the same directory
 (e.g. ~dir1/file123.*~). Also moved are matching files in directories
 neighboring the originalʼs parent directory (e.g. ~dir2/file123.*~).
-The destination trash directory is ~keep~; parent directories ~JPG/~
+The destination directory is ~keep~; parent directories ~JPG/~
 and ~ARW/~ (e.g. ~dir1~, ~dir2~) are preserved within ~keep/~.
 
 ** Stats
 and ~ARW/~ (e.g. ~dir1~, ~dir2~) are preserved within ~keep/~.
 
 ** Stats
-Version: 0.0.2
+Version: 0.0.3
 License: GPLv3+
 gThumb version: ~3.12.6~
 Suggested keyboard shortcut: ~Shift + K~
 License: GPLv3+
 gThumb version: ~3.12.6~
 Suggested keyboard shortcut: ~Shift + K~
@@ -30,11 +30,11 @@ following moves are performed:
 - ~JPG/DSC01001.JPG.ots~ is moved to ~keep/JPG/DSC01001.JPG.ots~
 - ~ARW/DSC01001.ARW~ is moved to ~keep/ARW/DSC01001.ARW~
 
 - ~JPG/DSC01001.JPG.ots~ is moved to ~keep/JPG/DSC01001.JPG.ots~
 - ~ARW/DSC01001.ARW~ is moved to ~keep/ARW/DSC01001.ARW~
 
-Thus, by browsing ~JPG/~ in gThumb and performing *keep* on defsired
-photos, related photos from not only ~JPG/~, ~ARW/~ and
-other similar directories are moved for preservation in ~keep/~.
+Thus, by browsing ~JPG/~ in gThumb and performing *keep* on desired
+photos, related photos from not only ~JPG/~, ~ARW/~ and other similar
+directories are moved for preservation in ~keep/~.
 
 
-Then, it is upon the user to archive the contents of ~keep/~ to.
+Then, it is upon the user to archive the contents of ~keep/~.
 
 ** Code
 Paste the code below into the ~Command~ field of the ~Edit Command~
 
 ** Code
 Paste the code below into the ~Command~ field of the ~Edit Command~
@@ -42,13 +42,16 @@ window under 🔧 → Personalize… .
 
 Line-by-line view:
 #+BEGIN_EXAMPLE
 
 Line-by-line view:
 #+BEGIN_EXAMPLE
-# keep v0.0.2
+# keep v0.0.3
 fdebug=/tmp/gtlogkeep.txt;
 f=%F;
 fBase="$(basename "$f")";
 fne="${fBase%.*}";
 dppar="$(dirname %P)";
 dKeep="${dppar}/keep";
 fdebug=/tmp/gtlogkeep.txt;
 f=%F;
 fBase="$(basename "$f")";
 fne="${fBase%.*}";
 dppar="$(dirname %P)";
 dKeep="${dppar}/keep";
+if [ -z "$fne" ]; then printf "FATAL: Empty stem from:%s\n" "$fne" 1>>"$fdebug" 2>&1; exit 1; fi;
+runDate="$(date -Is 2>&1)";
+printf "STATUS:runDate:%s\n" "$runDate" 1>>"$fdebug" 2>&1;
 printf "DEBUG:fdebug:%s\n" "$fdebug" 1>>"$fdebug" 2>&1;
 printf "DEBUG:f:%s\n" "$f" 1>>"$fdebug" 2>&1;
 printf "DEBUG:fBase:%s\n" "$fBase" 1>>"$fdebug" 2>&1;
 printf "DEBUG:fdebug:%s\n" "$fdebug" 1>>"$fdebug" 2>&1;
 printf "DEBUG:f:%s\n" "$f" 1>>"$fdebug" 2>&1;
 printf "DEBUG:fBase:%s\n" "$fBase" 1>>"$fdebug" 2>&1;
@@ -59,17 +62,16 @@ for fsrc in "${dppar}"/*/"${fne}".*; do
   if [ ! -e "$fsrc" ]; then continue; fi;
   sdname="$(basename "$(dirname "$fsrc")" )";
   ddest="${dKeep}/${sdname}";
   if [ ! -e "$fsrc" ]; then continue; fi;
   sdname="$(basename "$(dirname "$fsrc")" )";
   ddest="${dKeep}/${sdname}";
-  printf "DEBUG:fsrc:%s\n" "$fsrc";
-  printf "DEBUG:sdname:%s\n" "$sdname";
-  printf "DEBUG:ddest:%s\n" "$ddest";
-  echo "foo" 1>>"$fdebug" 2>&1;
+  printf "DEBUG:fsrc:%s\n" "$fsrc" 1>>"$fdebug" 2>&1;
+  printf "DEBUG:sdname:%s\n" "$sdname" 1>>"$fdebug" 2>&1;
+  printf "DEBUG:ddest:%s\n" "$ddest" 1>>"$fdebug" 2>&1;
   if [ ! -d "$ddest" ]; then
   if [ ! -d "$ddest" ]; then
-    printf "DEBUG:Destination dir does not exist. Creating:%s\n" "$ddest";
+    printf "DEBUG:Destination dir does not exist. Creating:%s\n" "$ddest" 1>>"$fdebug" 2>&1;
     mkdir -p "$ddest";
   else
     mkdir -p "$ddest";
   else
-    printf "DEBUG:Destination dir exists:%s\n" "$ddest";
+    printf "DEBUG:Destination dir exists:%s\n" "$ddest" 1>>"$fdebug" 2>&1;
   fi;
   fi;
-  printf "STATUS: Moving %s → %s\n" "$fsrc" "$ddest/";
+  printf "STATUS: Moving %s → %s\n" "$fsrc" "$ddest/" 1>>"$fdebug" 2>&1;
   mv -n "$fsrc" "$ddest/";
 done 1>>"$fdebug" 2>&1;
 sleep 1;
   mv -n "$fsrc" "$ddest/";
 done 1>>"$fdebug" 2>&1;
 sleep 1;