hi all!
first, thanks for this great piece of software.
got one question though:
i tried (for several days now) to create a script for a (korean) web source on my own, using this online help: https://docs.mp3tag.de/tag-sources.
but actually being a total newbie to scripting or even programming, i didnt come very far. so is there anyone willing to write a little tutorial for all those newbies (as i am) out there?
that would be much appreciated!
i tried that of course, already!
but i still have no clue, in fact, those examples confused me even more! (strange loops, and a bunch of unknown (at least for me) commands...
actually i just need that album cover thing...
but as said above, i'm just clueless.
If you run the query to the website, it all depends how the site gives you its results back.
If you have only one result, some sites redirect you to the album site. If you have multiple results, it presents you with a site that let's you choose which album info you want to see.
That's the first thing you must find out.
Let's assume it gives you an overview of the results. Now you need to parse the code, to get the results in Mp3tag, so you can choose what album you want to see in Mp3tag.
Therefore you need the %_url% and one or more description fields.
When I look at the site I'd use
[IndexFormat]=%artist%|%_url%|%album%
In the [ParserScriptIndex]=... part you must fill these 3 fields with values from the html site.
You need to get the Artist, the Url to the Album and the Album name from the html code.
After that comes the
[ParserScriptAlbum]=... part.
Here you parse the final album page for information like cover, tracks,...
i tried it again, and i think im slowly beginning to understand a little bit of that concept.
after finishing my script, i wanted to test it, but i get following error:
[Name]=jukeon
[BasedOn]=http://music.jukeon.com
[IndexUrl]=http://search.jukeon.com/?ks=&kk=4&kw=%s
[AlbumUrl]=http://music.jukeon.com/album.nwz
[WordSeperator]=+
[IndexFormat]=%_url%|%album%|%artist%
[SearchBy]=%album%
[ParserScriptIndex]=...
# ###################################################################
# This script parses the artist's page for all releases
# by this artist.
#
# The output format is defined by IndexFormat above, which
# is used by the selection dialog
# ###################################################################
# Uncomment the following line if you want to write some debug output
debug "on" "c:\\\\debug_jukeon_index.out"
findline "http://boardr.jukeon.com"
do
findline "http://music.jukeon.com/album.nwz"
findinline "http://music.jukeon.com/album.nwz"
sayuntil "">"
say "|"
findline "title=""
findinline "title=""
sayuntil "">"
say "|"
findline "artist"
findline "title=""
findinline "title=""
sayuntil "">"
saynewline
while "</table></div>"
[ParserScriptAlbum]=...
# ###################################################################
# This script parses the albums page for all common information.
#
# The current output variable is set via the outputto command
# All these fields are used by the confirm online information dialog
# ###################################################################
# Uncomment the following line if you want to write some debug output
debug "on" "c:\\\\debug_jukeon_album.out"
# coverurl
outputto "coverurl"
findline "<table border=0 cellpadding=5 cellspacing=1 bgcolor="#DDD9D0">"
findinline "<img src='"
sayuntil "'"
# album
outputto "album"
findinline "title="
sayuntil ""
# artist
outputto "artist"
findline "artist_id"
findinline "title=""
sayuntil """
# year
outputto "year"
findline "ΒΉΓΒΈΓ ΓΓ"
findinline "<td>"
sayuntil "."
Do you have an idea, whats wrong about that? Should i send in a bug report?
Anyone else who got a tip for me?
The error is because your web source didn't output any info. I've also noticed that there is no debug file created. This is because there are several syntax errors in your web source: please always escape quotes if you use them as parameter - instead of sayuntil "">" use sayuntil "">"
Best regards,
~ Florian
hello!
i'm doing some mini steps forward. thanks to your tips, my script stopped crashing right in the beginning.
Could anyone with some higher skillz look over my little Do-While thing? I dont get it to repeat until . It stops right after 1 run. thanks in advance!
do
findline "<td width=\"260"
findinline "'album', "
sayuntil ");"
say "|"
findinline "class=ser>"
sayuntil "</a>"
say "|"
findline "<td width=\"200\""
findinline "class=\"ser\">"
sayuntil "</a>"
saynewline
while "</table>"
The do...while thing is the most tricky part when building a custom web source. The while command acts like an if and therefore the text from the first parameter has to be exactly the text of the current internal cursor position.
This is not the case with your script. As you can see from the logfile, the current position is <td width="200" align=" and not so the loop ends.
hi florian, thanks a lot for your quick reply.
i'm not sure what to do right now, but at least i know, where to look for.
thanks again!
cu
Yo.
the do-while thing works now! thanks. but one more question:
my output looks ok in the debug file, but in mp3tag, after searching when the screen pops up, where i could choose the correct album, the list remains blank. The program tells me to chose my album, but the albums arent listed there.
the end of my output file looks like this:
i just noticed something strange: If i query for an album without any korean fonts, it works. Could it be, that the korean font is the problem? Is there any possibility for that to be fixed?
thanx in advance
best regards