Author Topic: Custom variables  (Read 1575 times)

Offline Claude Diderich

  • Newcomer
  • *
  • Posts: 34
  • Claude Diderich
    • View Profile
    • Claude Diderich Sports Pictures
Custom variables
« on: August 05, 2023, 01:46:14 AM »
If would be very helpful if one could define and use custom variables in templates, in addition to the pre-defined ones.

Use case
For example, when capturing a tennis tournament, I write "... on day two of ...", where the "two" changes each day. I have numerous pre-written caption templates and saved as IPTC Dialog Setting snapshot. It would be great if I could write in each template "... on day {eventday} of ...", where "{eventday}" is a custom variables. Then I could update on each day the variable {eventday} and set it to, for example, "two". Now, when accessing any of my templates, the {eventday} would get updated, rather than me having to do it manually (or having different snapshots for different days.

Dirty alternative

For some use cases, I use the following 'dirty' alternative I define code replaces that look like "d230531 two" and then write my caption as "... on day $d{year2}{mn0}{day0}$ of ..." (with $ being my delimiter character). While this works, it is not a nice and easy way of doing things.

Implementation
The custom variables could be defined under "Edit -> Settings -> Set Custom Variables ..." using a two-dimensional list.
« Last Edit: August 05, 2023, 02:14:46 AM by Claude Diderich »
Claude Diderich, sports photographer, member of AIPS and sportpress.ch
Mülibachstrasse 49, CH-8805 Richterswil, Switzerland, phone: +41 (44) 450 81 66, fax: +41 (44) 450 81 19, mobile: +41 (79) 450 81 66, e-mail: cdiderich@cdsp.photo, internet: http://www.cdsp.photo/