Author Topic: Mapping Camera Model  (Read 11948 times)

Offline karlmz

  • Member
  • **
  • Posts: 77
    • View Profile
Mapping Camera Model
« on: March 31, 2008, 03:08:40 AM »
I recently bought PM and I want to say first of all that I am very pleased with it. I have a question that may have been answered before, if so please forgive me for bringing it up again.

I have until now been using Downloader Pro (DP) for ingesting and I have renamed pictures according to the scheme:

{year4}-{month0}-{day0} {model}_{frame:-4,4} (using the PM notation),

but with the difference that I shortened {model}, which can be quite long, with the mapping feature of DP, which basically works like this:

IF {model} = "camera_model_name_that_you_want _to_shorten" THEN
   {model} = "short_camera_model_name"
ENDIF

where short_camera_model_name can be defined arbitrarily by the user. I have, for instance, shortened a {model} like Canon PowerShot A530 to A530, and Nikon D80 to D80. You can also do this in PM by using variable substring extraction, but I cannot get that to conform exactly to the way I have renamed pictures with DP, because of the different lengths of the short_camera_model_names that I have chosen.

This is a minor thing, but it would be nice to be able to rename in the same way as before. Is there a way to accomplish that with PM?

Thanks,

Karl

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Mapping Camera Model
« Reply #1 on: March 31, 2008, 04:30:27 AM »
Karl,

With a bit of coding this can be achieved.  I personally used {model:6} to strip of the brand name of the model name.  This works for Nikon and Canon cameras (both have 5 characters + a space).  It doesn't work the same as you currently have it though; Canon PowerShot A530 becomes PowerShot A530, not A530.

With a bit of extra work you can, however, still get what you want.  You just need to program code replacements for the camera models you have.
For instance (page 42 of the PM 4.5.3 manual for the format of the file):
Nikon D80            D80
Canon Powershot A530 A530


Instead of {model} you then just need to use \{model}\ and PM will replace the camera model with the short name.

Hope this helps.
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline karlmz

  • Member
  • **
  • Posts: 77
    • View Profile
Re: Mapping Camera Model
« Reply #2 on: March 31, 2008, 07:40:48 AM »
Hayo,

Thank you for the quick response! I tried your suggestion, but it seems like code replacement does not work in the renaming argument. I am using the Windows version of PM. The"\" shows as a "-" that ends up in the file name. It would be great, though, if code replacement could work for renaming the model too! Maybe this is a feature that could be added, if there is no other way of doing it already.

Karl

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Mapping Camera Model
« Reply #3 on: March 31, 2008, 08:03:19 AM »
Karl,

Thank you for the quick response! I tried your suggestion, but it seems like code replacement does not work in the renaming argument. I am using the Windows version of PM. The"\" shows as a "-" that ends up in the file name. It would be great, though, if code replacement could work for renaming the model too! Maybe this is a feature that could be added, if there is no other way of doing it already.

It would work there too if you used a different Code Replacement Delimiter character.  The '\' is reserved by Windows for the file system so PM is changing that character to a '-' for you to avoid problems when the rename is performed.  I think the '=' (equals sign) would work fine, or you could use '-' (minus sign) instead.

Then it should work fine.

-Kirk


Offline karlmz

  • Member
  • **
  • Posts: 77
    • View Profile
Re: Mapping Camera Model
« Reply #4 on: March 31, 2008, 08:35:53 AM »
Kirk,

For some reason I can't make it work. For Nikon D80 for example, ={model}= is interpreted as =NIKON D80=. I attach a screen shot. How do you separate characters from a delimiter in this case?

[attachment deleted by admin]

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Mapping Camera Model
« Reply #5 on: March 31, 2008, 09:28:08 AM »
Karl,

For some reason I can't make it work. For Nikon D80 for example, ={model}= is interpreted as =NIKON D80=. I attach a screen shot. How do you separate characters from a delimiter in this case?

What does your Code Replacement file look like?

As for your screen shot, please post a JPEG instead of a Microsoft Word Document.

Thanks,

-Kirk


Offline karlmz

  • Member
  • **
  • Posts: 77
    • View Profile
Re: Mapping Camera Model
« Reply #6 on: March 31, 2008, 09:36:33 AM »
Kirk,

Sorry about the Word file. I attach the Code Replacement file.

Karl

[attachment deleted by admin]

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Mapping Camera Model
« Reply #7 on: March 31, 2008, 11:47:19 AM »
For some reason I can't make it work. For Nikon D80 for example, ={model}= is interpreted as =NIKON D80=. I attach a screen shot. How do you separate characters from a delimiter in this case?

Your Code Replacement file looks fine.  Did you change the Delimiter character in the Code Replacement dialog to '=' yet?

-Kirk


Offline karlmz

  • Member
  • **
  • Posts: 77
    • View Profile
Re: Mapping Camera Model
« Reply #8 on: March 31, 2008, 11:50:25 AM »
Yes, I did.

Karl

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Mapping Camera Model
« Reply #9 on: March 31, 2008, 12:42:02 PM »
Karl,

Yes, I did.

What part of the application are you doing this in?  The Rename dialog?  Ingest?

-Kirk


Offline karlmz

  • Member
  • **
  • Posts: 77
    • View Profile
Re: Mapping Camera Model
« Reply #10 on: March 31, 2008, 01:05:23 PM »
Kirk,

I am using the Rename dialog. I also attach a screen shot of the Code Replacement dialog.

Karl

[attachment deleted by admin]

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Mapping Camera Model
« Reply #11 on: March 31, 2008, 01:08:10 PM »
Karl,

I am using the Rename dialog. I also attach a screen shot of the Code Replacement dialog.

Could you post your entire renaming string as well, please?

Thanks,

-Kirk


Offline karlmz

  • Member
  • **
  • Posts: 77
    • View Profile
Re: Mapping Camera Model
« Reply #12 on: March 31, 2008, 01:21:00 PM »
Kirk,

I attach a screen shot of the Rename dialog as well.

Karl

[attachment deleted by admin]

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Mapping Camera Model
« Reply #13 on: April 01, 2008, 08:59:51 AM »
Karl,

I attach a screen shot of the Rename dialog as well.

I see that it isn't previewing the rename properly and I will look into that problem.  I'd expect the rename to work correctly when executed, but I'll check that too.

-Kirk


Offline karlmz

  • Member
  • **
  • Posts: 77
    • View Profile
Re: Mapping Camera Model
« Reply #14 on: April 01, 2008, 09:05:55 AM »
Thanks, Kirk!

Karl