IPB

Welcome Guest ( Log In | Register )

4 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> XML and HTML export configuration file, Creates an XML file from your mp3tags
squonk63
post Feb 18 2005, 19:24
Post #1


Italian Translator


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



First of all let me say MP3Tag is great! Many thanks to florian.

This is my first attempt with export configuration files, but I hope this will be useful to someone.

I usually have an artist directory and each album in its own subdir with a cover.jpg thumbnail and a playlist.m3u file in it. So I would like to have an export configuration file with which I can create a complete report of my collection.
After some tries with the export configuration files I've found on the site, I've chosen to modify dano's cd2html to add a loop over the full collection and the jpg image for each album.

This is the result:

Attached File  html_squonk.zip ( 1.37K ) Number of downloads: 1853
the export configuration file
Attached File  MP3List.html ( 28.27K ) Number of downloads: 2877
Preview


But I was not satisfied with it; I would like to have more flexibility, like the ability to change the report layout without regenerating the full export from MP3Tag.
So I've created an XML mte, with which you can export your tags and use different XSL stylesheets to change the layout of your html report.

The structure of the XML is simple:

MP3List
artist
album
track

Each node contains other info which are taken from the MP3Tag export fields.

The second and third lines of the xml files are commented out. Each line refers to a xsl stylesheet that is used to format the output. You can uncomment the line with the stylesheet you want to use or you can create a new one and use it.
For this to work you need to put the xml file in the same directory of the xsl.

All hyperlinks in the formatted output use relative paths.

This is an XML sample Preview
Attached File  MP3List.xml ( 34.35K ) Number of downloads: 2398



Attached File  xml_squonk.zip ( 3.22K ) Number of downloads: 1720

The zip file contains the xsl_squonk.mte with two xsl stylesheets:
the first one, XSL_simple.xsl creates an HTML similar to the html_newexport.mte file
the second, XSL_squonk.xsl creates an HTML similar to the html_squonk.mte.


That's all!
Your comments are welcome...
Go to the top of the page
 
+Quote Post
Florian
post Feb 18 2005, 21:35
Post #2


Developer


Group: Admin
Posts: 7710
Joined: 12-December 01
From: Germany, Dresden
Member No.: 203
Mp3tag Version: 2.63



Thank you very much for your much appreciated work - very, very nice smile.gif

If there are no comments from other users, I'll gladly add it to the Export Configuration Archive

Best regards,
~ Florian


--------------------
♫ If you like using Mp3tag please donate to support further development.

Go to the top of the page
 
+Quote Post
squonk63
post Feb 18 2005, 21:53
Post #3


Italian Translator


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



I'm glad that you find it useful.

You can add it to the archive; let me know if there are comments or if you find errors.

Bye
Go to the top of the page
 
+Quote Post
Florian
post Feb 18 2005, 22:18
Post #4


Developer


Group: Admin
Posts: 7710
Joined: 12-December 01
From: Germany, Dresden
Member No.: 203
Mp3tag Version: 2.63



Added smile.gif


--------------------
♫ If you like using Mp3tag please donate to support further development.

Go to the top of the page
 
+Quote Post
squonk63
post Feb 19 2005, 13:01
Post #5


Italian Translator


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



QUOTE (Florian @ Feb 18 2005, 10:18 PM)


Great! smile.gif

Maybe I will add some new XSL stylesheet. I will post them too, if you like; you may add them under the XML section of the gallery...
Go to the top of the page
 
+Quote Post
squonk63
post Aug 18 2005, 12:53
Post #6


Italian Translator


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



This is a small update to the xml export configuration file, which adds the album title and the artist name to the track node.

Attached File  xml_squonk.zip ( 757bytes ) Number of downloads: 1045


I've added also the md5 tag in a separate export configuration file, because it slows down the export.

Attached File  xml_md5_squonk.zip ( 788bytes ) Number of downloads: 984



I've created also a new stylesheet with the mp3tag web design, but it uses the logo, css and images from this web site; it's a very nice thing, but I'll upload it only if Florian will give his permission.

Let me know, Florian...

This post has been edited by squonk63: Aug 18 2005, 13:28
Go to the top of the page
 
+Quote Post
Florian
post Aug 18 2005, 21:59
Post #7


Developer


Group: Admin
Posts: 7710
Joined: 12-December 01
From: Germany, Dresden
Member No.: 203
Mp3tag Version: 2.63



QUOTE (squonk63 @ Aug 18 2005, 13:53)
I've created also a new stylesheet with the mp3tag web design, but it uses the logo, css and images from this web site; it's a very nice thing, but I'll upload it only if Florian will give his permission.

Thanks for the update!

Feel free to upload your stylesheet - I'll update the entry at the archive when I find a little bit more time smile.gif

Best regards,
~ Florian


--------------------
♫ If you like using Mp3tag please donate to support further development.

Go to the top of the page
 
+Quote Post
squonk63
post Aug 19 2005, 00:56
Post #8


Italian Translator


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



Many thanks, Florian. I've done it because I like a lot your web site design.

So, this stylesheet is a mini web site created by the contents of the xml file exported by MP3Tag.
You can browse the album info, launch your media player from the web page and search xml data for the track titles, album titles or artist name containing the text you specify.

To use it:
1. export your tags from MP3tag using xml_md5_squonk configuration file and put the XML file in the root directory containing your music
2. copy in the same directory the content of the MP3TagXSL.zip file (except the readme.txt)
3. Open your MP3List.xml file; if you have XP SP2 installed you may have a security warning because there are some scripts in the xsl file, ignore it because it's safe to open the file.

Don't use the file preview.zip; it is for Florian to setup a preview in the export configuration archive.

Attached File  MP3TagXSL.zip ( 15.07K ) Number of downloads: 1001


* (23-08 fixed a bug in SearchResults.XSL)

Your comments and enhancements are welcome.
Enjoy!!

This post has been edited by squonk63: Aug 23 2005, 14:32
Attached File(s)
Attached File  Preview.zip ( 8.21K ) Number of downloads: 878
 
Go to the top of the page
 
+Quote Post
BoraBora
post Aug 26 2005, 15:41
Post #9


Member


Group: Full Members
Posts: 19
Joined: 26-August 05
Member No.: 2087
Mp3tag Version: 2.50



Thanks for this XML export, squonk63. Really really nice! smile.gif

I have a hard time making it work in Firefox, though. The display is all messed up and the search function doesn't work. Do you think you could fix this? Do you wish me to post a screenshot? There's not a single problem in IE, but I don't use it anymore and I'd like to be able to use Firefox instead.

On another note, would you have some time and will to do another style based on your XML export? I've been hoping for a very long time someone would do a iTunes-like 3-panes export (artist/covers/tracks) and I think your XML file could support it. If you're willing to try it, I'll do some mock-ups in a paint program to illustrate what I have in mind.
Go to the top of the page
 
+Quote Post
squonk63
post Aug 28 2005, 13:57
Post #10


Italian Translator


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



QUOTE (BoraBora @ Aug 26 2005, 15:41)
I have a hard time making it work in Firefox, though. The display is all messed up and the search function doesn't work. Do you think you could fix this? Do you wish me to post a screenshot? There's not a single problem in IE, but I don't use it anymore and I'd like to be able to use Firefox instead.

It was not intended to work with all browser and the script makes use of ActiveX and MSXML, so no surprise that it doesn't work with Firefox...
Anyway, after your post I've installed a copy of Firefox and googled a lot and I'm looking for a solution; so stay tuned, if I find one I'll post a new version.

QUOTE (BoraBora @ Aug 26 2005, 15:41)
On another note, would you have some time and will to do another style based on your XML export? I've been hoping for a very long time someone would do a iTunes-like 3-panes export (artist/covers/tracks) and I think your XML file could support it. If you're willing to try it, I'll do some mock-ups in a paint program to illustrate what I have in mind.
*

Yes, I know the iTunes view you're talking about (the three lists on the top panel, for genre, artist and album and the track list in the down panel) and it can be done with xml, xsl and some Javascript. I like the idea, but I don't know when I'll have the time.
If you have some ideas an html file will be more useful than a simple image.

Anyway, you can try also by yourself, it's not so difficult...
Go to the top of the page
 
+Quote Post
BoraBora
post Aug 28 2005, 16:49
Post #11


Member


Group: Full Members
Posts: 19
Joined: 26-August 05
Member No.: 2087
Mp3tag Version: 2.50



QUOTE (squonk63 @ Aug 28 2005, 13:57)
It was not intended to work with all browser and the script makes use of ActiveX and MSXML, so no surprise that it doesn't work with Firefox...
Anyway, after your post I've installed a copy of Firefox and googled a lot and I'm looking for a solution; so stay tuned, if I find one I'll post a new version.

Thanks! Much appreciated. smile.gif
QUOTE (squonk63 @ Aug 28 2005, 13:57)
Yes, I know the iTunes view you're talking about (the three lists on the top panel, for genre, artist and album and the track list in the down panel) and it can be done with xml, xsl and some Javascript. I like the idea, but I don't know when I'll have the time.
If you have some ideas an html file will be more useful than a simple image.

Anyway, you can try also by yourself, it's not so difficult...
*

Thanks again! I don't know a lot about XML or even HTML but I'm going to ask around. cool.gif
Go to the top of the page
 
+Quote Post
squonk63
post Aug 31 2005, 18:49
Post #12


Italian Translator


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



Finally, it works!! Now it behaves the same in IE and Firefox.

Attached File  MP3Tag_XSL.zip ( 29.46K ) Number of downloads: 1440


If you use another browser and it works, let us know; if it doesn’t, sorry but I have no time to port it; you have the source, so feel free to change it to make it working with your browser of choice.

Thanks to BoraBora for pointing out the problems with Firefox, and to the Sarissa project for their cross-browser JavaScript implementation of XML/XSL support. You can find it at Sourceforge

What’s new
1. The XML file is now loaded in a script into MP3Tag_squonk.htm file which is the new entry point.
2. The XSL style sheets have been moved to the _css directory
3. I was not able to create a unique XSL file for Firefox and Internet Explorer so there are two MP3Tag_squonk_xxx.xsl, the script loads the correct one based on the browser you are using
4. The JavaScript code is now in _script/MP3Tag_squonk.js
5. The new _script subdirectory contains also the Sarissa code.

How to use
1. Export the tags from MP3Tag using this updated xml_md5_squonk export. (The only thing changed is that the xsl-stylesheet directive in the XML file has been removed) Attached File  xml_md5_squonk.zip ( 787bytes ) Number of downloads: 1401

2. Place the content of the MP3Tag_XSL.zip file (MP3Tag_squonk.xml, _css, _images and _script subdir) in the same directory of the exported XML file.
3. Open MP3Tag_squonk.htm in your browser.

What you have is a mini web summary of your MP3 compilation with a search function to look for song artist or album whose name contains the text you specify.

If you want to change the name used for htm and xml files:
You can change MP3Tag_squonk.htm to what you prefer; this does not affect the scripts
If you change MP3List.xml, then open your htm file and update line 30 with the new filename
CODE
xmlData.load('MP3List.xml');
must be updated to load your xml file.


Hope you like it!
Go to the top of the page
 
+Quote Post
dano
post Aug 31 2005, 21:36
Post #13


Moderator


Group: Moderators
Posts: 5683
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.63



QUOTE
Hope you like it!

It's great!
Interesting to see what can be done with xml.


--------------------
Go to the top of the page
 
+Quote Post
squonk63
post Aug 31 2005, 22:32
Post #14


Italian Translator


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



QUOTE (dano @ Aug 31 2005, 21:36)
It's great!
Interesting to see what can be done with xml.
*


Thank you, dano.
Yes, it’s true; I was surprised too of xml power.
Usually I play C++ and I began just for kidding, but I’ve learned a lot of interesting things.
And of course I have some other ideas to play with, so this is only the beginning.

I hope to find the time…
Go to the top of the page
 
+Quote Post
BoraBora
post Aug 31 2005, 22:41
Post #15


Member


Group: Full Members
Posts: 19
Joined: 26-August 05
Member No.: 2087
Mp3tag Version: 2.50



QUOTE (squonk63 @ Aug 31 2005, 18:49)
Finally, it works!!

I just tried it and... yes it does! w00t.gif Thanks a lot!
QUOTE
Hope you like it!

I do! walkman.gif
Go to the top of the page
 
+Quote Post

4 Pages V   1 2 3 > » 
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: 2nd September 2014 - 15:08