New Export to HTML Settings (featuring Display of Lyrics)

[quote name='Flskydiver' post='56772']
Thanks for the feedback!

This bit in the code writes the lyrics sections, so first delete this if you don't want them included in the html at all:

<div id="Title $get(TITLE)" class="db shl" align="center">
<div class="lyr">$iflonger(%unsyncedlyrics%,5,<pre>$cutLeft(%unsyncedlyrics%,5)</pre>,)</div>
</div>

There is some other code which generates the css and javascript formatting for the lyrics you could also take out, but leaving it in won't hurt anything.

Modifications looks great. I want to make a few more changes to your suggestions. Is it possible to align the Media Format to the Right and add a line break between Artist and Album.

Here's the way it looks in HTML.

Beniot-Freeman Project

     1994 • The Beniot/Freeman ProjectCD (Original Media)
                         1  [▶]  Reunion • 05:07
                         2  [▶]  When She Believed In Me • 05:27
                         3  [▶]  Mediterranean Nights • 06:58
                         4  [▶]  Swept Away • 04:58
                         5  [▶]  The End Of Our Season • 04:19
                         6  [▶]  After The Love Has Gone • 04:20
                         7  [▶]  Smartypants • 05:44
                         8  [▶]  It's The Thought That Counts • 06:05
                         9  [▶]  Mirage • 06:01

Billy Preston

     1982 • The BestCD (Original Media)
                         1  [▶]  Outa-Space • 04:15
                         2  [▶]  Will It Go Round In Circles • 03:50
                         3  [▶]  That's The Way God Planned It (Live) • 04:18

Blondie

     1981 • The Best Of BlondieCD (Original Media)
                         1  [▶]  Heart Of Glass • 04:29
                         2  [▶]  Dreaming • 03:04
                         3  [▶]  The Tide Is High • 04:36
                         4  [▶]  In The Flesh • 02:30
                         5  [▶]  Sunday Girl • 03:01

Bob Marley

     2004 • The Best Of Bob MarleyCD (Original Media)
                         1  [▶]  Trench Town Rock • 02:53
                         2  [▶]  Mr. Brown • 03:29
                         3  [▶]  How Many Times • 02:24
                         4  [▶]  Soul Rebel • 03:45
                         5  [▶]  Treat You Right • 02:12

Bobbi Humphrey

     1992 • The Best OfCD (Original Media)
                         1  [▶]  New York Times • 06:53
                         2  [▶]  Uno Esta • 06:45
                         3  [▶]  Harlem River Drive • 07:51

I would like to change it to where the Media type is aligned to the right, and a line space between Albums. So it display as follows:

Beniot-Freeman Project

     1994 • The Beniot/Freeman Project   -------------                                                CD (Original Media)
                        
                         1  [▶]  Reunion • 05:07
                         2  [▶]  When She Believed In Me • 05:27
                         3  [▶]  Mediterranean Nights • 06:58
                         4  [▶]  Swept Away • 04:58
                         5  [▶]  The End Of Our Season • 04:19
                         6  [▶]  After The Love Has Gone • 04:20
                         7  [▶]  Smartypants • 05:44
                         8  [▶]  It's The Thought That Counts • 06:05
                         9  [▶]  Mirage • 06:01

Billy Preston

       1982 • The Best                                 ----------------                                 CD (Original Media)
                        
                         1  [▶]  Outa-Space • 04:15
                         2  [▶]  Will It Go Round In Circles • 03:50
                         3  [▶]  That's The Way God Planned It (Live) • 04:18

Blondie

       1981 • The Best Of Blondie                   ---------                                          CD (Original Media)
                   
                         1  [▶]  Heart Of Glass • 04:29
                         2  [▶]  Dreaming • 03:04
                         3  [▶]  The Tide Is High • 04:36
                         4  [▶]  In The Flesh • 02:30
                         5  [▶]  Sunday Girl • 03:01

Bob Marley

      2004 • The Best Of Bob Marley                          --------                                CD (Original Media)
                         1  [▶]  Trench Town Rock • 02:53
                         2  [▶]  Mr. Brown • 03:29
                         3  [▶]  How Many Times • 02:24
                         4  [▶]  Soul Rebel • 03:45
                         5  [▶]  Treat You Right • 02:12
     
     1992 • The Best Of         --------                                                                  CD (Original Media)
                         1  [▶]  New York Times • 06:53
                         2  [▶]  Uno Esta • 06:45
                         3  [▶]  Harlem River Drive • 07:51

Last, is there a size limit creating in an HTML. The reason I'm asking is I currently have my database divided into 4 selection: A-I, J-Q, R-S, T-Z. Makes it easier to load and manipulate.

Not sure what would happen if I tried to append all to one file. Probably would be manageble.

Thanks or all your assistance.

You could do it with tables, but you'd need to update the CSS.
For example, you could add a "Menu" class to the existing tables and a "Line Item" Class for the new tables. Otherwise, all the albums would be in gray bordered boxes like the menus.

Using tables, the basic idea is to create a two column table for every album title / format line and justify the second to the right. Try changing this

<div class="alb">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %year% · <a href="java script:showhideA(''Album $put(ALBUM,$add($get(ALBUM),1))'')">%album%</a> · %YOUR FORMAT TAG%</div>to something like
<table width="50%%"><tr><td><div class="alb">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %year% · <a href="java script:showhideA(''Album $put(ALBUM,$add($get(ALBUM),1))'')">%album%</a></div></td><td align="right"><div class="alb">%YOUR FORMAT TAG%</div></td></tr></table>

You could probably do it more cleanly with with CSS but I wouldn't know how off the top of my head. I specifically tried to avoid using tables because they add so much BLOAT to html code. For example, you might want to keep the left edge of the format types in line (justified left) so that would require you specifying the width of each column. More code. Repeated over and over for every album, it gets to be a lot of overhead.

If going the tables route, you could adjust the table cellpadding or margins to push out the surrounding text.

Otherwise, to put a line break before and after each artist name (except before the first one), add a "
" tag immediately before the third instance of "$loop" and another immediately before the second instance of "$loopend()".

Do similar if you also want spaces after each album (your example was inconsistent).

Technically, no, but to keep it relatively responsive in your browser try to keep the output file under 10mb.

My posted example is about that size and has the complete lyrics to over (IIRC) 5000 songs and over 6000 songs in all. By not including lyrics in your list I would think you could easily have 20,000 songs or more. The lyrics definitely make the bulk of my output code.

Hope this helps.

[quote name='Flskydiver' post='56812']
You could do it with tables, but you'd need to update the CSS.
For example, you could add a "Menu" class to the existing tables and a "Line Item" Class for the new tables. Otherwise, all the albums would be in gray bordered boxes like the menus.

Update. I passed on the CSS modification. Actually, could not quite under how to modify, but the Html looks great and I like the layout.

However, I have a problem with printing the document. I can only print the first page.

No matter what the size of the Html wether I'm using IE or Firefox. I did some research and it seems it has something to do with the CSS.

Any Idea what's causing this and how to eliminate the problem.

Thanks

Yeah, I didn't write this with printing in mind. I wrote it to provide me quick, easy access to song lyrics. But looking at it now I can see there could be issues printing it to paper, if someone wanted to do that. I'll have to add a "print mode" button in the next version. Should be easy enough.

In the meantime, you might want to try one of the simpler early versions of my script.

You can try making the edits suggested above to one of the .mte posted here:
/t/12005/1 Nevermind, see below.

NEW IN VERSION 1.3:

  • Added "P" (Print Mode) Button for Beluna. Click this button when you have your list sorted the way you like it to hide all the sorting menus and format the list for printing from you web browser (if for example you want a hard copy or .pdf).
  • The improved sorting method introduced in 1.2 could make exports very slow.

    To speed up the export time dramatically, you should now run the custom action (included) on all your tracks prior to export. The action will create a new custom tag "GroupArtist" and populate it with either "123" or a letter from "A" to "Z", based on the first Alpha-numeric character in the band or artist's name, to be used later during export when building the sort menu. You only need to do this once (unless you change the Artist's or Band's names. Thanks to DetlevD.

    Much discussion about this above.

  • Numerous updates and improvements to underlying code.

I only included the annotated version for 1.3. It's the easiest to work with and I don't have time to make the other versions at the moment.

See post 1 of this thread to download.