Hello, I have an export .mte that generates some fairly complex HTML to create a library report by album. Many of the tags such as %album%, %albumartist%, %title%, %_max_counter%, etc are resolved correctly in the HTML file. However, some other tags such as %_datetime%, %total_files%, %_workingdir%, %_total_size% are not being resolved.
I have reviewed the documentation, but if an explanation exists, I have not found it. Am I missing something?
Heading portion of HTML file
<div class="head1">
<div class="h11"> </div>
<div class="h12">
Music Library by Album - Contents of %_workingdir%: $fmtNum(19544) Albums | %_total_size% | $fmtNum(%_total_files%) Track$ifgreater(19544,1,s,) | $get(TText)
</div>
<div class="h13"><a href="#" onclick="w3.toggleShow(''.cmdline'');" title="Click here to show command line">Cmd</a></div>
</div><!-- end div head1 -->
I assume that I am missing something obvious and the explanation for this behavior will be user error. Should that not be the case, I will be happy to provide more comprehensive documentation.
Has it ever worked with this mix of local Javascript, external libraries like http://code.jquery.com/jquery-1.11.0.min.js, HTML stylesheets and the mp3tag variables?
AFAIC see, the problems arise in the header and footer defnition.
If you enter the statement itself, e.g. Index generated on $left(%_datetime%,$strchr(%_datetime%, )) at $mid(%_datetime%,$strchr(%_datetime%, ),16)
then all the vriables and functions get resolved.
The header apepars twice in the output.
%_max_counter% gets also resolved but most of the other statements in the header and footer section are interpreted as literals - you also see $fmtnum() and $ifgreater(%_max_counter%,1,s,).
So it is not a problem of the variables but that for some reason the header and footer parts are igrnored.
Edit: as the code has a number of ' it would be worthwhile to check whether they really appear in pairs or whether a stray single one lurks somewhere in the code.
I just took the header part of the post and put it into a new export script and let it export a text file:
$filename(New export file.txt,utf-8)
Heading portion of HTML file
<div class="head1">
<div class="h11"> </div>
<div class="h12">
Music Library by Album - Contents of %_workingdir%: $fmtNum(19544) Albums | %_total_size% | $fmtNum(%_total_files%) Track$ifgreater(19544,1,s,) | $get(TText)
</div>
<div class="h13"><a href="#" onclick="w3.toggleShow(''.cmdline'');" title="Click here to show command line">Cmd</a></div>
</div><!-- end div head1 -->
And this is what the output looks like:
Heading portion of HTML file
<div class="head1">
<div class="h11"> </div>
<div class="h12">
Music Library by Album - Contents of Music: 19.544 Albums | 17,91 MB | 1 Tracks |
</div>
<div class="h13"><a href="#" onclick="w3.toggleShow('.cmdline');" title="Click here to show command line">Cmd</a></div>
</div><!-- end div head1 -->
Which means:
the variables and functions are resolved in this code part.
So I assume that the total script has somewhere a section that makes the header string to be treated as literal.
I do not see it as my task in this forum to do the debugging in the total script.
Edit:
I just deleted most of the version comments from the mte file and now the output looks like this (probably due to the unavailable css):
But the more important part: the header now shows resolved functions and variables.
So, please check your code.