summaryrefslogtreecommitdiff
path: root/whisper.py
blob: aec20b62b51e43b8da8991b69460082e648554e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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