INTERACT FORUM

Please login or register.

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

Author Topic: Using JRiver Expressions to remove newlines  (Read 1658 times)

Phydeaux

  • Regular Member
  • World Citizen
  • ***
  • Posts: 243
  • No comment... ;)
Using JRiver Expressions to remove newlines
« on: January 27, 2013, 02:21:00 pm »

I am trying to create an expression column to use "AtomicParsley" to add the relevant tags that J River finds to the mp4/m4v files so that they can be imported into iTunes and be viewed on my Apple TV.

I have the following expression:

Code: [Select]
AtomicParsley.exe "[Filename]" --genre "TV Shows" --stik "TV Show" --title "[Name]" -H "[Series]" -I "S[Season]E[Episode]" -U [Season] -N [Episode] --description "[Description]" --overWrite
The thought is that I can then extract this information and run it from the command line. It works except for the 'Description' field which occasionally contains new lines characters. Is there any way to get rid of these? I imagine that the "Replace(...)" function is what I'm looking for, but can't figure out how to search for a newline character.

Any suggestions?

Philip
Logged
"Evil will always triumph over Good because Good is dumb." -- Spaceballs

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Using JRiver Expressions to remove newlines
« Reply #1 on: January 27, 2013, 02:30:21 pm »

Try using the Clean() function.  It will replace newlines and other unprintables with a space character for each.
Logged
The opinions I express represent my own folly.

Phydeaux

  • Regular Member
  • World Citizen
  • ***
  • Posts: 243
  • No comment... ;)
Re: Using JRiver Expressions to remove newlines
« Reply #2 on: January 27, 2013, 10:20:44 pm »

Unfortunately, that also removes a number of other useful characters, such as a ?. I will copy and paste to Excel for now and use some creative filtering.
Logged
"Evil will always triumph over Good because Good is dumb." -- Spaceballs

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Using JRiver Expressions to remove newlines
« Reply #3 on: January 28, 2013, 12:40:50 pm »

Since you're doing this to produce essentially a command line, let me suggest instead that you build your command line in a command line environment.  Use MCWS to obtain the field values you want.  In that environment, you can use whatever tools you want to massage the data.

For what I think you're doing, I'd use perl or Cygwin.
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Using JRiver Expressions to remove newlines
« Reply #4 on: January 29, 2013, 02:19:07 am »

It also occurred to me later you could use Hexify().  It will convert newlines into hex values safe for URLs.  It will convert other characters too, but you can change them back.  For example:

   replace(
       replace(
          Hexify([description]),
       %20, / ),
   %3F, ?)
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up