RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

ZvezdanD
Posts: 3265
Joined: Thu Jun 08, 2006 7:40 pm

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

Post 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.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
JOMAWEB2

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

Post 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
ZvezdanD
Posts: 3265
Joined: Thu Jun 08, 2006 7:40 pm

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

Post 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
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
SumDum YunGuy
Posts: 5
Joined: Sun Aug 10, 2008 11:25 am

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

Post 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
ZvezdanD
Posts: 3265
Joined: Thu Jun 08, 2006 7:40 pm

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

Post 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. :)
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
SumDum YunGuy
Posts: 5
Joined: Sun Aug 10, 2008 11:25 am

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

Post 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!!!"
ZvezdanD
Posts: 3265
Joined: Thu Jun 08, 2006 7:40 pm

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

Post 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.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
justin_f
Posts: 92
Joined: Thu Nov 22, 2007 11:41 am
Location: Valpo, IN

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

Post 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
ZvezdanD
Posts: 3265
Joined: Thu Jun 08, 2006 7:40 pm

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

Post 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.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Silver

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

Post 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
Silver

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

Post by Silver »

Further to above, sorry I should have mentioned that I am running Vista Home and Media Monkey Gold.
Silver
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

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

Post 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.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
martialartsguy
Posts: 312
Joined: Mon Apr 03, 2006 9:11 am
Location: Denver, CO

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

Post 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.
MM Gold since 2006
ZvezdanD
Posts: 3265
Joined: Thu Jun 08, 2006 7:40 pm

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

Post 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:
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
martialartsguy
Posts: 312
Joined: Mon Apr 03, 2006 9:11 am
Location: Denver, CO

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

Post 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!
MM Gold since 2006
Post Reply