Page 13 of 109

Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]

Posted: Sat Jan 03, 2009 12:01 pm
by ZvezdanD
Folks, I just finished new version of this script and I think this is a fine occasion to add/update some presets. If you have some wish/suggestion, please let me know.

Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]

Posted: Sun Jan 04, 2009 1:29 pm
by JOMAWEB2
Would be useful a script for delete after a given word in a selected field.

For example, I usually fill the lyrics tag with some third party app that, in most cases, append an italian traduction of the song after the word "traduzione".
For me, would be very useful a script that given the word "traduzione" and the field "lyric" batch delete all the italian stuff after that word.

or is there any other way to accomplish that?
Thanks

Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]

Posted: Sun Jan 04, 2009 2:22 pm
by ZvezdanD
JOMAWEB2 wrote:would be very useful a script that given the word "traduzione" and the field "lyric" batch delete all the italian stuff after that word.
Find what:

Code: Select all

traduzione(.|\r\n)*$
Into: Lyrics
Regular expression 1: checked
Replace with: empty

Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]

Posted: Mon Jan 05, 2009 4:48 am
by SumDum YunGuy
@ZvezdanD:
Greetings Sifu :wink:
Uhhh, since your offering to create/update presets, my 1st request is for an update of the "Remove artist name from title" preset
I say this because if there is not a space before & after the hyphen[i.e; artist-title], then the track will not be processed
Its very simple to create a preset to add the spaces, but maybe you know how to incorporate it into the current preset, so there are less steps to go thru in order to update the tracks
That is just a suggestion, nothing that really needs to be focused on
What I would really like is a preset that would perform a function similar to what The Monkey's built-in auto-organize feature does, there is a new preset you created, but I don't know how to modify it to do what I want
What I want to do is update the path of the tracks to match the library as follows: ..\..\<title> - <artist> - <album>.ext
Keep in mind that I'm not really dying to have these presets available, just suggesting some upgrades that would make an awesome script even more awesomer[?]
I Appreciate everything
Keep up the good work

Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]

Posted: Mon Jan 05, 2009 6:30 am
by ZvezdanD
SumDum YunGuy wrote:my 1st request is for an update of the "Remove artist name from title" preset
I say this because if there is not a space before & after the hyphen[i.e; artist-title], then the track will not be processed
Yes, I know that, but I made it like this intentionally. There are some cases when artist name contain a dash without spaces before and after (The Afro-Celt Sound System, The B-52's, The Go-Betweens, George Clinton & The P-Funk All-Stars, Jean-Michel Jarre, ...), and preset will not work as it should if I implement your suggestion. Also, I think this is a bad practice to separate artist name from the title with simple dash without spaces before and after and I don't like to encourage such use with my presets. But if you really want, I could add one new preset for it - modification is really simple, only the Find what string should be:

Code: Select all

^(.*?-)
SumDum YunGuy wrote:update the path of the tracks to match the library as follows: ..\..\<title> - <artist> - <album>.ext
You could start with the "Assign the Track number and the Title to the filename of the Path" preset, here is a modification for the Replace with string:

Code: Select all

IIf(Len(oSongData.ArtistName ) > 0 And Len(oSongData.Title) > 0 And Len(oSongData.AlbumName) > 0, "$1\$2\" & oSongData.Title & " - " & oSongData.ArtistName & " - " & oSongData.AlbumName & ".$4", oSongData.Path)
It could be even more simple, but I added a test if source fields are empty, in which case the Path is not updated. Keep in mind that if any of those fields (Title, Artist, Album) is empty, the source Path would not be modified. If you want somewhat different handling of such cases with some empty field, please let me know. By the way, there are several included presets which are intended for the Path manipulation and many of them have the same Find what string:

Code: Select all

(.+?)\\(.+)\\([^\\]+)\.([^\.\\]+)$
With such string, when you write a replacement string, you should know that $1 is a drive letter followed by ":", $2 is a complete path, $3 is a file name and $4 is an extension.

Thanks for suggestions and kind words. :)

Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]

Posted: Mon Jan 05, 2009 8:00 am
by SumDum YunGuy
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
@ZvezdanD:
Thanx again for help & promptness
Everything worked perfectly
I'll try to modify the presets myself next time, its just sometimes I can't figure out how to write the replace with string correctly
I can't wait for the new version of RegExp
In the great words of Bill & Ted "TOTALLY AWESOME DUDE!!!"

Re: RegExp Find & Replace 3.0 w/ 80+ presets (2008-01-05)[MM2+3]

Posted: Mon Jan 05, 2009 8:35 pm
by ZvezdanD
There is a new (3.0) version of the script. Please read the Information section in the first post of this thread - it has some important things about installation.

Re: RegExp Find & Replace 3.0 w/ 80+ presets (2008-01-05)[MM2+3]

Posted: Tue Jan 06, 2009 9:39 pm
by justin_f
ZvezdanD wrote:There is a new (3.0) version of the script. Please read the Information section in the first post of this thread - it has some important things about installation.
Lots of great new presets, ZvezdanD. Great job. One thing I did notice in the new install; when you use a preset from the list (not the Find & Replace screen), after it finishes it automatically creates a Toolbar button. The button goes away after a restart. Not sure if I'm just missing a setting, but I thought I'd ask.

Thanks again.

Justin

Re: RegExp Find & Replace 3.0 w/ 80+ presets (2008-01-05)[MM2+3]

Posted: Wed Jan 07, 2009 3:08 am
by ZvezdanD
justin_f wrote:when you use a preset from the list ... after it finishes it ... creates a Toolbar button. The button goes away after a restart.
Yes, I made this intentionally. In the first time I though I should keep this button after every restart of MM, but I abandoned that idea.

This is a poll: is there any other of users who think that I should display the button with the last executed preset after every restart?

By the way, if you don't like such thing, you could easily modify a script by yourself. Here is a guide - you should remove the comment sign ' from the begin of the next lines: 428, 429, 458, 459, 460.

Re: RegExp Find & Replace 3.0 w/ 80+ presets (2009-01-05)[MM2+3]

Posted: Wed Jan 07, 2009 6:56 am
by Silver
Hi guys
I have just downloaded and unzipped version 3.0 but I don't seem to have a MMIP folder to click on. What am I doing wrong?? How do I actually install? I receive line errors when I click on Install.vbs and RegExpReplace.vbs.
You help is much appreciated as I am keen to try this script. Thanks to ZvezdanD.
Silver

Re: RegExp Find & Replace 3.0 w/ 80+ presets (2009-01-05)[MM2+3]

Posted: Wed Jan 07, 2009 7:38 am
by Silver
Further to above, sorry I should have mentioned that I am running Vista Home and Media Monkey Gold.
Silver

Re: RegExp Find & Replace 3.0 w/ 80+ presets (2009-01-05)[MM2+3]

Posted: Wed Jan 07, 2009 9:20 am
by trixmoto
The file you download should have the extension "mmip". I think some browsers rename it to "zip" but if it has done this then don't unzip it, rename it back to "mmip" and double click on it.

Re: RegExp Find & Replace 3.0 w/ 80+ presets (2009-01-05)[MM2+3]

Posted: Wed Jan 07, 2009 2:25 pm
by martialartsguy
Great script.

Is there a way to remove the shortcuts for "Increment Play" and "Decrement Play" on the bar? I don't use them and they just take up space.

Thanks for a great script, and I'm loving the additional Presets.

Re: RegExp Find & Replace 3.0 w/ 80+ presets (2009-01-05)[MM2+3]

Posted: Wed Jan 07, 2009 2:48 pm
by ZvezdanD
Those two presets have added toolbar buttons just as an example (similar as the "Move prefixes ..." which have added keyboard Shortcut as example). You could turn on or off toolbar buttons for any of the preset by checking on/off the Toolbar button option in the RegExp dialog box. Of course, after such modification on the preset, you should click on the Save button. :wink:

Re: RegExp Find & Replace 3.0 w/ 80+ presets (2009-01-05)[MM2+3]

Posted: Wed Jan 07, 2009 3:15 pm
by martialartsguy
ZvezdanD wrote:Those two presets have added toolbar buttons just as an example (similar as the "Move prefixes ..." which have added keyboard Shortcut as example). You could turn on or off toolbar buttons for any of the preset by checking on/off the Toolbar button option in the RegExp dialog box. Of course, after such modification on the preset, you should click on the Save button. :wink:
Cool, but I do use the other shortcuts on there, just not those two in particular. They weren't on the previous version and was just wondering if there's a way to remove them off this version? :D

Thanks!