diff options
Diffstat (limited to 'whisper.py')
-rw-r--r-- | whisper.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/whisper.py b/whisper.py new file mode 100644 index 0000000..aec20b6 --- /dev/null +++ b/whisper.py @@ -0,0 +1,19 @@ +import path +from path import Path +import connect +from connect import Connect + +whisper_file = open(Path.template("whisper.html"), 'r', encoding="utf8") +whisper_templ = whisper_file.read() +whisper_file.close() + +class Whisper(object): + def build(_id, _content, _date, _odd, _url): + whisper = whisper_templ.format(\ + oddoreven=((_odd == True) and "odd" or "even"),\ + content=_content,\ + date=_date,\ + url=_url,\ + id=_id\ + ) + return whisper |