Newbie-Script: Import lyrics from Evillyrics (check code,pls

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Begges

Newbie-Script: Import lyrics from Evillyrics (check code,pls

Post by Begges » Wed Apr 26, 2006 2:44 am

Hi again,

and here is my second script for MM (i am very productive you see, using MM for two days and two new scripts came out ;-))

I use Evillyrics for my Lyrics and do not want to copy/paste all the lyrics in the lyrics tag of the mp3files (i have to do this because otherwise they will not show on this ipod-thing).

So i have written this importer script. I am a bit worried about, if this script will corrupt my files (writing tags without knowing anaything about and just using this scripting language).... Any comments??

Begges

Code: Select all

Sub EvilTagger

'This scripts imports the Lyrics from Evillyrics
'set the Evillyrics Cache options to "Cache organization ---> by first letter"
'
'Script will check if the lyrics.txt file of the selected songs exists
'and import it then to the lyrics tag
'Filename must be "Artist - Title.txt"
'Possible erros are strange characters in the Artist or Title Tag, e.g. "C'est la vie" or "ä/22*~"

'Here are the ini-Lines
'[Eviltagger]
'FileName=Eviltagger.vbs
'ProcName=Eviltagger
'Order=10
'DisplayName=EvilTagger
'Description=Import Lyrics from Evillyrics
'Language=VBScript
'ScriptType=0





DIM path, filename
DIM list, itm
DIM headline,lyrics, line
DIM msg, errorcounter, filecounter, msgtext

'######################################################
'Set the Errorcounter to his starting point
errorcounter = 0

'Set the Path to the Evillyrics Lyrics
'Evillyrics Options must be set to "Cache organization ---> by first letter"   --> see below
path = "C:\Programme\Evillyrics\Lyrics\"
'######################################################

' Get list of selected tracks from MediaMonkey
Set list = SDB.CurrentSongList 
filecounter = list.count

' Process all selected tracks
For i=0 To list.count-1
    Set itm = list.Item(i)
	
	'##################################################
	'set the headline of the Lyrics
	headline = itm.artistname & " - " & itm.title & CHR(10) &"___________________________________" & CHR(10)
	'##################################################
	
	' Create Filename
	' by adding the first letter of the artist to the path ("Cache organization ---> by first letter")
	'and then the Evillyrics scheme
    filename = path & "\" & left(itm.artistname,1) &"\" & itm.artistname & " - " & itm.title & ".txt"
    Set filesys = CreateObject("Scripting.FileSystemObject")
	If filesys.FileExists(filename) = true Then
        Set file = filesys.OpenTextFile(filename, 1, false)
		'add headline to the beginning of the Lyrics
		lyrics = headline
		Do while not file.AtEndOfStream
			line = file.ReadLine
			lyrics = lyrics & chr(10) & line
		Loop
		'write Lyrics to the Lyrics tag
		itm.lyrics = lyrics
	Else
	errorcounter = errorcounter +1
	End if
Next
' Write all back to DB and update tags
list.UpdateAll


'#####################################################
'set the final message
msgtxt = filecounter - errorcounter & " of " & filecounter& " lyrics imported "
msgtxt = msgtxt & CHR(10)& CHR(10) & "check missing lyrics manually, e.g. filename versus artist, title tag"
'#####################################################

'final user information
Msg = SDB.MessageBox(msgtxt , mtInformation, Array(mbOk))

End sub

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK
Contact:

Post by trixmoto » Wed Apr 26, 2006 3:17 am

I was hoping to include this kind of functionality to my Lyric Timer script - looks like you've done some of the hard work for me! Thanks :)
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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo » Wed Apr 26, 2006 5:25 am

This is good fun. Think I'll have to subscribe to "Begges News Bulletin"

Gave this one a go, and it works very well :) Have to figure out that latest Evillyrics version.. Looks good as far as I can see after 2 minutes with Evillyrics. Seems like Evillyrics do have some rules about special characters, and turn them into underscores.
Image

Begges

no news bulletin because now it's perfect ;-)

Post by Begges » Wed Apr 26, 2006 9:17 am

thanks for trying this script, i have also some problems with the special characters, but maybe i will adjust my filenames instead of 100 lines of "selcect case" code ;-)

News bulletin will be available if i have some more scripts. But this maybe will never happen, because now MM fits perfectly my needs :-)

rovingcowboy
Posts: 14153
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy » Wed Apr 26, 2006 9:58 am

nice idea but i don't do lyrics straight from the web.

they are always WRong. i end up typing my own from
the song by sitting here and listing or getting the MOst correct
one from online and fixing it.
also if you can get the code to put them in to ogg files it would be good for me.

i dont generaly use lyrics for anything other then karaoke and i use the
karafun player for my karaoke songs.

but this is great idea for those that want it.

keep up the fast productivite but don't get burnt out on it which can happen if you do to much at once. 8)
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy 5 Android 5) 6. Proscan tablet Android 4.3 ) 7. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.

Teknojnky
Posts: 5532
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky » Wed Apr 26, 2006 10:17 am

The latest version of MiniLyrics supports embedding lyrics into tags or external files.

Minilyrics always worked awesome for me, I didnt have much luck with evilyrics.

Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm
Location: Belgium
Contact:

Post by Steegy » Wed Apr 26, 2006 1:05 pm

Yes, like Teknojnky, MiniLyrics is also my absolute favourite. Certainly now it can be embedded in MediaMonkey. (How? See here: http://www.mediamonkey.com/forum/viewto ... 2437#42437 ) It's always active when I use MediaMonkey.

The scrolling lyrics database seems to be expanded enormously (and it was already much better the EL's) and so you can now find lyrics for almost any "standard" song, and even for most "les known" songs. For most songs, lyrics exist for different versions of the song (like "radio edit", "long version', ...). They're always very clean and correct.

And the devs are very quick and helpful at implementing requests. (No, I'm not affiliated...)
Free program: it just shows a line "Do you want to register" (or something like that). It doesn't include ads or other dirty things, like EL was filled with when I tried it.

So, if you are looking for something good/better, you should certainly give it a try.


I didn't test your script (as I'm not going to install EL again), but it looks good.

Cheers
Steegy
Last edited by Steegy on Wed Apr 26, 2006 1:19 pm, edited 1 time in total.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).

MeMeMe
Posts: 263
Joined: Fri Dec 23, 2005 11:42 am
Location: In front of my computer

Post by MeMeMe » Wed Apr 26, 2006 1:14 pm

When I tried Minilyrics (not that long ago) it couldn't compete with Evillyrics on the ability to check many different song databases (or if it did, I couldn't find out how to do it - also quite possible).

Teknojnky
Posts: 5532
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky » Wed Apr 26, 2006 1:19 pm

It only uses its own server/databaseas far as I know. But its really huge, as its pretty uncommon for me to have to manually search for lyrics and it almost always grabs the right one (other than sometimes slightly different versions/timing).

I had over 20K .lrc/.txt files download by minilyrics. Now that it better supports embedded lyrics, I've cleared most of them out and configured it to save to tags.

Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm
Location: Belgium
Contact:

Post by Steegy » Wed Apr 26, 2006 1:27 pm

These different song databases you mean: do you mean they all contain scrolling lyrics (as that's obviously what most people want)?
Is it because your lyrics couldn't be found, or just because you wanted the choice?
What are these sites that EL uses to get its scrolling lyrics from? So it would be nice if MiniLyrics supported these too.

Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).

MeMeMe
Posts: 263
Joined: Fri Dec 23, 2005 11:42 am
Location: In front of my computer

Post by MeMeMe » Wed Apr 26, 2006 1:45 pm

No, they don't necessarily contain scrolling lyrics. Just normal ones.
I have a lot of songs (heavy metal, mostly) that minilyrics doesn't have any sort of lyrics for, and evillyrics doesn't find on the first attempt. Clicking the "find again" button on evillyrics to search more databases usually does the trick but minilyrics doesn't have that facility.

Begges

Post by Begges » Wed Apr 26, 2006 2:59 pm

i have also tested Minilyrics, and the main reason i don't use it: it is not for free.
Evillyrics is also able to get the lyrics of up to 20 songs at the same time ("download full album").

"chaqu'un à son goût" ;-)

i am not planning to do this for ogg-files, as i have none. but if MM is able to write the tags, i think you don not have to change anything on this script. The lyrics are just imported from txt.files with the artist - title.txt schema to the selected songs in mm. Thats all.

Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm
Location: Belgium
Contact:

Post by Steegy » Wed Apr 26, 2006 3:06 pm

it is not for free
That's not correct. Why do you think that??

I agree that EL has more possibilities, so it is indeed a matter of personal choice. That's why people are encouraged to test different things before they get stuck to something. So they can make a personal choice.

Don't there exist plugins or scripts for EL, that can write lyrics to the standard ID3v2 tags? Of course, these would only be good for mp3's and other formats that use ID3v2.

Nice to see you as coder. :D
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).

pah68
Posts: 1489
Joined: Wed Apr 07, 2004 5:26 pm
Location: Sydney, Australia

Post by pah68 » Wed Apr 26, 2006 6:35 pm

Steegy wrote:Don't there exist plugins or scripts for EL, that can write lyrics to the standard ID3v2 tags?
Yep, there is.
Image
Image

DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Re: no news bulletin because now it's perfect ;-)

Post by DiddeLeeDoo » Wed Apr 26, 2006 7:21 pm

Begges wrote:adjust my filenames instead of 100 lines
I was thinking a bit simpler, like try to figure out the rules of Evillyrics, then apply the same rules in the script.

Say if Evillyrics translate anything other than A-Z a-z 0-9 to underscores, you can apply the same in the script, using that cool VBScript RegExp function.

I have not discovered 'lyrics' yet as such. I'm catching up to more seasoned music players here. Just discovered BPM the other day, and playing with that inbetween other things.. :)
Image

Post Reply