Sum "Length" on html standard output

All my outputs in regards to albums are done in "html_standard". I've added "length" to the output just for reference. The question is, can the "total length" (time) be added to the"html_standard" output? I know that on the bottom of MP3Tag it gives you the info on how long a particular album is. Needless to say there are albums that are over 60 minutes (actually double discs) so the coding would have to allow for that. I've tried doing it in Excel but I gave up, no matter how I formatted the cells it just wouldn't work and for doing time calculations is beyond anything I know. Any help would be greatly appreciated.

I think there is already a variable for it:
%total_time%
Insert it at the end of the export, with some leading text perhaps

Wouldn't the syntax be the same as the column? In other words because the column being called "Length" I would guess the syntax would be %tota_length%. Again I'm guessing that the variable would have to point to a column that is in the html. As far as some leading text I have no clue as to what taht may be. I just came up with an idea but I''ll have to test it it to see if it works, all it can do is come back with an error or nothing at all.

%_total_time%

And if nothing helps - the help might help: see page https://docs.mp3tag.de/export and look for "Global placeholders"

Well, I read the Export configuration and tried an number of ways to sum all tracks using a 22 track album. Bottom line is it can't add the 22 tracks together to come up with the total time or the string which has to precede %_total_time% is incorrect. I can only use what is already shown in notepad and that string :<td$if($odd(%_counter%), class="odd",)>$replace(%_length%,&,&) won't work. I even tried a $loop(_total_time%) and all it does is take the length of all the tracks duplicates the track length and put it at the bottom of the html output. Adding the times together to come up with the total time of all the tracks is beyond me, I'm no programmer so I guess I'll just have to settle for what is given. What is funny is that the program can come up with the answer yet I can't. Oh well, such is life but thanks anyway for your help.

I just added

and it gives me
"Total Time: 1 day, 08:27:47"
for the number of files for which I created the export.

The last couple of lines in the modified export look like this:

QUELLTEXT
%_filename_ext%
    </tr>

$loopend()

</table>
<p>Total Time: %_total_time%</p>
Perhaps it helps.
QUOTE (ohrenkino @ Jan 28 2018, 20:01) <{POST_SNAPBACK}>
I just added

and it gives me
"Total Time: 1 day, 08:27:47"
for the number of files for which I created the export.

The last couple of lines in the modified export look like this:

<td$if($odd(%_counter%), class="odd",)>%_filename_ext%</td>
        </tr>
$loopend()

    </table>
    <p>Total Time: %_total_time%</p>
</html>

Perhaps it helps.

Buddy, that did it. Thank you so very much. I knew it could be done but if you don't do coding either for a living or on a regular basis you get lost very easily. Thank you again.

QUOTE (ohrenkino @ Jan 28 2018, 20:01) <{POST_SNAPBACK}>
I just added

and it gives me
"Total Time: 1 day, 08:27:47"
for the number of files for which I created the export.

The last couple of lines in the modified export look like this:

<td$if($odd(%_counter%), class="odd",)>%_filename_ext%</td>
        </tr>
$loopend()

    </table>
    <p>Total Time: %_total_time%</p>
</html>

Perhaps it helps.

I used your modifications to the HTML output and yes it worked great and it does give you the total time. I might have been a little to happy about the outcome though. I found that doing about 2200 entries comes up with a different outcome. Granted it DOES give you the total time, even days, however it also gives you another column to the right of "Length" called "Filename" which shouldn't be there. so what I did was remove "[code]<td$if($odd(%_counter%), class="odd",)>%_filename_ext%" and everything was back to normal except the "Title" is a little to far from the left of the page but I can live with that. I'mgoingto add attachments to this, I hope, to show what I mean. I wanted to upload 2 files but it will allow me to only upload one. I chose the long file first, wanted to show the difference between the two. But yo try it and see what you get


It was my intention to show you where I added the extra piece of information so I appended the original html_standard script.
I do not really understand what your problem is.
If you have only 2 problematic files it should be possible to generate the export for just these 2 for demonstration purposes.

I had no idea that you had done that. I just assumed that the code that you supplied was the way it was supposed to be entered at the end of the original code and that's exactly what I did. I apologize if there any misunderstanding.

I took the idea of the modification in that export script from your initial post

That is why I used that original script.

I only have one more question, how do you change the font size in

=Total Time: %_total_time%

?
I've tried to use line three in the original HTML where it states font-size but nothing changes. The expression IS part of the BODY of the HTML, yet when I change the font size the expression result stays the same size. I did some searching and I have found the

and it does show how to change the style
and color and I've tried to use them, possibly in the wrong manner but I have tried and nothing works. I know I'm missing something something somewhere but I have no idea what that something is.

e.g.

=Total Time: %_total_time%

Believe it or not I tried that but the only thing I forgot (or didn't know) is the
Thank you.

Just a followup on your last info in regards the font size.
Here's what I have as you explained it :

=Total Time: %_total_time%


I want to upload a copy of the result, something is off. Note that I have the font at "9" and note the text versus the outcome. I don't want to be a pain and I should be satisfied with the results but this is a little too much


I am too old apparently.
Newer codes ask for relative statements like

 xx-small
x-small
small
medium
large
x-large
xx-large

So,

=Total Time: %_total_time%

could lead to a nicer look.

Umm, I tried your correction and nope don't work. Here's a copy of my code in the HTML:

=Total Time: %_total_time%

I put large because I used medium and it wouldn't work either, just went back to the original size it was when we first started. I've been looking at how they do the

in W3Schools and I have found "style" and I have found how to make the text larger but it's for CSS. What I don't understand is that even though you have added another

to the original text of the HTML, isn't what you have added part of the body of the original HTML? and if so shouldn't you be able to enlarge the text in the original . I've tried that part but all I'v done is enlarge the first

and first $loop but it will not effect anything after
where the expression is for total time. That part I don't understand because it should unless there's something missing in the and also if this is done in CSS I'm dead in the water cause I have no clue about it.

Well, I kept playing around, took me about an hour and a half but I got it. Here's what I did:

  1. Went under the original h1 and created an h2 with the same syntax.
  2. Put the h2 in front of the

    and ended up with the following syntax:

=Total Time:%_total_time%

and it works. Attached is the result. At the same time you should be able to change the size of the text. I'm going to try changing the sixe of the text just to make sure but I believe that if it works at the top there should be no reason why it shouldn't work here.


Making the paragraph a heading is one possibility.

Here is another one:
add the line with "p" to the style definition in the head (I added the 2 lines before the new line for orientation)

QUELLTEXT
.title { font-weight: bold; padding: 7px; margin: 0px; color: #000; }

.odd { background-color: #ccc; }
p { font-size: large; }

The line for the total time can look like this:

QUELLTEXT

=Total Time:%_total_time%