I have a challanage:
write a script that takes a folder that contains a static html file
and converts it into an HTML site.
1) moves all non .html files into static/
2) moves all .html files into views/xxx/
3) creates a controllers/xxx.py and for each yyy.html file add an
action
def yyy(): return dict()
4) loop over all .html files and fixes all the URL to {{=URL(...)}}}
OPTIONAL:
5)
If all .html files start with a similar header and footer, tried to
identify them, moves "<header>{{include}}<footer>" into views/
layout.html and rewrite the html files to {{extend 'layout.html'}}
The original folder and 'xxx' should be uer defined. This could be
added to the wizard.
Massimo