Permlink Replies: 0 - Pages: 1 Threads: [ Previous | Next ]
Laza

Posts: 2,278
Registered: 6-Sep-2005
Create custom slide variable
Posted: 13-Jan-2020 10:42
  Click to reply to this thread Reply
Creates new slide variable based on existing one by filtering. You can use it with the Remove slide variable and the Rename slide variable tools.

This tool comes handy if you want to create a new custom slide variable based on an existing one. Here are some examples:

1. You'd like to extract the image serial from the file name, e.g. DSC000123.JPG or IMG_00123.JPG.

Source:
label

Rules: Cheat sheet
^[^\d]+_?(\d+)

Destination:
serialNo


As a result it will create a custom variable (See "Edit mode -> Variables") called "serialNo" with the values read from the file names. If the file name does not match this format (ANY non-numeric character followed by a few numeric characters) the new variable will not be created. If the variable already exists ("0123456") the new match will be incrementally added, e.g. "0123456,00123".

2. You need a custom variable - e.g. lighting type - which can be read from the file name, e.g.: Somename_LD.jpg=Daylight, Anothername_LA.jpg=Artifical light. This variable later can be used in the Filtering and Sort feature.

Source:
label

Rules:
.*_LD$=Daylight
.*_LA$=Artificial light

Destination:
lightType


This will result in a variable called lightType, which can have two values: "Daylight" and "Artificial light".

Download and double-click the attached BSH file to install. You'll find the tool at the "Tools -> External tools -> Create custom slide variable" menu.

Edited by: Laza on 22-Jan-2020 08:02
Version 1.1
  • Added status bar message on the currently processed folder
  • Displaying error message when memory runs out

Edited by: Laza on 22-Jan-2020 10:15
Version 1.2
  • Redesigned User Interface
  • Added relevant links

Edited by: Laza on 22-Jan-2020 18:04
Version 1.3
  • Added "Scope"; "Whole album" or "Current folder and below" or "Current folder"
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums