old-homepage/index.py
2016-06-12 18:04:01 +02:00

11 lines
334 B
Python
Executable file

#!/usr/bin/env python3
from htmlgen import *
import storage
print("Content-type: text/html\r\n\r\n")
html=htmlgen.HTMLgen(pagelayout.getLayoutXML().decode('utf-8'),"Home Page")
count=storage.count("articles")
for i in range(count):
html.addArticle(**(storage.get("articles",i)))
print("<!DOCTYPE html>")
print(html.renderSite())