Bug 215990

Summary: Tagging files on external media using stored metadata and thumbnails
Product: [Applications] digikam Reporter: docali
Component: Database-ThumbsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: althio.forum, caulier.gilles
Priority: NOR    
Version: 1.0.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 7.5.0
Sentry Crash Report:

Description docali 2009-11-24 19:28:08 UTC
Version:            (using KDE 4.3.3)
OS:                Linux
Installed from:    openSUSE RPMs

Probable overlap with 191494

It would be great if it was possible to use the database stored metadata and stored previews to allow "offline" tagging of images on not connected external media.
Scenario: Large external Raid with images for security reasons. Images from a shot a loaded via laptop from cf cards and indexed with digikam. At home or back in the office images are transferred to the raid. Now the laptop has all relevant info.

It would be great if you could assign tags, soft rotate images and even better if you could mark images for deletion at next database sync. So the photographer could use travelling time to sort the images 

Thanks for your consideration
Comment 1 docali 2009-12-27 17:43:19 UTC
As a temporary workaround I made 2 Bash scripts

The first one extracts the Thumbnail from the NEF Raw file, adds _Preview, stores it in a folder with the suffix _preview.

This folder is then copied to my local disk and edited with digikam

Afterwards it tags be synced by Copying the XMP:TagsList back to the original NEF file. But at the moment exiftool doesn't support writing the XMP-digikam:TagsList Tag.

Here are my two script: 
#!/bin/bash
if [ $# -ne 1 ]  # Must have command-line args to use script.
then
  echo
   echo
  echo "usage: ${Scriptname} OriginalFolder"
  exit 
fi  

cd $1
TEMP=$1			#Produce PreviewFolder
TEMP2=$(basename $PWD)
DIR="${TEMP}${TEMP2}_Preview"
echo $DIR
mkdir $DIR
echo Extract Preview
echo ==============================
exiftool -b -PreviewImage -w ${DIR}/%f_Preview.JPG -ext NEF -r .
echo
echo
echo Copy original Tags
cd $DIR
exiftool -v0  -tagsfromfile ../%-.8f.NEF -r -ext JPG -overwrite_original --PreviewImage --ThumbnailImage .
echo
echo
echo Rotate
echo =====================
for i in *.JPG; do exiftran -a -g -i $i;done;


The second one to sync back

#!/bin/bash

PreviewDir=$1 
BasenamePreviewDir=${PreviewDir%/}  #Cut trailing /
BasenamePreviewDir=${BasenamePreviewDir##*/} #Cut all till last / 

OriginalDir=$2
BasenameOriginalDir=${OriginalDir%/}  #Cut trailing /
BasenameOriginalDir=${BasenameOriginalDir##*/} #Cut all till last / 
Scriptname=${0##*/}
Scriptname=${Scriptname%%.sh}

if [ $# -ne 2 ]  # Must have command-line args to use script.
then
  echo
  echo "Resync XMP and GPSTags to original NEF Files"
  echo
  echo "usage: ${Scriptname} PreviewOrdner OriginalOrdner"
  exit 
fi  

if [ ! ${BasenamePreviewDir##*_} = "Preview" ]
then
  echo "The first cmdline prm must be the Preview folder"
  exit
fi

if [ ! ${BasenamePreviewDir%%_Preview} = $BasenameOriginalDir ]
then
  echo "Preview Folder and Original Folder don't fit!"
  exit
fi

cd $2
echo $PWD
read -p "Press Key to start copying"
exiftool -v  -tagsfromfile ${1}%f_Preview.JPG "-XMP-digikam:TagsList" "-XMP:Subject" "-GPS:all"  -r -ext NEF -overwrite_original .
Comment 2 caulier.gilles 2014-08-24 08:22:41 UTC

*** This bug has been marked as a duplicate of bug 114539 ***
Comment 3 caulier.gilles 2022-01-12 13:15:22 UTC
Fixed with https://bugs.kde.org/show_bug.cgi?id=114539