From 49b459f4d363e75326953648f4d31423c28d7e18 Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Tue, 16 Nov 2010 21:19:11 -0500 Subject: [PATCH] Added test.py Right now, this file will make a table with all my music. --- html/test.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 html/test.py diff --git a/html/test.py b/html/test.py new file mode 100644 index 00000000..a19c8bd2 --- /dev/null +++ b/html/test.py @@ -0,0 +1,25 @@ +# 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): + wfile.write("") + for id in library.walk(): + #attrs = get_attrs(id, "id", "title", "lenstr", "artist", "album", "year") + artist, album, title = library.get_attrs(id, "artist", "album", "title") + wfile.write("" % (artist, album, title)) + wfile.write("
%s%s%s
") + #wfile.write("Python!!!") + +def to_html(wfile): + header(wfile) + body(wfile) + footer(wfile)