1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-06 03:32:09 +01:00
Files
audacity/scripts/piped-work/make_html.py
2018-02-21 20:30:04 -05:00

18 lines
550 B
Python

# Takes an image file directory and makes the web page that lists them.
# They are listed in creation date/time order.
import glob
import os
def getFiles() :
files = glob.glob("C:\\OpenSourceGit\\AudacityTeamTools\\wit-html\\auto_images\\*.png")
files.sort(key=os.path.getmtime)
return [ os.path.basename( name ) for name in files ]
#print("\n".join(files))
def oneItem( name ) :
return "<img src='./auto_images/"+name+"'><br><em>"+name+"</em><br>"
files = getFiles()
print( "\n".join( [ oneItem(name) for name in files ] ) )