diff --git a/html/library.py b/html/library.py new file mode 100644 index 00000000..4924becc --- /dev/null +++ b/html/library.py @@ -0,0 +1,22 @@ +# Bryan Schumaker +import libsaria +library = libsaria.sources.library +walk = library.walk +get_attrs = library.get_attrs + +def header(wfile): + wfile.write("") + +def footer(wfile): + wfile.write("") + +def body(wfile): + for artist, ar_key in library.artists(): + wfile.write("

%s

" % artist) + for album, al_key in library.albums(ar_key): + wfile.write("%s
" % album) + +def to_html(wfile): + header(wfile) + body(wfile) + footer(wfile)