AMPLE.HTML(5) | User Manual | AMPLE.HTML(5) |
ample.html - html template for Ample
This file, by default /etc/ample.html, is read by Ample at startup and used as a base for it's HTML pages. These pages are rendered whenever a webbrowser connects and requests a list of available songs and directories (typically done by connecting to http://server:port/index.html).
The file is divided into three sections, the header, the middle and the footer. The header and the footer are the same on each page generated while the “middle” is copied into the final HTML document once for each file or directory that is going to be listed. Although this may sound confusing, it will probably become much more evident once you look at the example below.
Variables are written in uppercase and enclosed within “at” signs (example: @NAME@) and are replaced dynamically when the page is constructed. Some variables can exist anywhere in the document and some can only exist in the “middle” section, see the information about each variable for details.
<!-- Beginning of header --> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”> <html><head> <title>@SERVERNAME@</title> </head><body> <center> <p><h1>@SERVERNAME@</h1></p> <p><h2>Tracks currently available in @PATH@</h2></p> <p><font size=“-1”>[ <a href=“index.m3u”>playlist for this dir</a> | <a href=“rindex.m3u”>recursive playlist</a> ] </font></p> <p><font size=“-1”> [ <a href=“../index.html”>Up one level</a> ] </font></p> <div align=“center”> <table border=“1” cellspacing=“0” cellpadding=“0” bordercolor=“#000000”> <tr><td> <b>TYPE</b> </td><td> <b>URL</b> </td></tr> <!-- End of header -->
@BEGIN@
<!-- Beginning of “middle” --> <tr><td> @TYPE@ </td><td> <a href=“@URL@”>@NAME@</a> </td></tr> <!-- End of “middle” -->
@END@
<!-- Beginning of footer --> </table> </div> <p align=“right”><font size=“-1”> powered by Ample, for more information, see the <a href=“http://ample.sourceforge.net”>project homepage</a> </font></p> </center> </body> </html> <!-- End of footer -->
SPECIAL - Only used once BEGIN END
GLOBAL - Can be used anywhere SERVERNAME PORT PATH
NON-GLOBAL - Can only be used in the ”middle“ section NAME URL LENGTH TITLE SIZE TYPE
These can only be used once.
These can be used anywhere.
These can only be used in the “middle” section.
David Härdeman <david@2gen.com>
ample(1), ample.conf(5)
JANUARY 2002 | Ample |