2016-04-12 17:52:18 +00:00
|
|
|
#!/usr/bin/env python3
|
2016-04-12 17:41:50 +00:00
|
|
|
from htmlgen import *
|
2016-06-12 13:59:44 +00:00
|
|
|
import storage
|
2016-04-12 17:51:03 +00:00
|
|
|
print("Content-type: text/html\r\n\r\n")
|
2016-04-12 17:41:50 +00:00
|
|
|
html=htmlgen.HTMLgen(pagelayout.getLayoutXML().decode('utf-8'),"Home Page")
|
2016-06-12 13:59:44 +00:00
|
|
|
count=storage.count("articles")
|
|
|
|
for i in range(count):
|
2016-06-14 16:07:17 +00:00
|
|
|
try:
|
|
|
|
article=storage.get("articles",i)
|
|
|
|
if "homepage" in article["tags"]:
|
|
|
|
html.addArticle(**article)
|
|
|
|
except:
|
|
|
|
html.addArticle(**storage.get("articles",i), aid=i)
|
2016-06-12 16:04:01 +00:00
|
|
|
|
2016-06-12 13:59:44 +00:00
|
|
|
print("<!DOCTYPE html>")
|
|
|
|
print(html.renderSite())
|