Report Wizard template specification
Introduction
Below follows a specification of how to create your own template for
the Report Wizard.
Creating a template
A template is actually a plain text file containing values and loops
that are interpreted by the Report Wizard. The Report Wizard is able to
create virtually any type of file, including but not limited to:
- Plain text
- Comma or tab separated list
- HTML/ASP/PHP document
Look at the templates that are shipped with the Report Wizard to view a
real example of how a template can look like.
Include any of the below values in your template to make the Report Wizard
interpret and replace them with the correct tag information:
Values:
{album_artist}
Returns the value of the artistfield for the album, this might be Various
Artists for compilations. On database data this will be the field from
the Album view and for the filelist it will return the Artist field.
{album_time}
Returns the total lengt of the album, i.e. 1:17:34
{album_size}
Returns the total filesize of the album, i.e. 167
{album_total_tracks}
Returns the total number of tracks for the album, if the album contains
more than one CD the tracks of the CD:s are summed up.
{library}
Returns the displayname of the Collection for database data and EmptyStr
for FileData
{volume}
Returns the displayname of the Volume for database data and EmptyStr for
FileData
{original_image}
Returns the value of the original image field
{album_rating}
Returns the numeric value of the calculated Album Rating (i.e. 0.5 to 5)
{album_rating(image)}
Returns a HTML imagetag (<IMG SRC="rating.gif">) with the
corresponding rating image from the MLW Resources folder.
{album_rating(imagename)}
Will return the path to the corresponding rating image from MLW Resources
{album_rating(description)}
Will return description for the corresponding rating
{artist}
Returns the value of the artistfield
{artist_sort_order}
Returns the Artist Sort Order field
{album_artist_sort_order}
Returns
the Artist Sort Order field of the album
{album}
Returns the album name
{album_sort_order}
Returns the Album Sort Order field
{year}
Returns the value of the Recording Year field. If the Recording Year field
is empty it returns the value of the Release Year field.
{rec_year}
Returns the value of the Recording Year field
{rel_year}
Returns the value of the Release Year field
{genre}
Returns the value of the Genre field
{track}
Returns the value of the Track field (i.e. 01/12)
{current_track}
Returns the value of the Current Track field. The field will be padded
with one zero if it is below 10 (i.e. 01 to 09).
{total_tracks}
Returns the value of the Total Tracks part of the track field. If this
field is empty it will return the total number of tracks in the album.
{cd}
Returns the value of the CD field (i.e. 01/02)
{current_cd}
Returns the value of the Current CD field. The field will be padded with
one zero if it is below 10 (i.e. 01 to 09).
{total_cds}
Returns the total cd part of the cd field, if this is empty then it returns
1.
{title}
Returns the value of the Title field
{title_sort_order}
Returns the value of the Title Sort Order field
{subtitle}
Returns the subtitle
{time}
Returns the length of the song, i.e. 04:31
{size}
Returns the filesize of the song, i.e. 4.34 MB
{bitrate}
Returns the bitrate of the file
{sample_rate}
Returns the sample rate/frequency of the file
{link}
Returns the filepath to the file
{comment}
Returns the value of the comment field
{composer}
Returns the value of the composer field
{lyrics}
Returns the value of the lyrics field, returns empty string if the file
does not have any lyrics or if the file is not available.
{part_of_series}
Returns the value from the PartOfSeries field.
{image}
Extracts the front cover image from either the Album View or from the file,
depending on if you work with database data or filedata. It the returns
a Image tag, i.e. <img src="image_name"> Can also take
the following parameters to extract any other imagetype.
- Other
- 32x32 pixels 'file icon'
- Other file icon
- Cover (front)
- Cover (back)
- Leaflet page
- Media (e.g. lable side of CD)
- Lead artist/lead performer/soloist
- Artist/performer
- Conductor
- Band/Orchestra
- Composer
- Lyricist/text writer
- Recording Location
- During recording
- During performance
- Movie/video screen capture
- A bright coloured fish
- Illustration
- Band/artist logotype
- Publisher/Studio logotype
{image_name}
Extracts the front cover image from either the Album View or from the file,
depending on if you work with database data or filedata. It then returns
the link to the file. Can also take the same argument values as {image}
{path}
Returns the path of the file
{file_name}
Returns the filename of the file
{rating}
Returns the numeric value of the Rating field (i.e. 0.5 to 5)
{rating(image)}
Returns a HTML imagetag (<IMG SRC="rating.gif">) with the
corresponding rating image from the MLW Resources folder.
{rating(imagename)}
Will return the path to the corresponding rating image from MLW Resources
{rating(description)}
Will return description for the corresponding rating
{releasetype}
Can be used with the same arguments as rating
{quality}
Can be used with the same arguments as rating
{tags}
Returns the icons for the tags and filetypes from MLW Resources
{counter}, {counter(arg)}
Returns the counter value for a loop, if used without argument it returns
the counter for the first loop. The argument is the name of the loop.
{total}, {total(arg)}
Returns the total value for a loop, if used without argument it returns
the total for the first loop. The argument is the name of the loop. The
value is only valid after the loop, if used inside the loop it returns
zero.
{odd(arg)}
Gives back 0 or 1 depending on if arg is an odd or even number, the Argument
is the name of the loop which counter you wish to test if it is odd or
even.
{resource_dir(arg)}
Gives back a string with the path to the MLW Resources folder. For example
"C:\Program Files\Intermedia Design\Helium 2\MLW Resources\"
the argument will be added as is after the resource dir path. You can
use this tag to add external files such as images, stylesheets and scripts
for use in your templates.
Other available fields:
{remix}
{bpm}
{tempo}
{mood}
{preference}
{situation}
{featured_artist}
{copyright}
{encoded_by}
{media}
{produced}
{publisher}
{software_settings}
{lyricist}
{album_subtitle}
{language}
{original_artist}
{original_title}
{original_lyricist}
{original_year}
{band_orchestra}
{conductor}
{is_vbr}
{catalog_number}
{grouping}
{isrc}
{file_date}
{biography}
{format}
Loops
<!-- {repeat_begin([<loopname> [, <loopfield>] [, DESC]])}
-->
Starts a new loop. The loop will automatically sort the contents by the
<loopfield>.
<loopname> is the name of the loop
<loopfield> is the field to loop on (accepted fields specified below).
If <loopfield> is omitted, track number will be used as loop field.
DESC is used to sort the list in descendant order
<loopfield> can be one of the following:
album
album_artist
album_artist_sort_order
album_rating
album_size
album_sort_order
album_subtitle
album_time
album_total_tracks
artist
artist_sort_order
band_orchestra
bitrate
bpm
catalog_number
cd
comment
composer
conductor
copyright
encoded_by
file_date
filename
format
genre
grouping
is_vbr
isrc
language
library
lyricist
media
mood
original_artist
original_lyricist
original_title
original_year
part_of_series
path
preference
produced
publisher
quality
rating
rec_year
rel_year
releasetype
remix
situation
sample_rate
size
software_settings
sub_tracks
subtitle
tags
tempo
title
title_sort_order
time
track
volume
<loopname> should be assigned a unique name for each loop to make
counters work properly.
End all loops with
<!-- {repeat_end} -->