IPB

Welcome Guest ( Log In | Register )

4 Pages V  < 1 2 3 4 >  
Reply to this topicStart new topic
> XML and HTML export configuration file, Creates an XML file from your mp3tags
squonk63
post Feb 3 2006, 14:02
Post #31


Italian Translator


Group: Translators
Posts: 53
Joined: 16-February 05
Member No.: 1559
Mp3tag Version: 2.36



I think the album artist tag you are using for the compilation is not in my xml data, maybe because I've never used it in my tags.

If I've well understood you have %album_artist% which is 'Various artists' and an %artist% tag for the track artist...

Is %album_artist% tag always present, or you use it only for compilations?

Could you post a sample of your xml file?


Let me know, and I'll try to update all this stuff...

Bye
Go to the top of the page
 
+Quote Post
dano
post Feb 3 2006, 14:52
Post #32


Moderator


Group: Moderators
Posts: 5688
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.65a



You can't script inside $loop() function.
There's 2 workarounds (since v2.35a) for the album artist issue ATM:
Copy all ARTIST tags to BAND and for compilations do BAND=VA and use $loop(%band%)
or if you have a foler structure like
artist\album\*.mp3
$loop(%_parent_directory%) can be used


--------------------
Go to the top of the page
 
+Quote Post
kockroach
post Feb 3 2006, 15:21
Post #33


Member


Group: Full Members
Posts: 34
Joined: 4-January 06
Member No.: 2559
Mp3tag Version: 2.51



I had been putting together my reply to squonk63's post, and while previewing the post, I saw dano's reply. Thanks dano! Your %_parent_directory% idea worked.....that is after I changed from 2.35 to 2.35a. I had tried using the other directory fieldnames but couldn't get anything to work with 2.35.

I suppose I could have used the %band% tag just for this purpose, but I figure why create a tag in the file for just this purpose.

It is too bad that you can't script in the $loop(), that would have been nice.
Go to the top of the page
 
+Quote Post
kockroach
post Feb 3 2006, 18:16
Post #34


Member


Group: Full Members
Posts: 34
Joined: 4-January 06
Member No.: 2559
Mp3tag Version: 2.51



I apologize for being a pain, but I have found two problems that seem to relate to punctuation marks--specifically & and #.

This problem occurs regardless of using $loop(%artist%), or $loop(%_parent_directory%) as discussed in the above posts. Here is a picture of the problem I am seeing:



On the left half, the red circles show where a problem occurs with the "&" symbol. I had to manually delete the "&" from the entry in the XML file so that it would create the view in Firefox. If the "&" is present it gives the following error :

"XML Parsing Error: not well-formed Location: file:///E:/Music/MP3TAG%20List/MP3List.xml Line Number 19, Column 14: <name>Sly & The Family Stone</name> ---------------------------^"

I can also prevent the error by pulling out the Parent Directory or Artist by using $replace(%fieldname%,&,And). This would then give me "Sly And The Family Stone" instead of "Sly & The Family Stone". However, if you look at the blue circle, the "&" is there. This %artist% tag comes from the "$loop(%track%)" (I changed it from the original for sorting purposes mentioned earlier in thread). It would seem that there is an inconsistency in allowing the "&" symbol. Here is the XML file that was used to generate the attached picture.
Attached File  MP3List.xml ( 26.55K ) Number of downloads: 644


The right half of the picture shows a problem that occurs with the hyperlinks. It is having problems with the "#" symbol. The album does have the appropriately named JPG in the folder, and when you hover over the area where the pic should be, it does show the proper link to the folder and file. The problem is that the link in Firefox in the Page Info is the following:

file:///E:/Music/MP3/Various%20Artists/Billboard%20#1s-%20The%20'80s%20(Disc%201)/folder.jpg

If I type in the path myself into the address bar, it will show the picture, but the link is displayed as :

file:///E:/Music/MP3/Various%20Artists/Billboard%20%231s-%20The%20'80s%20(Disc%201)/folder.jpg

The bold text is the only difference between the two links. The same applies to the M3U link when you click on that section. My problem is that I don't know where to make a change in the CSS or SCRIPT files to correct this.

Any thoughts? And sorry for the long post....hope I am clear about what is happening.

This post has been edited by kockroach: Feb 3 2006, 18:24
Go to the top of the page
 
+Quote Post
squonk63
post Feb 3 2006, 18:49
Post #35


Italian Translator


Group: Translators
Posts: 53
Joined: 16-February 05
Member No.: 1559
Mp3tag Version: 2.36



For the first problem: you have removed the CData section from the artist name; be sure to have this in your mte file:
<artist>
<name><!'['CDATA'['%artist%']'']'></name>

instead of
<artist>
<name>%artist%</name>


For the second problem try to remove the quote character from the path instead of the # char.

Let me know...
Go to the top of the page
 
+Quote Post
kockroach
post Feb 3 2006, 19:07
Post #36


Member


Group: Full Members
Posts: 34
Joined: 4-January 06
Member No.: 2559
Mp3tag Version: 2.51



First problem solved. Didn't even realize I removed some of that info from the MTE file. Thanks!

For the second problem, it didn't work when I removed the single quote mark ('). I copied the entire folder, but removed the ' from the folder name. The JPG doesn't show in the export in Firefox, and the link doesn't point to the M3U file in the folder. It will only do it when I change the "#" in the address to "%23" as mentioned in my previous post. This seems to be the only punctuation mark that has a problem.
Go to the top of the page
 
+Quote Post
kockroach
post Feb 5 2006, 19:37
Post #37


Member


Group: Full Members
Posts: 34
Joined: 4-January 06
Member No.: 2559
Mp3tag Version: 2.51



This is to add to the above comment about the second issue, which is with the "#" when linking to files.

I have created exports for the same album using this export config, as well as tested it with the "html_nickless_color_schemes_albumcover" and the "html_dano_albumcover" export configs. I see the exact same issue with the config from nickless, but not with the one from dano.

Edit: I figured out a way to get it to work when there is a '#' in the filepath.

Instead of using
CODE
$replace(%_folderpath_rel%,\,/)

or
CODE
$replace(%_filename_rel%,\,/)

in the album and track (originally filename) loops I used these:
CODE
$replace($replace(%_folderpath_rel%,\,/),#,'%23')

CODE
$replace($replace(%_filename_rel%,\,/),#,'%23')


This post has been edited by kockroach: Feb 6 2006, 17:22
Go to the top of the page
 
+Quote Post
nickless
post Feb 6 2006, 20:05
Post #38


Member


Group: Full Members
Posts: 383
Joined: 9-August 04
From: Germany
Member No.: 1114
Mp3tag Version: 2.49



QUOTE (kockroach @ Feb 5 2006, 19:37)
This is to add to the above comment about the second issue, which is with the "#" when linking to files.

I have created exports for the same album using this export config, as well as tested it with the "html_nickless_color_schemes_albumcover" and the "html_dano_albumcover" export configs.  I see the exact same issue with the config from nickless, but not with the one from dano.

I can't reproduce this with folder.jpg-s, but links to files are fixed now biggrin.gif

Regards
nickless


--------------------
My Exports

/(bb|[^b]{2})/ that is the question...
user posted image - emerge the world
Go to the top of the page
 
+Quote Post
squonk63
post Feb 6 2006, 21:46
Post #39


Italian Translator


Group: Translators
Posts: 53
Joined: 16-February 05
Member No.: 1559
Mp3tag Version: 2.36



Many thanks for the fix, I'll update the zip file asap...

Do you have the same problem with Internet Explorer too?
Go to the top of the page
 
+Quote Post
kockroach
post Feb 6 2006, 22:19
Post #40


Member


Group: Full Members
Posts: 34
Joined: 4-January 06
Member No.: 2559
Mp3tag Version: 2.51



No problem...glad I could help.

As far as IE goes (which I don't really use), it won't open the file. It gives this error:
QUOTE
XML Parsing Error: Switch from current encoding to specified encoding not supported.

Location: file:///E:/Music/MP3TAG List/MP3List.xml
Line Number 1, Column 44:
<?xml version="1.0" encoding="ISO-8859-1"?>
--------------------------------------------^


However, I can get it to work if I make a change to the first line in my MP3List.xml file.

The first line in my XML file says:

CODE
<?xml version="1.0" encoding="ISO-8859-1"?>

To get the file to open properly in IE, I need to change it to:
CODE
<?xml version="1.0" encoding="UTF-8"?>


I haven't tested this on my whole MP3 directory, just the albums that had the problems with the "#" and "&" characters. Seems to work fine when I make that small change.
Go to the top of the page
 
+Quote Post
kockroach
post Feb 7 2006, 19:58
Post #41


Member


Group: Full Members
Posts: 34
Joined: 4-January 06
Member No.: 2559
Mp3tag Version: 2.51



Hey squonk63,

I made an adjustment to the "bitrate" that is reported for the album, so that it is actually the average bitrate instead of the bitrate from the first track in the album. The change uses the average bitrate calculation that is in dano's "html_dano_01_ex_mp3tag" export config.

I'll post the changes, but want to make sure it is okay with you and dano first.

This post has been edited by kockroach: Feb 7 2006, 20:37
Go to the top of the page
 
+Quote Post
squonk63
post Feb 7 2006, 21:51
Post #42


Italian Translator


Group: Translators
Posts: 53
Joined: 16-February 05
Member No.: 1559
Mp3tag Version: 2.36



QUOTE (kockroach @ Feb 7 2006, 19:58)
I'll post the changes, but want to make sure it is okay with you and dano first.
*


Feel free to post any mod on my files.
I'm glad to know that there is someone else working on this...
Go to the top of the page
 
+Quote Post
dano
post Feb 7 2006, 22:38
Post #43


Moderator


Group: Moderators
Posts: 5688
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.65a



Take the code, no problem.
QUOTE
It is too bad that you can't script in the $loop(), that would have been nice.

It will probably be possible in the next release.


--------------------
Go to the top of the page
 
+Quote Post
kockroach
post Feb 8 2006, 16:23
Post #44


Member


Group: Full Members
Posts: 34
Joined: 4-January 06
Member No.: 2559
Mp3tag Version: 2.51



That would be cool to see scripting within the $loop() function. biggrin.gif

I have uploaded a file that contains the changes I made to the MTE, HTM and XSL files. You will notice that there are two sets of HTM/MTE files: one for MP3, and one for FLAC. I did this so that I can pull out and store information for my two directory paths.

I know I could have done it differently, such that there is only one MTE file, but there would still need to be a separate HTM file for each codec. So I just made paired files.

Here is the ZIP: Attached File  XSL_Squonk_mod.zip ( 8.89K ) Number of downloads: 538


Some changes that I made:

-I modified the $loop(%artist%) to account for my %album artist% tag.--I use x:/music/mp3/artist(album artist)/album/track.mp3 for my directory structure. This allows me to use "Various Artist" for compilations, otherwise, it would not keep all the tracks from a compilation together. It will sort artists while ignoring "The " in the artist name, however it will still display the "The ". For example, "The Beatles" will be in the B's, not the T's.
-Under the album loop, I made the change to correct of the problem with the "#" symbol.
-I also added a <bitrate> line, which is now used in the XSL to store the average bitrate from the entire album. (courtesy of dano smile.gif )
-I changed the $loop(%_filename_ext%) to $loop($num(%track%,2)). I did this because it kept wanting to sort tracks alphabetically...rather than numerically.
-There is also a new line in the loop (beginning with "$puts"), which is the second half of the code from dano. This is what actually creates the average bitrate for all of the tracks in the album loop.
-I added a $replace function to shorten the codec. Just thought it would help clean up the actual page in Firefox and IE.
-I also added the <comp> which is the compression ratio and %. The actual bitrate and compression for the individual tracks now appear beneath the time and size in Firefox and IE.
-To clean up the web page, I also converted the samplerate to KHz. I also added a $replace function to add in the "&" between ID3V1 ID3V2 for MP3 files.
-For the filename and filenamepath, I added in the fix for the "#" symbol.

I think that is it. Some of these are just personal preference for the layout. Hope everyone likes it.

Edit: As dano noted above, the use of %_parent_directory% means you have to have 2.35a installed.

Edit 2: ZIP file updated on 2/11.

~Kockroach

This post has been edited by kockroach: Feb 11 2006, 23:15
Go to the top of the page
 
+Quote Post
dano
post Feb 10 2006, 22:50
Post #45


Moderator


Group: Moderators
Posts: 5688
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.65a



Just a note:
When I tested/modified these configs, I wasn't happy about the long time it takes to create the xml file.
So I replaced %_md5% with
CODE
<md5>$rand()$replace($replace($replace($replace($replace(%_filename%, ,),.,),-,),&,),'',)</md5>

A pseudo checksum that exports in no time and it seems to work. Of course there are lots of other ways to do it smile.gif


--------------------
Go to the top of the page
 
+Quote Post

4 Pages V  < 1 2 3 4 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 31st October 2014 - 23:12