File: ample.html.5.in

package info (click to toggle)
ample 0.5.7-15
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 692 kB
  • sloc: ansic: 2,885; sh: 255; makefile: 203
file content (186 lines) | stat: -rw-r--r-- 4,697 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
.\" $Id: ample.html.5.in,v 1.1 2002/02/07 01:02:47 alphix Exp $
.\" 
.\" This file is part of Ample.
.\" 
.\" Ample is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\" 
.\" Ample is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Ample; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
.\"
.\"
.\" Process this file with something like
.\" groff -man -Tascii foo.1
.\"

.TH AMPLE.HTML 5 "JANUARY 2002" Ample "User Manual"
.SH NAME 
ample.html \- html template for Ample

.SH DESCRIPTION
This file, by default
.IR "@sysconfdir@/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 
.BR "http://server:port/index.html" ")."
.P
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 \*(lqmiddle\*(rq 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.
.P
Variables are written in uppercase and enclosed within \*(lqat\*(rq signs 
(example: 
.BR "@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 \*(lqmiddle\*(rq section, see the information about each variable for details.

.SH EXAMPLE
.IP "" 0
.nf
<!-- Beginning of header -->
<!DOCTYPE HTML PUBLIC \*(lq-//W3C//DTD HTML 4.01 Transitional//EN\*(rq>
<html><head>
.RB "<title>" "@SERVERNAME@" "</title>"
</head><body>
<center>
.RB "<p><h1>" "@SERVERNAME@" "</h1></p>"
.RB "<p><h2>Tracks currently available in " "@PATH@" "</h2></p>"
<p><font size=\*(lq-1\*(rq>[
<a href=\*(lqindex.m3u\*(rq>playlist for this dir</a> | 
<a href=\*(lqrindex.m3u\*(rq>recursive playlist</a> ]
</font></p>
<p><font size=\*(lq-1\*(rq>
[ <a href=\*(lq../index.html\*(rq>Up one level</a> ]
</font></p>
<div align=\*(lqcenter\*(rq>
<table border=\*(lq1\*(rq cellspacing=\*(lq0\*(rq cellpadding=\*(lq0\*(rq bordercolor=\*(lq#000000\*(rq>
<tr><td>
<b>TYPE</b>
</td><td>
<b>URL</b>
</td></tr>
<!-- End of header -->
.P
.B @BEGIN@
.P
<!-- Beginning of \*(lqmiddle\*(rq -->
<tr><td>
.B @TYPE@
</td><td>
.RB "<a href=\*(lq" "@URL@" "\*(rq>" "@NAME@" "</a>"
</td></tr>
<!-- End of \*(lqmiddle\*(rq -->
.P
.B @END@
.P
<!-- Beginning of footer -->
</table>
</div>
<p align=\*(lqright\*(rq><font size=\*(lq-1\*(rq>
powered by Ample, for more information, see the
<a href=\*(lqhttp://ample.sourceforge.net\*(rq>project homepage</a>
</font></p>
</center>
</body>
</html>
<!-- End of footer -->

.SH SUMMARY OF VARIABLES
.P
.IP "" 0
.nf
.B SPECIAL - Only used once
BEGIN
END
.P
.IP "" 0
.nf
.B GLOBAL - Can be used anywhere
SERVERNAME
PORT
PATH
.P
.IP "" 0
.nf
.B NON-GLOBAL - Can only be used in the \*(rqmiddle\*(lq section
NAME
URL
LENGTH
TITLE
SIZE
TYPE

.SH SPECIAL VARIABLES
These can only be used once.

.TP
.B BEGIN
This variable (when placed in the beginning of a new line) marks the end of the
header section and the start of the \*(rqmiddle\*(lq section.

.TP
.B END
This variable (when placed in the beginning of a new line) marks the end of the
\*(rqmiddle\*(lq section and the start of the footer section.

.SH GLOBAL VARIABLES
These can be used anywhere.

.TP
.B SERVERNAME
The name of the server as given in 
.BR "ample.conf" "(5)."

.TP
.B PORT
The port that the server is listening to.

.TP
.B PATH
The current path the user is viewing.

.SH NON-GLOBAL VARIABLES
These can only be used in the \*(lqmiddle\*(rq section.

.TP 
.B NAME
The name of the song or directory.

.TP
.B URL
The URL of the song or directory.

.TP
.B LENGTH
The song length (in seconds) or blank if it is a directory.

.TP
.B TITLE
The title of the song or \*(lqDIR\*(rq if it is a directory.

.TP
.B SIZE
The file size or blank if it is a directory.

.TP 
.B TYPE
\*(lqFILE\*(rq if it is a file or \*(lqDIR\*(rq if it is a directory.

.SH AUTHOR
David Hrdeman <david@2gen.com>

.SH "SEE ALSO"
.BR "ample" "(1), " "ample.conf" "(5)"