Author Topic: Keywords - what have I used?  (Read 16454 times)

Offline Boatguy

  • Member
  • **
  • Posts: 69
    • View Profile
Keywords - what have I used?
« on: June 24, 2012, 05:12:02 PM »
I understand from the Support forum that PM does not track Keyword usage.

I would like to request a feature that allows me to see what keywords have been used across all my photos.  Let's assume that I haven't always been entirely diligent in my coding and there may be some spelling and other errors.  I want to see what I've done, then I can use Search/Replace to tidy things up.

Alternatively, perhaps this will be part of the Catalog?  When the catalog is created will compile a list of all used keywords?

Thanks.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Keywords - what have I used?
« Reply #1 on: June 24, 2012, 06:25:42 PM »
Russ,

I understand from the Support forum that PM does not track Keyword usage.

I would like to request a feature that allows me to see what keywords have been used across all my photos.  Let's assume that I haven't always been entirely diligent in my coding and there may be some spelling and other errors.  I want to see what I've done, then I can use Search/Replace to tidy things up.

Alternatively, perhaps this will be part of the Catalog?  When the catalog is created will compile a list of all used keywords?

That would definitely be a feature best suited for a Catalog implementation.  At this time such a feature is not planned for version 1.0 but perhaps in a later version.

-Kirk

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Keywords - what have I used?
« Reply #2 on: June 24, 2012, 09:48:53 PM »
Hi Russ,

While this is not yet possible with PM, you could use eg. Exiftool to make a dump of all your keywords and then run some analytics on that. Would require some knowledge of scripting though, so this is not for everyone…
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline Luiz Muzzi

  • Hero Member
  • *****
  • Posts: 704
    • View Profile
    • Luiz Muzzi Photography
Re: Keywords - what have I used?
« Reply #3 on: June 28, 2012, 04:25:50 AM »
Hi, Hayo
I would also like to do that meanwhile with Exiftool.
Do you think I could do it on my own if I had the appropriate script?
TIA

-Luiz Muzzi

Offline arnklit

  • Newcomer
  • *
  • Posts: 6
    • View Profile
Re: Keywords - what have I used?
« Reply #4 on: June 30, 2012, 09:33:57 AM »
I, too, would like to have a list of unique keywords just at the click of a button.

In the meantime, this is how I do it. If you are on a MAC it is pretty easy:

First you need to get all the keywords. As someone suggested it can probably be done with tools like ExifTool, but you can also use PM itself.
Go to the navigator bar on the left. Right click a folder, even a top level one that contains all the subfolders. Select "Open folder and all subfolders in a new contact sheet"
When they all appear (it is best to have the the sort order set to "filename", otherwise it may take a while to sort them) you select them all with Cmd-A
Then in the File menu select "Export"
In the Export panel select "Text Exporter" as template. Leave Header and Footer text blank, and insert {keywords} in the middle field.
Select "Save all as one file" and click on Export
Specify a filename and location for the file. E.g. use mykwd.txt on the Desktop, and wait patiently for PM to scan all the selected files and create a textfile with all the keywords. In my case it takes about five mins for 20.000 NEF's

Once you've got the file you need to sort out the unique keywords.
If you are familiar with UNIX commands it is really a oneliner:
Open Terminal and go to the Desktop folder:

cd Desktop

and here is the oneliner:

cat mykwd.txt|sort|uniq > myuniq.txt

and you'll get a file named "myuniq.txt" with the unique keywords.

If you want to know how many times each individual keyword appears (useful for finding misspelled keywords) just add a "-c" as follows:

cat mykwd.txt|sort|uniq -c > myuniq.txt



Alternatively, you can open the textfile with Excel, select the entire first column, then use the automatic filter in the Data/Filter tab.

It may all sound difficult, but it really is pretty easy.


Hope this helps, Bo.

Offline Sven

  • Uber Member
  • ******
  • Posts: 1053
    • View Profile
Re: Keywords - what have I used?
« Reply #5 on: June 30, 2012, 12:00:56 PM »
Hi Bo!

Thanks for the oneliner.

Code: [Select]
cat mykwd.txt|sort|uniq > myuniq.txt
I did nearly the same but used a spreadsheet app for sorting.

Also the "open folder and subfolder" works. I used this since months.
I am currently having the issue (limitation of memory usage by PM) that my main-folders contain more that 200.000 images each.
BR
Sven
After 5 years of absence I restarted the photography.

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Keywords - what have I used?
« Reply #6 on: June 30, 2012, 12:06:58 PM »
As Bo suggest, you can do this with PM itself. Loading all files on a single contact sheet can, however, take some time and if it really is a large number of files, it won't work as PM will run out of memory.

To get all used keywords in a text file, use exiftool like this:
exiftool -r -q -T -Keywords <directory>
This outputs all keywords, the problem is that files with multiple keywords get them listed as comma separated values. Tom split those, use a very simple perl command:
perl -pe 's/, /\n/g;'
To get the unique keywords, pipe through sort -u, or if you want to count as well, though sort and uniq -c.
So the whole command becomes something like:

exiftool -r -q -T -Keywords <directory>| perl -pe 's/, /\n/g;' | sort -u
or
exiftool -r -q -T -Keywords <directory>| perl -pe 's/, /\n/g;' | sort | uniq -c

(Substitute <directory> for the root directory of your images and note that files without keywords are listed with “-” as keyword.)

Note: if you're running windows, you'll need to have e.g., perl and sort commands installed or use other tools.
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline Sven

  • Uber Member
  • ******
  • Posts: 1053
    • View Profile
Re: Keywords - what have I used?
« Reply #7 on: July 01, 2012, 01:46:32 AM »
Hayo,

That worked as a charm!
Many thanks for that!

Sven
After 5 years of absence I restarted the photography.

Offline Luiz Muzzi

  • Hero Member
  • *****
  • Posts: 704
    • View Profile
    • Luiz Muzzi Photography
Re: Keywords - what have I used?
« Reply #8 on: July 03, 2012, 04:00:45 AM »
Thanks a lot , Hayo.
You were really kind in sharing this and other "tips" with us.
Regards,

-Luiz Muzzi

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Keywords - what have I used?
« Reply #9 on: July 03, 2012, 12:00:57 PM »
Thanks a lot , Hayo.
You were really kind in sharing this and other "tips" with us.
Regards,

Hi Luiz,

You are most welcome! Playing with terminal commands is something I quite like doing; these questions are therefore actually a good excuse for me to have some fun ;)

Cheers,
Hayo
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline Luiz Muzzi

  • Hero Member
  • *****
  • Posts: 704
    • View Profile
    • Luiz Muzzi Photography
Re: Keywords - what have I used?
« Reply #10 on: July 06, 2012, 05:16:41 PM »
Hi, Hayo
Is this something that will be easier to do with the catalogue feature of PM5?
TIA,

-Luiz Muzzi

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Keywords - what have I used?
« Reply #11 on: July 06, 2012, 05:30:12 PM »
Luiz,

Is this something that will be easier to do with the catalogue feature of PM5?

That sort of query is usually handled by a catalog application, yes.

-Kirk

Offline Luiz Muzzi

  • Hero Member
  • *****
  • Posts: 704
    • View Profile
    • Luiz Muzzi Photography
Re: Keywords - what have I used?
« Reply #12 on: July 06, 2012, 07:04:41 PM »
Thanks for your quick reply, Kirk.
I upgraded yesterday to 4.6.9 (that was the link that came with the registration e-mail) and right after downloaded the beta version of PM5.
I gather that when ready, you will give registered users the option to either download the final version of PM5 or the catalogue one by paying the difference, is not so?
TIA

-Luiz Muzzi

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Keywords - what have I used?
« Reply #13 on: July 06, 2012, 07:26:32 PM »
Luiz,

Thanks for your quick reply, Kirk.
I upgraded yesterday to 4.6.9 (that was the link that came with the registration e-mail) and right after downloaded the beta version of PM5.
I gather that when ready, you will give registered users the option to either download the final version of PM5 or the catalogue one by paying the difference, is not so?

Well PM5 will be available before the Cataloging module is available.  If you own PM5 and later wish to add Cataloging (once it is available), then you can purchase just the Cataloging module and it will work with your existing PM5 license.

-Kirk

Offline Bengt

  • Newcomer
  • *
  • Posts: 8
    • View Profile
Re: Keywords - what have I used?
« Reply #14 on: June 10, 2014, 09:19:20 AM »
I guess it still will take some time to get the catalog. Until then, Kirk, what is your advise. I need to be able to  search for keywords and capture words. I use  Windows. With Mac I think it is possible to do this kind of searches for  images in a mainfolder and folders under the main folder. Until the new catalog is ready to bye could you not give us just this possibility in Windows, (beta version?). If not, what search program should I use to be able to easy implement my work into your catalog?