<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Thanks both. There's a whole range of different tag families I
need to deal with, so what I really need is a script that does
something like this:</p>
iterate through photos<br>
IF photo has tags<br>
iterate through tag tree AS $tag<br>
IF $tag has child tags<br>
remove $tag<br>
<br>
This leaves only each node of the tag hierarchy which has no
dependents.<br>
If there's nothing available to do this at present, I might have a
look at the schema and write an SQL query to do it.<br>
Thanks for the pointer on various EXIF fields being used for
tags/keywords.<br>
<br>
<div class="moz-cite-prefix">On 15/01/17 15:32, Andrey Goreev wrote:<br>
</div>
<blockquote
cite="mid:j9lnp5bls98o06k2oanoy5we.1484494347115@email.android.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div>I would try that on few files or on a folder and check the
results with "exiftool -s FILE " to make sure you like it.</div>
<div>Digikam writes tags to many metadata fields not only to
Keyword.</div>
<div><br>
</div>
<div>Also I think Digikam used to write a|aa|aca to the Keyword
field but now it only writes aca there but full hierarchy
a|aa|aca being written to XMP Keywords and other fields. </div>
<div>Please correct me if I wrong.</div>
<div><br>
</div>
<div id="composer_signature">
<div style="font-size:85%;color:#575757" dir="auto">Sent from my
Samsung Galaxy smartphone.</div>
</div>
<div><br>
</div>
<div style="font-size:100%;color:#000000"><!-- originalMessage -->
<div>-------- Original message --------</div>
<div>From: Remco Viëtor <a class="moz-txt-link-rfc2396E" href="mailto:remco.vietor@wanadoo.fr"><remco.vietor@wanadoo.fr></a> </div>
<div>Date: 2017-01-15 7:10 AM (GMT-07:00) </div>
<div>To: digiKam - Home Manage your photographs as a
professional with the power of open source
<a class="moz-txt-link-rfc2396E" href="mailto:digikam-users@kde.org"><digikam-users@kde.org></a> </div>
<div>Subject: Re: Batch processing to remove unwanted parent
tags? </div>
<div><br>
</div>
</div>
On dimanche 15 janvier 2017 12:44:50 CET Info Munky wrote:<br>
> Digikam 4.12.0 on Linux Mint 18 Cinnamon<br>
> <br>
> I'm considering moving from Shotwell (the simplicity of which
I like) to<br>
> Digikam, primarily because Shotwell doesn't easily allow me
to<br>
> dissociate RAW files from JPGs after import. I've been
experimenting<br>
> with Digikam, getting to grips with it and starting to really
love it!<br>
> <br>
> Main issue I need to resolve at the moment is how to remove
parent tags<br>
> (in my JPG metadata from Shotwell) where I have a child or
children of<br>
> that parent tag.<br>
> <br>
> If my tag hierarchy is something like this...<br>
> <br>
> a<br>
> aa<br>
> ab<br>
> ac<br>
> aca<br>
> b<br>
> ba<br>
> <br>
> ... and photo 1 has tag 'aca' set, I currently have tags 'a',
'ac' and<br>
> 'aca' showing against the photo either in the tool tip or
under the<br>
> thumbnail. I have seen that after removing 'a' and 'ac', the
photo still<br>
> shows up in a search for either of these tags, because 'aca'
is a<br>
> descendent. So I'd like to remove 'a' and 'ac' from photo 1
to remove<br>
> clutter when the tags are listed.<br>
> <br>
> Obviously I can remove these one by one, but am wondering
whether<br>
> there's a nice script somewhere to do this on a batch basis?<br>
> <br>
> Thanks<br>
<br>
In the left sidebar, you can search for /select images by tag over
the whole <br>
collection. Do that for your tag "aca", select all, and in the
right side bar <br>
uncheck the tags a and ac. That should do the trick. <br>
<br>
It gets a bit unpleasant if you have a very large tag tree,
though.<br>
</blockquote>
<br>
</body>
</html>