AMPLE.HTML(5)
πΈ ample.html(5) β the User Manual, but make it cute πΈ
okay so bestie, welcome to the AMPLE.HTML(5) page π this is the manual for the ample.html file, and it's giving template energy in the absolute best way.
β¨ NAME β¨
ample.html β html template for Ample π
π DESCRIPTION π
So. This file β and by default it lives at /etc/ample.html β gets read by Ample at startup, and it's used as the base for its HTML pages. Those pages get rendered whenever a webbrowser connects and requests a list of available songs and directories (which, typically, happens when you connect to http://server:port/index.html). slay π¦
The file is split into three sections: the header, the middle, and the footer. The header and the footer are literally the same on each page generated, while the "middle" gets copied into the final HTML document once for every single file or directory that's going to be listed. ik it sounds confusing but fr fr it becomes so much more evident once you look at the example below. trust π
Variables are written in uppercase and enclosed within "at" signs (example: @NAME@), and they get replaced dynamically when the page is constructed. Some variables can exist anywhere in the document, and some can only exist in the "middle" section β so check the info about each variable for details. no cap π
π EXAMPLE π
<!-- 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 -->
π SUMMARY OF VARIABLES π
SPECIAL β only used once
BEGINEND
GLOBAL β can be used anywhere
SERVERNAMEPORTPATH
NON-GLOBAL β can only be used in the "middle" section
NAMEURLLENGTHTITLESIZETYPE
π SPECIAL VARIABLES π
These can only be used once. one and done, main character behavior π
BEGINβ this variable (when placed in the beginning of a new line) marks the end of the header section and the start of the "middle" section.ENDβ this variable (when placed in the beginning of a new line) marks the end of the "middle" section and the start of the footer section.
π¦ GLOBAL VARIABLES π¦
These can be used anywhere. everywhere, honestly. iconic β¨
SERVERNAMEβ the name of the server as given inample.conf(5).PORTβ the port that the server is listening to.PATHβ the current path the user is viewing.
π NON-GLOBAL VARIABLES π
These can only be used in the "middle" section. nowhere else, bestie, that's the rule π
NAMEβ the name of the song or directory.URLβ the URL of the song or directory.LENGTHβ the song length (in seconds) or blank if it is a directory.TITLEβ the title of the song or "DIR" if it is a directory.SIZEβ the file size or blank if it is a directory.TYPEβ "FILE" if it is a file or "DIR" if it is a directory.
π AUTHOR π
David HΓ€rdeman <david@2gen.com>
β SEE ALSO β
and that's the whole page, bestie!! go forth and template your heart out π«Ά
okay so the sign-off: this is the Ample manual, dated JANUARY 2002, and honestly? it ate. periodt ππ
π¦ where this page comes from
- debian bookworm: ample 0.5.7-13+b1 Β· GPL-2.0-or-later
- debian trixie: ample 0.5.7-15 Β· GPL-2.0-or-later
- ubuntu jammy: ample 0.5.7-13 Β· GPL-2.0-or-later
- ubuntu noble: ample 0.5.7-13 Β· GPL-2.0-or-later
- ubuntu questing: ample 0.5.7-15
- ubuntu resolute: ample 0.5.7-15build1 Β· GPL-2.0-or-later
- ubuntu stonking: ample 0.5.7-16 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms