Author Topic: Code replacements to define folder name when saving  (Read 524 times)

Offline aeschi

  • Newcomer
  • *
  • Posts: 9
    • View Profile
Code replacements to define folder name when saving
« on: August 10, 2020, 11:26:30 AM »
Hi there,

I'm struggling with the following:
I will shoot portraits of people from a sports organization. There are 24 different teams with more than 440 individuals. Every individual is assigned to one team.
I created a code replacement file that looks as follows:

0101   Marc Mueller   NLA
0102   Tim Tomlinson   NLA
0103   Roger Hopkins   NLA
0201   Tiger Forrest   U21
0202   Spider Murphy   U21
....

The first two digits represent the team (01 = NLA, 02 = U21) and the other two the player.

During or after the shooting I will use the code replacement to label the files before I save them.
When I save the pictures they should go into separate folders, depending on the team. All pictures of players from team NLA should got into the folder "NLA" and so on.

I'm pretty sure that one can solve this, but currently I'm lacking the starting point. Any ideas? Thank you very much.

Best regards,
Markus

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21672
    • View Profile
    • Camera Bits, Inc.
Re: Code replacements to define folder name when saving
« Reply #1 on: August 10, 2020, 12:31:11 PM »
Markus,

I'm struggling with the following:
I will shoot portraits of people from a sports organization. There are 24 different teams with more than 440 individuals. Every individual is assigned to one team.
I created a code replacement file that looks as follows:

0101   Marc Mueller   NLA
0102   Tim Tomlinson   NLA
0103   Roger Hopkins   NLA
0201   Tiger Forrest   U21
0202   Spider Murphy   U21
....

The first two digits represent the team (01 = NLA, 02 = U21) and the other two the player.

During or after the shooting I will use the code replacement to label the files before I save them.
When I save the pictures they should go into separate folders, depending on the team. All pictures of players from team NLA should got into the folder "NLA" and so on.

I'm pretty sure that one can solve this, but currently I'm lacking the starting point. Any ideas? Thank you very much.

As long as there is some camera-provided metadata that PM can access via a {variable} to get those "0101", "0102", etc. values then this should be achievable.  Where will you be getting those values?

-Kirk

Offline aeschi

  • Newcomer
  • *
  • Posts: 9
    • View Profile
Re: Code replacements to define folder name when saving
« Reply #2 on: August 10, 2020, 12:42:02 PM »
0101 is just an identifier, not something from the camera.
But I can provide this identifier in any given field in the IPTC stationary pad.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21672
    • View Profile
    • Camera Bits, Inc.
Re: Code replacements to define folder name when saving
« Reply #3 on: August 10, 2020, 12:47:28 PM »
Markus,

0101 is just an identifier, not something from the camera.
But I can provide this identifier in any given field in the IPTC stationary pad.

You may have a chicken and egg problem there.  I'd have to check when the metadata is applied vs. when the folder creation occurs.  Generally for this type of goal, editors use the {serial} variable and have the serial numbers for each camera in the code replacement file.  As long as the cameras are not shared mid-event, this works out fine, even if a single photographer has multiple cameras (it's OK for multiple codes (serial numbers) map to the same replacement).

-Kirk

Offline aeschi

  • Newcomer
  • *
  • Posts: 9
    • View Profile
Re: Code replacements to define folder name when saving
« Reply #4 on: August 10, 2020, 12:57:29 PM »
I imagine my workflow as follows:
1. I ingest all pictures into the same folder.
2. Then I crop the pictures and assign the identifier to the IPTC/metadata info, e.g. to the field "Description", depending on the player on the picture.
3. When done, I save the pictures. In this step, the pictures are saved to the folder according to the team of the player (that can be found in the code replacement file).

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21672
    • View Profile
    • Camera Bits, Inc.
Re: Code replacements to define folder name when saving
« Reply #5 on: August 10, 2020, 01:25:22 PM »
I imagine my workflow as follows:
1. I ingest all pictures into the same folder.
2. Then I crop the pictures and assign the identifier to the IPTC/metadata info, e.g. to the field "Description", depending on the player on the picture.
3. When done, I save the pictures. In this step, the pictures are saved to the folder according to the team of the player (that can be found in the code replacement file).

OK, that should be doable.  So let's say you put your identifier in "Edit Status".  I've changed it from "Description" since that implies an entire caption and that won't work at all as a code.  Then when you save, in your Destination you'd enter:

\{status}#2\

The folder will be either "NLA" or "U21" depending on what {status} evaluates to.

That should do it.

-Kirk

Offline aeschi

  • Newcomer
  • *
  • Posts: 9
    • View Profile
Re: Code replacements to define folder name when saving
« Reply #6 on: August 10, 2020, 01:38:14 PM »
Cool, this works. However, it only worked with the variable {edit}.

Thank you very much, Kirk!!