| Summary: | Tagging files on external media using stored metadata and thumbnails | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | docali |
| Component: | Database-Thumbs | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | CC: | althio.forum, caulier.gilles |
| Priority: | NOR | ||
| Version First Reported In: | 1.0.0 | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | 7.5.0 | |
| Sentry Crash Report: | |||
|
Description
docali
2009-11-24 19:28:08 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 .
*** This bug has been marked as a duplicate of bug 114539 *** Fixed with https://bugs.kde.org/show_bug.cgi?id=114539 |