mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
22 lines
433 B
Python
Executable File
22 lines
433 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import marko
|
|
|
|
|
|
def generate():
|
|
licenses = open('../LICENSE.md').read().split('---')[0]
|
|
|
|
text_md = open('text.md').read()
|
|
text_md = text_md.replace('{licenses}', licenses)
|
|
|
|
text_html = marko.convert(text_md)
|
|
|
|
template = open('template.html').read()
|
|
template = template.replace('{text}', text_html)
|
|
|
|
open('index.html', 'w').write(template)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
generate()
|