IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> iSquonk XSL stylesheet, An iTunes like view on your XML data
squonk63
post Sep 12 2005, 16:09
Post #1


Italian Translator


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



Hey people,
your friendly neighborhood XML guy is back and is glad to introduce you to iSquonk, the last XML toy to play with!

It comes from a request by BoraBora for an iTunes like view; this is my answer, hope he likes it.

- Many thanks to mailfor for his wonderful background image; you may find other great images by this guy on his site at deviantart, so click here and take a look! Thanks again Mike!

- The grid used in this XSL is developed by ActiveWidgets and is released under the GNU license.

- I've used again the Sarissa cross-browser implementation for XML/XSL support.

Here are the downloadable files:

The zip file with iSquonk: Attached File  iSquonk.zip ( 153.67K ) Number of downloads: 626

The mte file for the XML export Attached File  xml_md5_squonk.zip ( 782bytes ) Number of downloads: 586
. It is the same of the MP3Tag-like XSL, so no need to download or reexport your data if you have the other one. You can use iSquonk with your old MP3List.xml and with the other xsl in the same directory: when you copy the iSquonk files you will be asked if you want to overwrite some files (the Sarissa files), answer yes and go on.

To use iSquonk you need to:
1. If you don't have the MP3List.xml file, export your MP3 tags using xml_md5_squonk.mte export configuration. If you have changed the name, then you have to update iSquonk.htm (or iSquonk_ie.xml) file at the line where the MP3List.xml file is loaded.
2. Copy the file from iSquonk.zip to the same directory where your MP3List.xml file is; if you have another xsl don't worry, you can use them together (overwrite files when prompted).
3. Open iSquonk.htm or iSquonk_ie.htm.
The only difference is that the Album details pane and the Track details pane are on the right side in the first file (like in the preview) and on the left in the second.
This is because Firefox apply transparency to all objects in the page, so you may see better the background in IE, if you use the iSquonk_ie.htm version (details on the left). On the other side IE seems to go faster than Firefox when processing XML data.

Here is a preview of how iSquonk looks like when opened in Firefox.
Attached Image


When you select an artist from the artist list, the album list and the track grid are updated with all the albums and tracks by this artist in your xml data file.

When you select an album from the album list the album details pane is updated and you can open the album playlist by clicking on the cover or the title; also there are some links to search for the selected album or artist on musicbrainz, allmusic or artistdirect.

Finally when you select a track from the grid the Track details pane is updated with a link to play the track and another to search for lyrics on lyricsforall.


That's all for now, your comments are welcome...

This post has been edited by squonk63: Jan 11 2006, 21:58
Go to the top of the page
 
+Quote Post
dano
post Sep 12 2005, 17:47
Post #2


Moderator


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



That's pretty awesome I'd say smile.gif

Do you know how I can change the playlist links from the album to the artist?
CODE
<xsl:value-of select="title" />.m3u  <-- this part

I also have minor some display issues with firefox after I resize the browser window (e.g. to fullscreen [F11]) but the rest seems to work well.


--------------------
Go to the top of the page
 
+Quote Post
squonk63
post Sep 12 2005, 18:20
Post #3


Italian Translator


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



QUOTE (dano @ Sep 12 2005, 17:47)
That's pretty awesome I'd say smile.gif

Do you know how I can change the playlist links from the album to the artist?
CODE
<xsl:value-of select="title" />.m3u  <-- this part

I also have minor some display issues with firefox after I resize the browser window (e.g. to fullscreen [F11]) but the rest seems to work well.
*


the complete code for the playlist name file is:
CODE
<xsl:value-of select="path" /><xsl:value-of select="title" />.m3u


you may try to change it to
CODE
<xsl:value-of select="path" /><xsl:value-of select="track[1]/artist" />.m3u


I've changed somethin from the very first release of the mte export to the last one and I've added the artist name and album title to the track data. So in the code above you read the artist name from the first track of the album.
Anyway pay attention to the first "value-of" which contains the path of the playlist; do you keep all mp3 files for the artist in the same dir with a unique playlist for the artist?

bye

This post has been edited by squonk63: Sep 12 2005, 18:21
Go to the top of the page
 
+Quote Post
dano
post Sep 12 2005, 20:02
Post #4


Moderator


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



Thanks it works.
I got every album in a seperate directory and in each directory a %artist%.m3u though it could change sooner or later again..

Have you thought about if it was possible to send a mp3 file directly to its media player without getting that "Save Dialog" from the browser?
Google Desktop Search had that, but it has a server running in the background I think.
Or embedding a player like WMP in the website to directly play the files
Don't know if that such a thing is in your interest?


--------------------
Go to the top of the page
 
+Quote Post
squonk63
post Sep 12 2005, 20:51
Post #5


Italian Translator


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



I've fixed the .htm files to prevent the problem with the full screen mode; I've tried it and now it works. I think you have to downoad the iSquonk.zip file again...

QUOTE (dano @ Sep 12 2005, 20:02)
Thanks it works.
I got every album in a seperate directory and in each directory a %artist%.m3u though it could change sooner or later again..


yes, everyone has his preference about naming files; maybe a fixed filename like playlist.m3u should be better, maybe I'll change my mind...

QUOTE (dano @ Sep 12 2005, 20:02)
Have you thought about if it was possible to send a mp3 file directly to its media player without getting that "Save Dialog" from the browser?


yes, I've thought about it, but I don't know if this can be done in a simple and portable way... portable between different browsers and different media players I mean...
If someone here knows how this can be done easily, I'll update the code.
Go to the top of the page
 
+Quote Post
Florian
post Sep 12 2005, 21:28
Post #6


Developer


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



Wow - this is really amazing! I've never thought of these possibilities when I've implemented the export feature.

This is really nice work and much appreciated - thank you smile.gif

Best regards,
~ Florian

P.S. I'll wait some days till I'll update the archive (for minor changes maybe).


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

Go to the top of the page
 
+Quote Post
squonk63
post Sep 12 2005, 22:57
Post #7


Italian Translator


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



QUOTE (Florian @ Sep 12 2005, 21:28)
...I've never thought of these possibilities when I've implemented the export feature.

yes, but the truth is that sometimes with a simple thing, like a text export function can be, you can do more complicated things...

and as you can see i began with a simple formatting stylesheet, but some client-side Javascript may add great value to a report

QUOTE (Florian @ Sep 12 2005, 21:28)
P.S. I'll wait some days till I'll update the archive (for minor changes maybe).

yes, it's better to wait to see if someone else find some other bug.
Let me know and i'll try to fix it...
Go to the top of the page
 
+Quote Post
BoraBora
post Sep 14 2005, 12:07
Post #8


Member


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



squonk63, this export is simply brilliant! w00t.gif I only tested it for 5 minutes, but it seems to work perfectly. I'll test it more thoroughly tonight but I wanted to thank you ASAP.

Tip: to open a file in IE without the annoying save/open dialog box, go to the "folder options" in the file browser's "Tools" menu, then the "file types" tab. Choose an extension you need to open (I just tested with .wv, since my audio files are Wavpack). Click the "Advanced" button, then uncheck "Confirm open after download" (?). I have a french Windows, so I don't know exactly the real labels with an english Windows, but I think someone will be able to correct this.

In french, it goes like this :
Menu Outils --> Options des dossiers --> Types de fichiers --> Extension souhaitée --> Bouton "Avancé" --> Décocher "Confirmer l'ouverture après le téléchargement".

I still have to find how to do the same with Firefox, though. unsure.gif

Thanks again squonk63! cool.gif
Go to the top of the page
 
+Quote Post
squonk63
post Sep 14 2005, 14:08
Post #9


Italian Translator


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



QUOTE (BoraBora @ Sep 14 2005, 12:07)
squonk63, this export is simply brilliant!  w00t.gif I only tested it for 5 minutes, but it seems to work perfectly. I'll test it more thoroughly tonight but I wanted to thank you ASAP.


glad you like it... there was a small bug which dano pointed out, but it seems to be fixed now. Let me know if you find other which doesn't work.

I'm not sure of what performance could be with a very big xml file; keep in mind that is not a real application, but just a "dynamic report"... let me know if you find that performance are poor...

bye, cool.gif
Go to the top of the page
 
+Quote Post
BoraBora
post Sep 14 2005, 18:58
Post #10


Member


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



OK, I played with your export for half an hour now and I have nothing but praise. FWIW, I don't see a single bug. tongue.gif

QUOTE (squonk63 @ Sep 14 2005, 14:08)
I'm not sure of what performance could be with a very big xml file; keep in mind that is not a real application, but just a "dynamic report"... let me know if you find that performance are poor...

Of course, I'm aware of this. This is not a database, after all. But it's a wonderful piece of code nonetheless. smile.gif I'll probably delete some fields in the .mte to reduce the size of the MP3list.xml. All my files are in Wavpack format, so I don't really need to display the technical info for each file (Codec/Bitrate/Mode/Tags/Method). I can do without the size, too. That should lighten the browser's burden. Those are small things I can customize according to my needs and taste. tongue.gif

I have a suggestion which maybe could please most of the users: a small icon next to each track title to launch it would be nice. When you want to enqueue lots of files from different albums, it would be faster this way than clicking on the track title displayed on the bottom right (or bottom left with IE) after selecting it in the track panel.


Keep up the great work, and thanks again. walkman.gif
Go to the top of the page
 
+Quote Post
squonk63
post Sep 14 2005, 23:32
Post #11


Italian Translator


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



QUOTE (BoraBora @ Sep 14 2005, 18:58)
...I have a suggestion which maybe could please most of the users: a small icon next to each track title to launch it would be nice. When you want to enqueue lots of files from different albums, it would be faster this way than clicking on the track title displayed on the bottom right (or bottom left with IE) after selecting it in the track panel.


Updated the zip file, please download it again.
Instead of adding a small icon, now the track title in the grid is a link like the one in the track details pane. (files changed are the two htm files, iSquonk.js and iSquonk.css)

QUOTE
...I still have to find how to do the same with Firefox, though.

Firefox simply ask how to deal with the same file type when you try to open the file from a link; reply to open this file type with the same program in the future and it stops to ask you...

QUOTE
I'll probably delete some fields in the .mte to reduce the size of the MP3list.xml

Yes, but don't delete the md5 field, because it's used to do all the search in the XML.

bye walkman.gif
Go to the top of the page
 
+Quote Post
BoraBora
post Sep 15 2005, 00:23
Post #12


Member


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



QUOTE (squonk63 @ Sep 14 2005, 23:32)
Updated the zip file, please download it again.
Instead of adding a small icon, now the track title in the grid is a link like the one in the track details pane. (files changed are the two htm files, iSquonk.js and iSquonk.css)

That was quick and even better than what I suggested. w00t.gif
QUOTE
Firefox simply ask how to deal with the same file type when you try to open the file from a link; reply to open this file type with the same program in the future and it stops to ask you...

Yes, but unfortunately, the option "Do this automatically for files like this from now on" is greyed out for wavpack files. sad.gif I searched for a long time with Google a way to reactivate this checkbox but I haven't found a single way. I also searched in ini files and the registry but no solution so far...
QUOTE
Yes, but don't delete the md5 field, because it's used to do all the search in the XML.

I'm glad you warned me, because I intended to delete it! unsure.gif Then I would have spent an hour asking myself "let's see... where did I erred when I edited this file?" laugh.gif
Go to the top of the page
 
+Quote Post
squonk63
post Sep 16 2005, 14:32
Post #13


Italian Translator


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



I know that the md5 export tag slows down a lot the export process, but I've used it because it's the only field which uniquely identifies a track; I've used it also for the artist or the album, using the md5 value of the first track.

In some cases the album title or the artist name may break the code which builds the XPath expression used to search into the xml file. For example, if you try to search for steppin' out in the MP3Tag_squonk xsl, you receive an error because the text you are looking for contains the string delimiter '.

I've not found an easy way to avoid this, that's why I've chosen to use the md5 tag. If you find an alternative, we can eliminate the md5 field.

I'm glad to see that you are customizing the export and the report to your needs; if you add other functions or if you create something which looks better than mine (I'm not so great as a graphic designer, after all!), upload it.

cool.gif
Go to the top of the page
 
+Quote Post
squonk63
post Jan 6 2006, 23:14
Post #14


Italian Translator


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



Thanks to kockroach for pointing out the problem.
The ActiveWidgets grid has some problems with the latest firefox release, so I've updated the zip file with the latest gpl release of the grid.

Also fixed is a problem with the links to the track files added in the grid.

Download the updated zip file from the first post in this topic.

Bye and happy new year to all!
Go to the top of the page
 
+Quote Post
graphite
post Jan 11 2006, 21:00
Post #15


Member


Group: Full Members
Posts: 10
Joined: 5-December 05
Member No.: 2434
Mp3tag Version: 2.35



Really like the look of this but I've tried many times to get it to work .. so far no success.

I'm using XP SP2 and IE6

I've exported using xml_md5_squonk.mte to generate the MP3List.xml file and placed it in the _css folder

When I open iSquonk_ie.htm I get "No data found".

If I try to open the MP3List.xml directly using IE I get the following

The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Switch from current encoding to specified encoding not supported. Error processing resource 'file:///D:/MUSIC/iSquonk/_css/...

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


****
Any help is much appreciated
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
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: 25th October 2014 - 19:58