Is there a script to change "dont" into "don'

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Is there a script to change "dont" into "don'

by Steegy » Tue Apr 17, 2007 4:30 am

Sorry for the late response:

What PersonalTagEnhancer does: http://www.mediamonkey.com/forum/viewto ... 5575#85575

To change "&" to "and", you can add a new replace command in the ChangeCharacters function, e.g.

Code: Select all

Function ChangeCharacters(Tag) 
   Tag = Replace(Tag, "_", " ", 1, -1, 1) 
   Tag = Replace(Tag, "´", "'", 1, -1, 1) 
   Tag = Replace(Tag, "`", "'", 1, -1, 1)
   Tag = Replace(Tag, "&", "and", 1, -1, 1) 
    
   ChangeCharacters = Tag 
End Function 
The ChangeCharacters function is by default applied to the fields Title, Artist, AlbumArtist, Album.

Cheers
Steegy

Well I thought it would work

by thefaceman » Sun Jan 07, 2007 7:08 pm

I added "what i THINK is" the lastest updated PersonalTag script, but when I run it on a selected files it does not change the "&" in the titles to "and".

If this is part of the script then I must have done something wrong or will need to add that as an enhancement myself.

Also with this script could someone please make a post that lists the current things the "latest" 'retag" rules will do so I will know what will be change and what I need to add (or what out for being changed that I do not want changed?

-thanks again
-thefaceman

by Nebbin » Mon Jul 31, 2006 3:37 am

As I noted before, W. Kyle White's "Custom Scripts" script-set is already able to do all of these things and more. http://www.mediamonkey.com/forum/viewtopic.php?t=5160

You can replace any string in a large number of fields (it can be edited to add more). It can also modify a field based on a custom mask. All the mini-scripts are functions in one larger script so if you add a new field, all functions can then access it. It has been my utility knife script for some time now.

Trixmoto's script, once customised, will do as good a job though. Just remember (as Trix mentioned) - "Composer" is referenced within MM scripting as "Author".

by trixmoto » Mon Jul 31, 2006 3:23 am

trixmoto wrote:Simply find all the references to "albumArtist" (local variable) and "albumArtistName" (songdata property) and change them to "composer" and "Author" respectively.

by Guest » Fri Jul 28, 2006 9:57 pm

thanks trixmoto. ideally, i would like to keep all of my changes within one script and yours is definitely the most powerful. how would you suggest changing your script to allow for Composers? or is it not possible?

by trixmoto » Tue Jul 18, 2006 3:24 am

The "Advanced Rename" script could easily be adapted to work with the composer field, which is "Author" in MM.

Simply find all the references to "albumArtist" (local variable) and "albumArtistName" (songdata property) and change them to "composer" and "Author" respectively.

by Teknojnky » Mon Jul 17, 2006 12:59 pm

Ah, there is no node for composer, and while its probably possible to make a magic node, magic nodes are not editable like the main MM nodes.

by Guest » Mon Jul 17, 2006 10:52 am

Thanks, but I was referring to the Composer field, not the Artist field. Any thoughts on that?

by Teknojnky » Mon Jul 17, 2006 10:11 am

If you go to the artist node, select the artist node which is incorrect, press F2, correct the spelling, it will automagically correct all tags that had that previously incorrect spelling.

Alternatively, you can select the tracks under the incorrect artist, and drag/drop them onto the correct artist spelling.

This works great for stuff like changing 'Beatles' to "The Beatles", etc.

Composer

by hwatkin » Mon Jul 17, 2006 9:31 am

How can I modify this script to allow for changes to be made to the composer field? Would the interface still work? I believe in MM composer is called "Author" for some reason.

Ideally, I would like to be able to have a list of standard changes, for example:
Tag = ReplaceComposerPortion(Tag, "J.S. Bach", "Bach, J.S.")
Tag = ReplaceComposerPortion(Tag, "Johann Bach", "Bach, J.S.")

Great script!

by trixmoto » Thu Jun 29, 2006 6:11 pm

The reverse is only possible recently, in version 2.0, which I only released last month.

by Steegy » Thu Jun 29, 2006 5:54 pm

Sorry Trixmoto. I checked your script first but I didn't know it was able to do it "vice versa" too. Maybe you can mention that (if it's already there, more clearly) on your script's first post?

by trixmoto » Thu Jun 29, 2006 5:46 pm

My "Advanced Rename" script also performs this task. It can do Firstname Lastname -> Lastname, Firstname and vice versa. It also allows prefix and postfix exceptions, such as Jr.

by Steegy » Thu Jun 29, 2006 4:19 pm

Actually, the "PersonalTagEnhancer" script could use some GUI indeed.
E.g. an easy way to set the "change 'featuring' to 'ft.'" stuff. I think that would be the most used setting.
But for now, normally you only have to dive once in the script to change what you want.

And thanks for the nice comments too Tinana. I hadn't seen them until now.
If there's any question about anything, please just ask. It's better to ask and (tried to) be helped directly, instead of stay sitting with that problem. It certainly doesn't bother me. Actually, it bothers me to see people with problems. So they have to be solved...

by Nebbin » Thu Jun 29, 2006 3:55 am

For a long time now I've been using a script named "Custom Scripts". It was written by W. Kyle White, and the thread is: http://www.mediamonkey.com/forum/viewtopic.php?t=5160

It's been absolutely priceless as among it's numerous scripting jobs it includes a "Replace String In Field" function. This can replace any text within a number of fields (you can easily edit the script to add more, such as the custom fields). Currently I can replace, when required, any text within any field of my tags I wish - and it uses an input box to do it so there's no need to edit the script at all (obviously after you've initially made sure all your required editable fields are included). Sadly though, it doesn't include a "preview" pane.

Just thought I'd mention it here in case someone's interested. I've yet to try out Steegy's (I will soon :) ), so I have no idea how this compares. It's hard to find many scripts which have been written to address common issues - thus unfortunately much work becomes buried and forgotten.

Top