INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Expression to turn "The Beatles" into "Beatles, The"  (Read 4857 times)

Spike1000

  • Citizen of the Universe
  • *****
  • Posts: 641
Expression to turn "The Beatles" into "Beatles, The"
« on: March 06, 2017, 04:52:55 am »

I seem to remember reading that there's a built in expression to swap the 'The' to the end of an artist's name in MC. I can't seem to find it. Can someone point me in the right direction?

Spike

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71469
  • Where did I put my teeth?
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #1 on: March 06, 2017, 06:05:58 am »

The options page has a search window at the bottom.  Try searching for "article".
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41972
  • Shoes gone again!
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #2 on: March 06, 2017, 08:00:09 am »

Coming next build:
NEW: Added the expression function MoveArticles(...) to take a string and move the leading article to the end.
Logged
Matt Ashland, JRiver Media Center

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #3 on: March 06, 2017, 08:35:41 am »

Coming next build:
NEW: Added the expression function MoveArticles(...) to take a string and move the leading article to the end.

We already have that don't we? Swap() and Unswap()? Or does that not work for articles?

Even if it doesn't, wouldn't it make more sense to add a mode to the existing functions rather than add a new one?
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41972
  • Shoes gone again!
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #4 on: March 06, 2017, 08:45:02 am »

We already have that don't we? Swap() and Unswap()? Or does that not work for articles?

I don't think Swap(...) does the job right.  It swaps _any_ strings and we only want to swap articles.
Logged
Matt Ashland, JRiver Media Center

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #5 on: March 06, 2017, 08:47:02 am »

Yeah. I thought of that after I posted initially. But, I was thinking that maybe a mode for Swap() and Unswap() would be easier to support long-term. Keeps the logic of related functions in the same place. And literally the next request in this thread will be for an UnMoveArticles() function anyway.  ;)

Your call, obviously.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41972
  • Shoes gone again!
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #6 on: March 06, 2017, 08:49:00 am »

And literally the next request in this thread will be for an UnMoveArticles() function anyway.  ;)

Job security!
Logged
Matt Ashland, JRiver Media Center

Spike1000

  • Citizen of the Universe
  • *****
  • Posts: 641
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #7 on: March 06, 2017, 08:51:07 am »

The background to my thoughts is that I changed the bands beginning with 'The Something' to 'Something, The' long before I started using MC. Bands are stored in an alphabetical flat (file system) structure and there were way too many 'The's' in the 'T' part of the alphabet.  Changing the bands wasn't a big job, but I never tackled the 'Various Artists' (tagging) minefield of compilation albums.

MC having an option to ignore articles when sorting is cool, but I've already set my stall out (by moving the article) and other programs may not have that clever sorting feature.

Matt the MoveArticles function will be really cool, thanks for that.

Jim, the search box on the option page is a really neat touch, but it's been hiding from me in plain sight for 2 years as I've never realised it was even there!  :-\ I'm still hoping for some 'walkthrough' videos from some MC experts where many of the MC capabilities/tricks that I'm (clearly) still missing are demonstrated in just an hour or two.

Spike

DJLegba

  • Citizen of the Universe
  • *****
  • Posts: 993
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #8 on: March 06, 2017, 08:53:30 am »

The background to my thoughts is that I changed the bands beginning with 'The Something' to 'Something, The' long before I started using MC.

Did you change "The The" to "The, The"?
Logged

Spike1000

  • Citizen of the Universe
  • *****
  • Posts: 641
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #9 on: March 06, 2017, 09:00:19 am »

That's one exception I didn't modify  :)

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41972
  • Shoes gone again!
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #10 on: March 07, 2017, 09:55:03 am »

And literally the next request in this thread will be for an UnMoveArticles() function anyway.  ;)

Coming next build:
NEW: Added the expression function UnMoveArticles(...) to move the articles back to the beginning of a string from the end.

Ha!
Logged
Matt Ashland, JRiver Media Center

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #11 on: March 07, 2017, 11:41:00 am »

Nipped that right in the bud there, eh?  ;D
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Spike1000

  • Citizen of the Universe
  • *****
  • Posts: 641
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #13 on: March 07, 2017, 02:04:12 pm »

Nice work Matt and Glynor  :)

Spike

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #14 on: March 07, 2017, 02:07:15 pm »

Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #15 on: March 07, 2017, 02:21:11 pm »

Nice, but your UnMoveArticles example says "Unswap."  :)

Took me a while to find it. In the Examples. The command name is in there a bunch of times, annoyingly. Those are already complex templates though. Meh. Fixed.

You could have fixed it, you know. It is a wiki. :P  ;D
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

aviateur

  • World Citizen
  • ***
  • Posts: 159
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #16 on: March 08, 2017, 03:54:55 pm »

I know this is not an 'expression language' answer but I accomplish article manipulation of selections of files by exercising the following. I right-click anywhere in the selection I've chosen and then choose Library Tools > Clean File Properties... From this dialog, I select the appropriate options, one of them being a check box option called 'Move articles'. I do this each time I import a batch of files. I find this option very helpful.

Cheers,
Lawrence
Logged
Two Cows Walk Into a Bar ...

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8959
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #17 on: March 09, 2017, 12:04:31 am »

Funnily enough, I spotted that option yesterday morning too. I'm not in that tool too often, but needed to fix some capitilisations and it got me wondering about this thread...

I'm almost certain that back in the day, when this was introduced, there was a thread where things that needed to be considered as 'articles' were requested by users and subsequently added to the tool's arsenal of articles. I might be wrong about that though... memory gets a bit hazy sometimes these days!

Spike1000

  • Citizen of the Universe
  • *****
  • Posts: 641
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #18 on: March 09, 2017, 01:25:56 am »

I right-click anywhere in the selection I've chosen and then choose Library Tools > Clean File Properties...

Ah, ha the 'clean file properties' was what I was trying to remember when I started this thread. I only had vague memories of reading about it and assumed it was an expression (but didn't see it in the list of expressions).

Will dig into it a bit and see how handy it is.

Another neat MC feature hiding in plain sight  :-\

Spike

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Expression to turn "The Beatles" into "Beatles, The"
« Reply #19 on: March 09, 2017, 01:46:50 am »

i use the clean file properties dialog very often, and never once checked the articles box!  so i never thought about it

personally i'd rather have the expression, they are more useful in general ;)
Logged
Pages: [1]   Go Up