Welcome Guest

Pages: 1
Insert composer last name in title
bnbayerPostOctober 29, 2017, 16:10
Newbie
Posts: 2
Registered:
October 29, 2017, 19:57
Normal topicInsert composer last name in title

HI,

I include the composer's last name at the start of the Title field, in addition to leaving it in the Composer field.

Format is:
COMPOSER field: Schütz, Heinrich (1585-1672)
TITLE field: Schütz: Meine Seele erhebt den Herren

Easy with 'Remove/Insert' command when whole album is one composer, but not so simple when I have a different composer for each track.

How would I extract the last name from the composer field - leaving that field intact - and insert that string along with ": " in the title field?

Thanks,

Brandon

2MR2PostOctober 29, 2017, 16:52
Avatar photo
Administrator
Posts: 2079
Registered:
August 23, 2012, 19:27
Normal topicRe: Insert composer last name in title

Hi. This has to be done in an action. I've taken the liberty of putting in a few sanity checks regarding the formatting of the Composer field. The way I've done it a composer with only a last name will work and the (text) is optional.

The action can be downloaded at: https://2manyrobots.com/actions/ExtractandPrependComposertoTitle.zip

Unzip the downloaded file. Install the unzipped plist file via Yate>Import Preferences or by dragging the file to the main window's file list area (you will hear a plink).

Once installed you will have an action named: 'Extract and Prepend Composer to Title' The action can be accessed in a variety of ways. From a menu, from the toolbar, by a keyboard shortcut, etc.

For those of you interested here's a dump of the action. Remember that the forum mailer removes backslash characters and that the statement display is not always a full representation.

Force Grouped Execution Extract the last name from Composer fields formatted any of the following:⏎…
' Make Variable 1 a copy of the Composer field
Copy the Composer field to Variable 1
' Remove the , and everything which follows
Find "," in Variable 1, remove it and everything after, set state
if false
' We didn't find a , Look for a (
Find "(" in Variable 1, remove it and everything after, set state
endif
' Remove leading and trailing spaces in Variable 1
Trim Variable 1 (SP) [Leading] [Trailing]
' If Variable 1 is not empty prepend it to the Title
Test if the Variable 1 field is empty (Set result)
if false
Prepend "\v1:…" to the Title field
endif

2MR2PostOctober 29, 2017, 17:04
Avatar photo
Administrator
Posts: 2079
Registered:
August 23, 2012, 19:27
Normal topicRe: Insert composer last name in title

Pardon the awful formatting in the previous post. I've tried to clean it up a bit. The downloaded action is always easier to read.

bnbayerPostOctober 30, 2017, 11:38
Newbie
Posts: 2
Registered:
October 29, 2017, 19:57
Normal topicRe: Insert composer last name in title

Awesome, thanks! Oddly enough, I can actually understand most of this (I did some database programming in 4th Dimension a hundred years ago), and learned a fair bit about programming in Yate.
I've long wished I had discovered Yate a thousand or so CD RIPs earlier, and took the time to learn Yate programming right off the top. Now I can add a few hundred more wasted hours I could have automated.
Thanks again.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.024 seconds.