Hi All!
Does anybody have a working script for a proper title case? (Capitalizing everything close-class words – the, a, an, and, and so on?) I found a Mass Tagger Script, but that obviously doesn’t work in Picard and my own little script is insufficient.
I’m also looking for a script to stop Picard from reversing first and last names in the sort fields.
Mass Tagger Script:
Ï∞XüzíHæ∞RÑ[ÎK&rˆH3äü@†flˇ±Wfle~TITLE
$caps2(%title%)&rˆH3äü@†flˇ±Wfle~lTITLE
$if($strchr(%title%, ),$replace(%title%,’ ‘,’ ‘,’ By A ‘,’ by a ‘,’ For A ‘,’ for a ‘,’ In A ‘,’ in a ‘,’ Of A ‘,’ of a ‘,’ On A ‘,’ on a ‘,’ A ‘,’ a ‘,’ To An ‘,’ to an ‘,’ An ‘,’ an ‘,’ And The ‘,’ and the ‘,’ And ‘,’ and ‘,’ As ‘,’ as ‘,’ At The ‘,’ at the ‘,’ At ‘,’ at ‘,’ By The ‘,’ by the ‘,’ By ‘,’ by ‘,’ But ‘,’ but ‘,’ For The ‘,’ for the ‘,’ For ‘,’ for ‘,’ From A ‘,’ from a ‘,’ From The ‘,’ from the ‘,’ From ‘,’ from ‘,’ In A ‘,’ in a ‘,’ In An ‘,’ in an ‘,’ In The ‘,’ in the ‘,’ In ‘,’ in ‘,’ Into ‘,’ into ‘,’ Nor ‘,’ nor ‘,’ Out Of A ‘,’ out of a ‘,’ Out Of The ‘,’ out of the ‘,’ Out Of ‘,’ out of ‘,’ Of A ‘,’ of a ‘,’ Of The ‘,’ of the ‘,’ Of ‘,’ of ‘,’ On The ‘,’ on the ‘,’ On ‘,’ on ‘,’ Onto ‘,’ onto ‘,’ Or The ‘,’ or the ‘,’ Or ‘,’ or ‘,’ To The ‘,’ to the ‘,’ With The ‘,’ with the ‘,’ The ‘,’ the ‘,’ To ‘,’ to ‘,’ With ‘,’ with ‘),%title%)&rˆH3äü@†flˇ±Wfle~≠TITLE
$if($strchr(%title%, ),$left(%title%,$sub($len(%title%),3))$replace($right(%title%,3),’ by’,’ By’,’ in’,’ In’,’ of’,’ Of’,’ on’,’ On’,’ or’,’ Or’,’ to’,’ To’),%title%)&rˆH3äü@†flˇ±Wfle~ÅTITLE
$if($strchr(%title%, ),$left(%title%,$sub($len(%title%),4))$replace($right(%title%,4),’ for’,’ For’,’ out’,’ Out’),%title%)&rˆH3äü@†flˇ±Wfle~ïTITLE
$if($strchr(%title%, ),$left(%title%,$sub($len(%title%),5))$replace($right(%title%,5),’ into’,’ Into’,’ from’,’ From’,’ with’,’ With’),%title%)&rˆH3äü@†flˇ±Wfle~ÅTITLE
$if($strchr(%title%, ),$replace(%title%,‘Best of’,‘Best Of’,‘- the ‘,’- The ‘,’: the ‘,’: The ‘,’& the ‘,’& The ‘),%title%)&rˆH3äü@†flˇ±Wfle~ALBUM
$caps2(%album%)&rˆH3äü@†flˇ±Wfle~lALBUM
$if($strchr(%album%, ),$replace(%album%,’ ‘,’ ‘,’ By A ‘,’ by a ‘,’ For A ‘,’ for a ‘,’ In A ‘,’ in a ‘,’ Of A ‘,’ of a ‘,’ On A ‘,’ on a ‘,’ A ‘,’ a ‘,’ To An ‘,’ to an ‘,’ An ‘,’ an ‘,’ And The ‘,’ and the ‘,’ And ‘,’ and ‘,’ As ‘,’ as ‘,’ At The ‘,’ at the ‘,’ At ‘,’ at ‘,’ By The ‘,’ by the ‘,’ By ‘,’ by ‘,’ But ‘,’ but ‘,’ For The ‘,’ for the ‘,’ For ‘,’ for ‘,’ From A ‘,’ from a ‘,’ From The ‘,’ from the ‘,’ From ‘,’ from ‘,’ In A ‘,’ in a ‘,’ In An ‘,’ in an ‘,’ In The ‘,’ in the ‘,’ In ‘,’ in ‘,’ Into ‘,’ into ‘,’ Nor ‘,’ nor ‘,’ Out Of A ‘,’ out of a ‘,’ Out Of The ‘,’ out of the ‘,’ Out Of ‘,’ out of ‘,’ Of A ‘,’ of a ‘,’ Of The ‘,’ of the ‘,’ Of ‘,’ of ‘,’ On The ‘,’ on the ‘,’ On ‘,’ on ‘,’ Onto ‘,’ onto ‘,’ Or The ‘,’ or the ‘,’ Or ‘,’ or ‘,’ To The ‘,’ to the ‘,’ With The ‘,’ with the ‘,’ The ‘,’ the ‘,’ To ‘,’ to ‘,’ With ‘,’ with ‘),%album%)&rˆH3äü@†flˇ±Wfle~≠ALBUM
$if($strchr(%album%, ),$left(%album%,$sub($len(%album%),3))$replace($right(%album%,3),’ by’,’ By’,’ in’,’ In’,’ of’,’ Of’,’ on’,’ On’,’ or’,’ Or’,’ to’,’ To’),%album%)&rˆH3äü@†flˇ±Wfle~ÅALBUM
$if($strchr(%album%, ),$left(%album%,$sub($len(%album%),4))$replace($right(%album%,4),’ for’,’ For’,’ out’,’ Out’),%album%)&rˆH3äü@†flˇ±Wfle~ïALBUM
$if($strchr(%album%, ),$left(%album%,$sub($len(%album%),5))$replace($right(%album%,5),’ into’,’ Into’,’ from’,’ From’,’ with’,’ With’),%album%)&rˆH3äü@†flˇ±Wfle~ÅALBUM
$if($strchr(%album%, ),$replace(%album%,‘Best of’,‘Best Of’,'- the ‘,’- The ‘,’: the ‘,’: The ‘,’& the ‘,’& The '),%album%)
Summary
This text will be hidden
My own Script: (that I can’t get to work anymore and that would also turn first and last words to lowercase)
$set(title,$replace(%title%,A|An|And|As|At|But|By|En|For|If|In|Of|On|Or|The|To|Via|Vs.,a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|via|vs.))
Any help would be appreciated!