• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Song Title / Caption formatting question
#6
(06-16-2015, 02:52 AM)Zuberman Wrote: An interesting use of it would be to show a different field if one didn't exist, i.e. %ARTIST: -ARTIST, %COMPOSER%%

I'm not quite sure I understand the semantics of this construct.

My intention was:

If ARTIST has a value, substitute everything after the :, repeat. Probably I should have written

%ARTIST: - %ARTIST%, %

or, more formally,

%<field>:<text if defined>%

This would be fairly easy: on 1st pass, check if artist has a value, if so replace by everything after the colon. So it becomes

- %ARTIST%,

On second pass, there's no colon anymore so the field value can be substituted.

For an if-then-else functionality, we could do something like

%<field>:<text if defined>|<text if undefined>%

This looks simple, elegant, easy to implement, yet powerful.
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply


Messages In This Thread
RE: Song Title / Caption formatting question - by sciurius - 06-16-2015, 06:48 AM



Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.