diff --git a/helpers.py b/helpers.py
new file mode 100644
index 0000000..fe9ab3e
--- /dev/null
+++ b/helpers.py
@@ -0,0 +1,32 @@
+import creoleparser
+import genshi
+import datetime
+from settings import DATE_FORMAT_SHORT, DATE_FORMAT_FULL
+
+
+def formatter(text):
+ if not text:
+ return u""
+ text = text.replace("\\", "\\\\")
+ html = creoleparser.text2html(text, encoding=None).strip()
+ if html.startswith("
") and html.endswith("
"):
+ html = html[3:-4]
+ return genshi.Markup(html)
+
+
+last_day = datetime.datetime.today() - datetime.timedelta(days=1)
+def show_timestamp(date):
+ if date <= last_day:
+ template = DATE_FORMAT_SHORT
+ else:
+ template = DATE_FORMAT_FULL
+ return date.strftime(template)
+
+def nav_links(prev_link, next_link):
+ result = []
+ if prev_link:
+ result.append('aktuellere' % prev_link)
+ if next_link:
+ result.append('ältere' % next_link)
+ return genshi.Markup(" | ".join(result))
+
diff --git a/settings.py b/settings.py
new file mode 100644
index 0000000..418cf45
--- /dev/null
+++ b/settings.py
@@ -0,0 +1,11 @@
+import os as __os
+__BASE_DIR = __os.path.dirname(__os.path.abspath(__file__))
+
+DATE_FORMAT_SHORT = __os.environ.get("DATE_FORMAT_SHORT", "%H:%M")
+DATE_FORMAT_FULL = __os.environ.get("DATE_FORMAT_FULL", "%d.%m.%Y - %H:%M Uhr")
+PAGE_SIZE = int(__os.environ.get("PAGE_SIZE", 20))
+FILENAME_TEMPLATE = __os.environ.get("FILENAME_TEMPLATE", "ticker%d.html")
+OUTPUT_DIR = __os.environ.get("OUTPUT_DIR", __os.path.join(__BASE_DIR, "output"))
+DB_FILE = __os.environ.get("DB_FILE", __os.path.join(__BASE_DIR, "tycker.sqlite"))
+BASE_URL = __os.environ.get("BASE_URL", "./")
+
diff --git a/templates/admin_show_entries.html b/templates/admin_show_entries.html
index 3ff0404..487c81f 100644
--- a/templates/admin_show_entries.html
+++ b/templates/admin_show_entries.html
@@ -20,13 +20,13 @@
Timestamp | Title | Content |
|