Author Topic: Some ideas for code replacements for tennis  (Read 185 times)

Offline Claude Diderich

  • Newcomer
  • *
  • Posts: 39
  • Claude Diderich
    • View Profile
    • Claude Diderich Sports Pictures
Some ideas for code replacements for tennis
« on: November 27, 2024, 02:48:58 AM »
Hi,
Here are some code replacements I am using to caption tennis photos quickly. I pre-populate all the IPTC fields, especially Event, Location, City, and Country with their respective data and put $!$ into the caption field. Then on a photo by photo basis, I only have to enter c12rh after the $! to caption a handshake photo, etc.

# Match specific code replacements (I update them for each match I caption and reload the CR file thereafter)
# --
p1   Player 1
+p1   $p1$ of Country 1
p2   Player 2
+p2   $p2$ of Country 2

!event   men's single first round match

# Event specific code replacements (I update them for each tournament)
# --
=s240706   one
=s240707   two
=s240708   three
=s240709   four
=s240710   five
=s240711   six
=s240712   seven


# Captions
# --
!c1as   $+p1$ serves against $+p2$ during the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c1af   $+p1$ plays a forehand against $+p2$ during the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c1ab   $+p1$ plays a backhand against $+p2$ during the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c1av   $+p1$ plays a volley against $+p2$ during the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c1re   $+p1$ enters the court ahead of the $!event$ against $+p2$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c1r   $+p1$ reacts during the $!event$ against $+p2$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c1rw   $+p1$ acknowledges the crowd after winning against $+p2$ in the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c1rl   $+p1$ acknowledges the crowd after defeat against $+p2$ in the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}

!c2as   $+p2$ serves against $+p1$ during the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c2af   $+p2$ plays a forehand against $+p1$ during the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c2ab   $+p2$ plays a backhand against $+p1$ during the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c2av   $+p2$ plays a volley against $+p1$ during the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c2re   $+p2$ enters the court ahead of the $!event$ against $+p1$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c2cp   $+p2$ celebrates winning a point against $+p1$ during the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c2cw   $+p2$ celebrates winning the match the against $+p1$ during the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c2r   $+p2$ reacts during the $!event$ against $+p1$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c2rw   $+p2$ acknowledges the crowd after winning against $+p1$ in the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c2rl   $+p2$ acknowledges the crowd after defeat against $+p1$ in the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}

!c12rh   $+p1$ (left) and $+p2$ (right) shake hands after the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
!c21rh   $+p2$ (left) and $+p1$ (right) shake hands after the $!event$ on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
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/

Offline Max Lemesh

  • Full Member
  • ***
  • Posts: 173
    • View Profile
Re: New variable request - {clipboard}/{clip}
« Reply #1 on: November 27, 2024, 08:57:35 AM »
This looks very interesting! Can you give an example of final string you get as a result?

Offline Claude Diderich

  • Newcomer
  • *
  • Posts: 39
  • Claude Diderich
    • View Profile
    • Claude Diderich Sports Pictures
Re: Some ideas for code replacements for tennis
« Reply #2 on: November 27, 2024, 09:12:16 AM »
Input
+p1 Novak Djokovic of Serbia
+p2 Pierre-Hugues Herbert of France
!event men's single first round match
=s2405028  three


Event: 2024 French Open
Location: Roland Garros
City: Paris
Country: France
Caption date: 28.05.2024
Caption: $!c1ab$

Output
Caption: Novak Djokovic of Serbia plays a backhand against Pierre-Hugues Herbert of France during the men's single first round match on day three of the 2024 French Open at Roland Garros on Tuesday, May 28, 2024 in Paris, France
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/

Offline Max Lemesh

  • Full Member
  • ***
  • Posts: 173
    • View Profile
Re: Some ideas for code replacements for tennis
« Reply #3 on: November 27, 2024, 12:08:52 PM »
Thanks! It makes sense now..
Hardest thing now would be to remember all the shortcuts, but if you made them yourself it is probably very easy.

Love your nested code replacement use. Such a great idea

Offline Max Lemesh

  • Full Member
  • ***
  • Posts: 173
    • View Profile
Re: Some ideas for code replacements for tennis
« Reply #4 on: November 27, 2024, 12:13:36 PM »
As the great xzibit used to say...

we gonna put some code replacements inside your code replacements