IPTC and Tags

wink_wink

Joined: 2012-10-24
Posts: 10
Posted: Wed, 2012-10-24 18:38

I had hoped it wouldn't come to this. I've really tried but....this time I need some help!

I've got IPTC data in all my photos (from Iview Media Pro) but some tags are in the IPTC Contacts field. I'd like these AND the IPTC Keywords to appear in the Popular Tags field of my Gallery.

I have edited /tag/helpers/tag_event.php so that it picks up EITHER IPTC Contacts OR Keywords by changing the following...

if (!empty($iptc["2#118"])) {
foreach($iptc["2#118"] as $tag) {

to

if (!empty($iptc["2#025"])) {
foreach($iptc["2#025"] as $tag) {

but I need some code help so that the /tag/helpers/tag_event.php looks at BOTH fields and puts them into the Popular Tags sidebar.

Any help would be so greatly appreciated!

Thanks!
Peter

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Wed, 2012-10-31 19:49
Quote:
but I need some code help so that the /tag/helpers/tag_event.php looks at BOTH fields and puts them into the Popular Tags sidebar.

That could create a mess. What if the caption really has a caption? How are the tags separated? You'd be better off just moving the tags to the appropriate fields.

 
undagiga

Joined: 2010-11-26
Posts: 693
Posted: Wed, 2012-10-31 23:20

I've got a roughly similar situation, and what I do is as tempg suggests, move them to where they're most useful during import. I do this by modifying modules/exif/helpers/exif.php . There is a standard hack to this file that imports IPTC object name as Title in G3. At a quick search I couldn't find it, perhaps someone else knows where it is. I *think* that you could edit this file so that the other fields are added to keywords and from there to tags during import, although keywords is different to other fields.

Of course that doesn't deal with images already imported. You may be able to mark EXIF as dirty and refresh it, but IIRC that won't change tags if an image already has some. I agree with tempg that displaying something as a tag that isn't really a tag in the G3 DB is likely to cause problems.

All I can think of is a custom build module just for doing the migration.

 
wink_wink

Joined: 2012-10-24
Posts: 10
Posted: Thu, 2012-11-01 08:07

Ok -thanks for feedback and views.
Problem is that I have 28,000 images and I don't really want to have to re-tag all the masters by moving the IPTC data from 'Contacts' into 'Keywords' just for this purpose.

I'll take a look at modules/exif/helpers/exif.php (thanks undagiga) and see where that leads me....
For what its worth, I don't mind re-importing images again if a hack to this file means that I get 'Contacts' added into the 'Keywords' of my G3.

(Of course....I'm feeling that eventually I'm going to end up re-tagging masters though. I sense the direction this is going! In anticipation of that, if anyone has suggestion of a Mac tool which will do that 'insert IPTC contacts into IPTC Keywords' process quickly, then I'd be happy to hear from them!)

If I find a way, I will post back a solution because I'm sure I'm not the only one correcting the iView Media Pro tagging topic.

Cheers,
Peter

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Thu, 2012-11-01 21:55

Never used it, don't really know what it does, not saying it will work or do anything close to what you're looking for, but it's free to try. -> http://www.tow.com/annoture/

 
undagiga

Joined: 2010-11-26
Posts: 693
Posted: Tue, 2012-11-06 00:43

If you're prepared to reimport then there is a range of software that can manipulate image IPTC.

If you're on Win then iMatch allows you to script this kind of thing, although it may be overkill for what you want. It's not free but it's not expensive and it's a powerful DAM.

I would think that you could write an ExifTool batch job to do this. Again, not simple to work out, but ExifTool is powerful and free. You certainly can use ExifTool to copy information from one IPTC field to another. What I'm less certain about is how to add to existing keywords using ExifTool, but I'm fairly sure that it could be done.

 
wink_wink

Joined: 2012-10-24
Posts: 10
Posted: Tue, 2012-11-06 18:53

Just to update the thread...
I'm going to add new keywords manually. I looked at ExifTool (thanks again undagiga) but its too risky for my skill set. As you suggest, I can't see a way to add to existing keywords so, the safest route for me is to add new keywords from inside iView.
Here we go!....
Will probably be back with loads more questions as I evolve my Gallery.
Thanks as usual!

Peter