This is what I ended up with...two notes:
1. I'm sure this isn't the best way but what you get when you legacy things and don't start from scratch
2. Some of this would only be for me as I'm catching how I used to make "Tags" (ie [Comm]) and converting it to the editions format:
Code: Select all
.\{n.removeAll(/[?:.]+$|:|~/).replaceAll(' - ',' ').replaceAll(/[`´’???]/,"'").upperInitial()}\{n.removeAll(/[?:.]+$|:|~/).replaceAll(' - ',' ').replaceAll(/[`´’???]/,"'").upperInitial()} {episode.special?'00':s.pad(2)}x{es*.pad(2).join('x')} {t.removeAll(/[?:.]+$|:|~/).replaceAll(' - ',' ').replaceAll(/[`´’???]/,"'").upperInitial().replacePart(', Part $1')}
{def tags = fn.matchAll(/Uncut|Unrated|\[UR\]| - \[\{edition-UR\}\]|DirectorsCut|Director Cut|Director's Cut|Director'sCut|\[DC\]|Theatrical|\[Thr\]| - \[\{edition-Thr\}\]|SpecialEdition|\[SE\]| - \[\{edition-SE\}\]|ExtendedEdition|\[EE\]|\[Extended\]Extended|\[Ext\]| - \[\{edition-Ext\}\]|Uncut|\[UC\]| - \[\{edition-UC\}\]|Remastered|\[RM\]| - \[\{edition-RM\}\]|Commentary|\[Comm\]| - \[\{edition-Comm\}\]|\[Rifftrax\]|\[Riff\]| - \[\{edition-Rifftrax\}\]| - \[\{edition-ReCut\}\]|HDR| - \[\{edition-HDR\}\]| DV|FanEdit| - \[\{edition-FanEdit\}\]| - \[\{edition-DV\}\]| - \[\{edition-ENG\}\]| - \[\{edition-JPN\}\]| - \[\{edition-With Logo\}\]/)
def edition = ' - [{edition-' + tags.join(' ').replace('Uncut':'UC', '[UR]':'UR', 'Unrated':'UR', ' - [{edition-UR}]':'UR', 'DirectorsCut':'DC', 'Director Cut':'DC', 'Director\'sCut':'DC', 'Director\'s Cut':'DC', '[DC]':'DC', 'Theatrical':'Thr', '[Thr]':'Thr', ' - [{edition-Thr}]':'Thr', 'SpecialEdition':'SE', '[SE]':'SE', ' - [{edition-SE}]':'SE', 'ExtendedEdition':'Ext', '[EE]':'Ext', '[Extended]Extended':'Ext', '[Ext]':'Ext', ' - [{edition-Ext}]':'Ext', '[UC]':'UC', ' - [{edition-UC}]':'UC', 'Remastered':'RM', '[RM]':'RM', ' - [{edition-RM}]':'RM', ' - [{edition-ReCut}]':'ReCut', 'HDR':'HDR', ' - [{edition-HDR}]':'HDR', ' DV':'DV', 'FanEdit':'FanEdit', ' - [{edition-FanEdit}]':'FanEdit', ' - [{edition-DV}]':'DV', 'Commentary':'Comm', '[Comm]':'Comm', ' - [{edition-Comm}]':'Comm', '[Rifftrax]':'Rifftrax', '[Riff]':'Rifftrax', ' - [{edition-Rifftrax}]':'Rifftrax', ' - [{edition-ENG}]':'ENG', ' - [{edition-JPN}]':'JPN', ' - [{edition-With Logo}]':'With Logo') + '}]'
edition
}