Author Topic: OR variables during ingest  (Read 129 times)

Offline ejhutch

  • Newcomer
  • *
  • Posts: 8
    • View Profile
OR variables during ingest
« on: November 24, 2021, 05:31:12 AM »
Hi,
Is it possible to OR variables when Ingesting (or whenever applying variables to metadata) depending on whether they are defined?

I'd like to set up a general ingest task that ingests images into folders based on the {artist} OR {id} OR {owner} OR {user} OR {comment} variables depending on which one is defined in the metadata of the image to be ingested.

From the Variables Window:
{artist} - TIFF Artist field written by some cameras.
{id} - Either {owner} (Canon) or {comment} (Nikon).
{owner} - Camera's owner (if defined; same as {user}).
{user} - Camera's user (if defined; same as {owner}).
{comment} - The comment (written by some cameras).

Can I do something like include {artist|id|owner|user|comment} in the Folder Name field in the ingest dialog window? The result would expand to whichever variable was able to be resolved first.

Thanks.
Ed

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 23356
    • View Profile
    • Camera Bits, Inc.
Re: OR variables during ingest
« Reply #1 on: November 24, 2021, 03:25:13 PM »
Ed,

Is it possible to OR variables when Ingesting (or whenever applying variables to metadata) depending on whether they are defined?

I'd like to set up a general ingest task that ingests images into folders based on the {artist} OR {id} OR {owner} OR {user} OR {comment} variables depending on which one is defined in the metadata of the image to be ingested.

From the Variables Window:
{artist} - TIFF Artist field written by some cameras.
{id} - Either {owner} (Canon) or {comment} (Nikon).
{owner} - Camera's owner (if defined; same as {user}).
{user} - Camera's user (if defined; same as {owner}).
{comment} - The comment (written by some cameras).

Can I do something like include {artist|id|owner|user|comment} in the Folder Name field in the ingest dialog window? The result would expand to whichever variable was able to be resolved first.

No, there's no such feature, but I think it's a good idea.  I'll move this to the Feature Requests board.

-Kirk

Offline ejhutch

  • Newcomer
  • *
  • Posts: 8
    • View Profile
Re: OR variables during ingest
« Reply #2 on: November 25, 2021, 02:36:02 PM »
Would you want to kill me then for asking for full regular expression pattern matching support (Such as PCREs) when expanding variables? Because I am. Thanks!
Ed

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 23356
    • View Profile
    • Camera Bits, Inc.
Re: OR variables during ingest
« Reply #3 on: November 25, 2021, 08:21:43 PM »
Ed,

Would you want to kill me then for asking for full regular expression pattern matching support (Such as PCREs) when expanding variables? Because I am. Thanks!

I'm not against such a thing (we already have an engine in PM for this) but what would the syntax look like?

-Kirk