summaryrefslogtreecommitdiff
path: root/cgi-bin/whisper.py
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-07-10 22:01:22 +0800
committerchai <chaifix@163.com>2018-07-10 22:01:22 +0800
commit1275e68efa680e55fd29a377c9c58c59bb7f235e (patch)
treec585d7402af76ad0ccd295b218205708012addb4 /cgi-bin/whisper.py
parent5d323b7430c446ceb81c2de52d9a1d28c7f34e52 (diff)
更新
Diffstat (limited to 'cgi-bin/whisper.py')
-rw-r--r--cgi-bin/whisper.py25
1 files changed, 11 insertions, 14 deletions
diff --git a/cgi-bin/whisper.py b/cgi-bin/whisper.py
index 0372b03..a6a1437 100644
--- a/cgi-bin/whisper.py
+++ b/cgi-bin/whisper.py
@@ -3,18 +3,15 @@ from path import Path
import connect
from connect import Connect
-class Whisper(object):
- def build(whisperId):
- conn = Connect.produce()
- cursor = conn.cursor()
-
- whisper_file = open(Path.template("whisper.html"), 'r', encoding="utf8")
- whisper_templ = whisper_file.read()
- whisper_file.close()
-
-
-
- conn.close()
-
-
+whisper_file = open(Path.template("whisper.html"), 'r', encoding="utf8")
+whisper_templ = whisper_file.read()
+whisper_file.close()
+class Whisper(object):
+ def build(_content, _date, _odd):
+ whisper = whisper_templ.format(\
+ oddoreven=((_odd == True) and "odd" or "even"),\
+ content=_content,\
+ date=_date\
+ )
+ return whisper