IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Convert command destination script - remove smart quotes
boombass
post May 3 2012, 16:28
Post #1





Group: Members
Posts: 79
Joined: 24-August 02
Member No.: 3191



Can anyone suggest a way to remove smart quotes (and replace them with dumb quotes) in track titles?

For example, change:

Iíve Got a Feeling

to

I've Got a Feeling

I'd like the change to happen when I use the "Convert" command. My current destination script for the Convert command is:

%album artist%/[$cut(%date%,4) - ]%album%/%discnumber%.%tracknumber% - %title%

How can I modify %title% to replace smart quotes with dumb quotes?

What if I want to do the reverse? Change dumb quotes to smart? This is probably harder...

Thanks!

This post has been edited by boombass: May 3 2012, 16:29
Go to the top of the page
+Quote Post
trout
post May 4 2012, 15:19
Post #2





Group: Members
Posts: 413
Joined: 26-March 09
Member No.: 68400



QUOTE (boombass)
How can I modify %title% to replace smart quotes with dumb quotes?

$replace(%title%,í,'')

QUOTE (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Titleformat_Reference#.24replace.28a.2Cb.2Cc.29)
$replace(a,b,c)

Replaces all occurrences of string b in string a with string c.

Can also be used with an arbitrary number of arguments. Note that $replace(a,b1,c1,b2,c2) is generally not the same as $replace($replace(a,b1,c1),b2,c2).

Example: $replace(ab,a,b,b,c) → "bc", $replace($replace(ab,a,b),b,c) → "cc"


note: The value of C in my example ['](apostrophe / single quote / dumb quote) is purposely doubled.
QUOTE (titleformat_help.html)
' (single quotation mark)

Inserts specified text bypassing syntax processing; allows special characters such as %,$,[,] to be inserted. In order to insert a quotation mark character, use '' (two single quotation marks).


This post has been edited by trout: May 4 2012, 15:21
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 16th April 2014 - 21:31