OpenRAM/compiler/datasheet/server_scripts/__init__.py

25 lines
426 B
Python
Raw Normal View History

2018-11-28 04:49:05 +01:00
import os
import jinja2
from flask import Flask, render_template
from filelist import *
filedir = './files'
file_data = './filelist.info'
app = Flask('server_scripts')
2018-11-29 01:48:24 +01:00
2018-11-28 04:49:05 +01:00
if __name__ == '__main__':
files = filelist()
files.update_filelist(filedir,file_data)
2018-11-29 01:48:24 +01:00
f = open('./index.html','w')
2018-11-28 04:49:05 +01:00
with app.app_context():
2018-11-29 01:48:24 +01:00
f.write(render_template('index.html', filedir = filedir , os = os))
2018-11-28 04:49:05 +01:00