23 lines
468 B
Python
23 lines
468 B
Python
# Bryan Schumaker
|
|
import libsaria
|
|
library = libsaria.sources.library
|
|
walk = library.walk
|
|
get_attrs = library.get_attrs
|
|
|
|
def header(wfile):
|
|
wfile.write("<html><body>")
|
|
|
|
def footer(wfile):
|
|
wfile.write("</body></html>")
|
|
|
|
def body(wfile):
|
|
for artist, ar_key in library.artists():
|
|
wfile.write("<h2>%s</h2>" % artist)
|
|
for album, al_key in library.albums(ar_key):
|
|
wfile.write("%s<br>" % album)
|
|
|
|
def to_html(wfile):
|
|
header(wfile)
|
|
body(wfile)
|
|
footer(wfile)
|