A place for all our bot adventures.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 lines
401 B

import os
from jinja2 import Template
def generate_log_page(input, output):
files = os.listdir(input)
template = Template(open('./log/templates/index.html').read())
html = template.render(entries=files)
print(html)
logfile = os.path.join(output, 'index.html')
with open(logfile, 'w') as log:
log.write(html)
if __name__ == "__main__":
generate_log_page('./testing/entries/', './testing/')