summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorroot <root@oberon.sublab.org>2011-03-19 13:22:44 +0100
committerroot <root@oberon.sublab.org>2011-03-19 13:22:44 +0100
commit505ebdf471d1664235c4981453b4a274b46c24f9 (patch)
treecee73a711bfc6aa3e1d0705ac1f4d863c38eda3d /scripts
parent5ee8fd94512d7f4ea7d49310dc8e1151ef833cac (diff)
Fix template.py
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/template.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/template.py b/scripts/template.py
index eb1c5ad..eaa1682 100755
--- a/scripts/template.py
+++ b/scripts/template.py
@@ -44,14 +44,17 @@ def substitute(target, prefix, htmltemplate, datenow, chattopic, keywords, conte
outputfile.write(htmltext)
outputfile.close()
+contentpath = "../template/"
+target = "../public/"
+
#set template
-f = open("template.html", "r")
+f = open(contentpath + "template.html", "r")
htmltemplate = f.read()
f.close
print ("template read")
#set chattopic
-f = open("chattopic", "r")
+f = open(contentpath + "chattopic", "r")
chattopic = f.read()
f.close
print ("chattopic read")
@@ -60,9 +63,6 @@ print ("chattopic read")
datenow = time.strftime("%Y-%m-%dT%H:%M:%S +0100")
print ("Set date: " + datenow)
-contentpath = "../template/"
-target = "../public/"
-
prefixes = ['index', 'neues', 'termine', 'raeume', 'lage', 'kontakt', 'verein', 'impressum', 'webcam']
for prefix in prefixes: