Author Topic: What's the trick to sorting IPTC lists?  (Read 500 times)

Offline Rob Hedge

  • Member
  • **
  • Posts: 55
    • View Profile
What's the trick to sorting IPTC lists?
« on: July 06, 2022, 12:50:36 PM »
I'm making a cities.txt file for use with the IPTC Template "City" field. I'd like the cities to appear sorted by country and then alphabetically. Taking a cue from Structured Keyword Lists, I hoped that placing countries in square brackets would turn them into categories and that associated cities would appear under each category alphabetically. As can be seen below, this didn't work, even when I used both square brackets and a tab.

In PM, square brackets just group the countries at the end of the list. I tried using a % symbol, a // and <!-- -->, but these just grouped the countries at the beginning of the list instead of at the end :)

I'm hoping that I've simply missed the syntax for ordering items in IPTC lists. As a practical matter, this isn't a big deal for "City". However, "City" isn't the only IPTC list that I'd like to order in a way that isn't strictly alphabetical, and an inability to organise sorting in some other cases will be an annoyance. I'm also happy to use the Apple spreadsheet app Numbers if that would make doing this simpler. If there's a set of rules for the syntax of these lists, it would also be great to know where they are.


« Last Edit: July 06, 2022, 02:24:42 PM by Rob Hedge »
Processing: Mac Studio, Photo Mechanic Plus, Capture One

Image Formats: Leica DNG, Apple HEIC, TIFF, JPEG, MOV

Offline ahoward

  • Camera Bits Staff
  • Sr. Member
  • *****
  • Posts: 316
    • View Profile
Re: What's the trick to sorting IPTC lists?
« Reply #1 on: July 06, 2022, 03:43:37 PM »
There's no trick. The lists are simply sorted alphabetically, there is no hierarchical way to order them at the moment. Feel free to post a feature request for how you'd like to see the functionality of these windows improve.

Offline Rob Hedge

  • Member
  • **
  • Posts: 55
    • View Profile
Re: What's the trick to sorting IPTC lists?
« Reply #2 on: July 08, 2022, 06:07:41 AM »
There's no trick. The lists are simply sorted alphabetically, there is no hierarchical way to order them at the moment. Feel free to post a feature request for how you'd like to see the functionality of these windows improve.

Thanks. I've figured out that I can accomplish the same thing by creating a list for each "category" (for example, a US Cities list and a Canadian Cities list), and loading the appropriate list as required. I want to try this approach for the various IPTC fields before deciding whether to submit a feature request. My objective is to reduce irrelevant clutter in the IPTC drop-down menus , and individual category lists actually do a better job of that than the ability to sort a drop-down menu. Changing out lists is straightforward and takes a negligible amount of time.
« Last Edit: July 08, 2022, 07:11:57 AM by Rob Hedge »
Processing: Mac Studio, Photo Mechanic Plus, Capture One

Image Formats: Leica DNG, Apple HEIC, TIFF, JPEG, MOV