3 # mp3tohtml.py <mp3_dir>
12 files = glob.glob(sys.argv[1] + "/**/*mp3")
16 print "<title>List of songs</title>"
18 print " <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.datatables.net/1.10.10/css/jquery.dataTables.min.css\">"
19 print "<script type=\"text/javascript\" language=\"javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js\">"
21 print " <script type=\"text/javascript\" language=\"javascript\" src=\"https://cdn.datatables.net/1.10.10/js/jquery.dataTables.min.js\">"
23 print "<script>$(document).ready(function() { $('#songs').DataTable(); } );</script>"
26 print "<body><h1>List of songs</h1>"
28 print "<table id='songs' class='display compact' width='100%'>"
29 print "<thead><tr><th>Artist</th><th>Album</th><th>Title</th><th>Comments</th></tr></thead>"
38 artist = tag.getArtist()
39 print "\t\t<td>" + artist + "</td>"
40 except UnicodeEncodeError:
44 print "\t\t<td>" + tag.getAlbum() + "</td>"
45 except UnicodeEncodeError:
49 print "\t\t<td>" + tag.getTitle() + "</td>"
50 except UnicodeEncodeError:
54 comments = tag.getComments()
56 print comments[0].comment
63 print "</body></html>"