Case & Leading Zero Fixer 1.4.2 (2008-04-15)
OMG What a great script! I had a bunch of tracks I wanted to batch remove the leading zero from the track number thinking I'd never use the case fixer. Was I wrong! What a powerful tool. Thanks so much.
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
-
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
SP: I see your signature is starting to fill up....
Nyn
Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Hehe, yes it is.
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
Thanks spacefish!
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
I just picked this script up and have to add my accolades as well. A finely crafted and useful script, indeed!spacefish wrote:OMG What a great script! I had a bunch of tracks I wanted to batch remove the leading zero from the track number thinking I'd never use the case fixer. Was I wrong! What a powerful tool. Thanks so much.
Thank you for your efforts.
-
- Posts: 19
- Joined: Wed Nov 22, 2006 1:09 am
Installation Error
Bex,
I'd love to use this script, but when I try to install it I get stopped by a dialog box that says, "Installation Error."
I'm running Vista, and MM3 version 3.0.3.1140.
Any ideas?
Thanks!
I'd love to use this script, but when I try to install it I get stopped by a dialog box that says, "Installation Error."
I'm running Vista, and MM3 version 3.0.3.1140.
Any ideas?
Thanks!
-
- Posts: 1119
- Joined: Mon Apr 09, 2007 12:03 am
- Location: Boulder, Colorado, USA
Re: Installation Error
Have you tried running the Monkey as administrator while installing?genegraham wrote:Bex,
I'd love to use this script, but when I try to install it I get stopped by a dialog box that says, "Installation Error."
I'm running Vista, and MM3 version 3.0.3.1140.
Any ideas?
Thanks!
Not logged in as admin, but by opening the Monkey by right clicking on the Monkey's .exe and choosing "Run As Administrator". The Double click the .MMIP file for this script.
D Rock
MediaMonkeyGoldv3.0.3.1183
Vista Home Basic|4thGen 20GPod
Zune Small Player Skin w/ Aqua 4 Player Mod
Backup | Last FM Node | Scrobbler DJ | TopTracks | StayInSameStyleDJ
RadioDJ | RadioFreeMonkey | PrettyPictures | MiniLyricsEmbedder
LyricsViewer | Lyricator | LyricsPlugin | VisualizationEmbedder | MonkeyRok
RightClickForWeb | WebSearchPanels | WebNodes | MagicNodes | FavoritesNodes
NowPlayingArtNode |AutoRateAccurate | TaggingInconsistencies
AdvancedDuplicateFind&Fix | CaseModify | PlayHistory&Stats | Etc...
MediaMonkeyGoldv3.0.3.1183
Vista Home Basic|4thGen 20GPod
Zune Small Player Skin w/ Aqua 4 Player Mod
Backup | Last FM Node | Scrobbler DJ | TopTracks | StayInSameStyleDJ
RadioDJ | RadioFreeMonkey | PrettyPictures | MiniLyricsEmbedder
LyricsViewer | Lyricator | LyricsPlugin | VisualizationEmbedder | MonkeyRok
RightClickForWeb | WebSearchPanels | WebNodes | MagicNodes | FavoritesNodes
NowPlayingArtNode |AutoRateAccurate | TaggingInconsistencies
AdvancedDuplicateFind&Fix | CaseModify | PlayHistory&Stats | Etc...
-
- Posts: 19
- Joined: Wed Nov 22, 2006 1:09 am
Re: Installation Error
Thanks drjboulder! That did the trick!drjboulder wrote:Have you tried running the Monkey as administrator while installing?genegraham wrote:Bex,
I'd love to use this script, but when I try to install it I get stopped by a dialog box that says, "Installation Error."
I'm running Vista, and MM3 version 3.0.3.1140.
Any ideas?
Thanks!
Not logged in as admin, but by opening the Monkey by right clicking on the Monkey's .exe and choosing "Run As Administrator". The Double click the .MMIP file for this script.
-
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
Very nice indeed Bex.
Might want to look at this at some time
I had to add "Liv" to Forced-Case Words to stop it changing
Liv Tyler
to
LIV Tyler
And this
It is probably a lot of extra processing effort but..
I would like to see and option for "the" in the little words list to ignore it if it is preceeded by
& The
and The
(Number) i.e. 2008 The
I ended up taking it out of he little word list to make these instances look nicer
Might want to look at this at some time
I had to add "Liv" to Forced-Case Words to stop it changing
Liv Tyler
to
LIV Tyler
And this
It is probably a lot of extra processing effort but..
I would like to see and option for "the" in the little words list to ignore it if it is preceeded by
& The
and The
(Number) i.e. 2008 The
I ended up taking it out of he little word list to make these instances look nicer
That's a good point and exactly how I like my items capitalized in those instances. Would be a great addition!MoDementia wrote:I would like to see and option for "the" in the little words list to ignore it if it is preceeded by
& The
and The
(Number) i.e. 2008 The
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
Thanks!
But this is really Risser's script especially the part of the code which handles the case thing. I haven't changed that part at all. In fact I haven't yet figured out exactly how it works so I'm not sure on how to accomplish your request.
Feel free to investigate it and change it so it fit your needs. If so please share your findings.
But this is really Risser's script especially the part of the code which handles the case thing. I haven't changed that part at all. In fact I haven't yet figured out exactly how it works so I'm not sure on how to accomplish your request.
Feel free to investigate it and change it so it fit your needs. If so please share your findings.
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
-
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
This seems to be working for
& The
and The
(Number) i.e. 2008 The
Thinking about adding
of The
Changes were made to these 2 functions.
Search for variable prevWord to customise it further
& The
and The
(Number) i.e. 2008 The
Thinking about adding
of The
Changes were made to these 2 functions.
Search for variable prevWord to customise it further
Code: Select all
Function fixUp(s, prevChars, nextChar,prevWord)
Dim forceIndex, littleIndex, i
Dim capMe, allCaps, foreignPref
Dim upcased, littleUpped, forceUpped
littleWordList = LittleWords 'Split(SDB.IniFile.stringValue("CaseModify","littleWordString")," ")
forceCapList = ForceCasedWords 'Split(SDB.IniFile.stringValue("CaseModify","forceCapString")," ")
forceIndex = -1
littleIndex = -1
capMe = false
allCaps = false
upcased = UCase(s)
foreignPref = isForeignPref.test(s)
For i = 1 to UBound(forceCapList)
forceUpped = UCase(forceCapList(i))
If forceUpped = upcased Or forceUpped = upcased & nextChar Then
forceIndex = i
Exit For
End If
Next 'i
For i = 1 to UBound(littleWordList)
littleUpped = UCase(littleWordList(i))
If littleUpped = "THE" and (prevWord = "&" or prevWord = "AND" or IsNumeric(prevWord)) Then
Else
If littleUpped = upcased Or littleUpped = upcased & nextChar Then
littleIndex = i
Exit For
End If
End If
Next 'i
If forceIndex >= 0 Then
s = forceCapList(forceIndex)
Else
If Len(s) = 1 And nextChar = "." Then
' if it's a single character followed by a period (an initial), caps it
allCaps = True
ElseIf Not vowels.test(s) And Not cardinal.test(s) Then
' if it's all consonants, no vowels, and not a cardinal number, caps it
allCaps = True
ElseIf romanNumerals.test(s) And UCase(s) <> "MIX" And UCase(s) <> "MI" And UCase(s) <> "DI" Then
' if it's roman numerals (and not 'mix' or 'di' which are valid roman numerals), caps it
allCaps = True
ElseIf prevChars = "" Or (nextChar = "" And Not foreignPref) Then
'if it's the first or last word, cap it
capMe = True
ElseIf Not whiteSpace.test(prevChars) Or (nextChar <> "" And InStr(")}]",nextChar)) Then
' if it follows a punctuation mark (with or without spaces) or if it's before a close-bracket, cap it
capMe = True
ElseIf littleIndex < 0 And Not foreignPref Then
' if it's not on the 'little word' list, cap it
capMe = True
End If
If allCaps Then
s = UCase(s)
ElseIf capMe Then
s = uppercase(s)
Else
s = LCase(s)
End If
If isMc.Test(s) And Len(s) > 2 Then
' if it's Mc or O', cap the 3rd character (this assumes no names like McA)
s = Mid(s,1,2)&UCase(Mid(s,3,1))&LCase(Mid(s,4))
End If
If foreignPref Then
' if it's l', d' or dell', lowercase the first letter and uppercase the first letter after the apostrophe
Dim pos
pos = InStr(s,"'")
If pos < 1 Then
pos = InStr(s,"`")
End If
If pos > 0 And pos < Len(s) Then
s = Mid(s,1,pos)&UCase(Mid(s,pos+1,1))&LCase(Mid(s,pos+2))
End If
End If
End If
fixUp = s
End Function
Function updateCase(s)
Dim currentWord, result, fixed, theChar, lastNonWordChars, prevWord
Dim forceIndex
Dim i
currentWord = ""
prevWord = ""
result = ""
lastNonWordChars = ""
For i = 1 to Len(s)
theChar = Mid(s,i,1)
If alphaNum.test(theChar) Then
currentWord = currentWord & theChar
Else
If currentWord <> "" Then
fixed = fixUp(currentWord,lastNonWordChars,theChar,prevWord)
If Right(fixed,1) = theChar Then 'handle stuff like w/
fixed = Left(fixed,Len(fixed)-1)
lastNonWordChars = ""
Else
lastNonWordChars = theChar
End If
result = result & fixed
prevWord = Ucase(fixed)
currentWord = ""
Else
lastNonWordChars = lastNonWordChars & theChar
If theChar = "&" Then
prevWord = theChar
End If
End If
result = result & theChar
End If
Next 'i
If Len(currentWord) > 0 Then
result = result & fixUp(currentWord,lastNonWordChars,"",prevWord)
End If
updateCase = result
End Function
-
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
I can't think why this would be the case but any "Little words" that are the last word are left as script case
e.g. "Come on, Come On" with on as a little word
If you would like to stop this change this line
to
e.g. "Come on, Come On" with on as a little word
If you would like to stop this change this line
Code: Select all
ElseIf prevChars = "" Or (nextChar = "" And Not foreignPref) Then
Code: Select all
ElseIf prevChars = "" Then ' Or (nextChar = "" And Not foreignPref) Then
-
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia