generate wap/wml-output

change encoding for wml compatible display of umlauts etc.
This commit is contained in:
phil 2015-04-30 13:07:04 +00:00
parent c0d3d15a92
commit 56adeface3
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@
xmlns:py="http://genshi.edgewall.org/">
<head>
<title>Ticker</title>
<meta charset="utf-8" />
<meta charset="latin-1" />
<link type="text/css" rel="stylesheet" media="all" href="bootstrap/css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" media="all" href="bootstrap/css/bootstrap-theme.min.css" />
<link type="text/css" rel="stylesheet" media="all" href="style.css" />

View File

@ -17,6 +17,7 @@
# License along with tycker. If not, see <http://www.gnu.org/licenses/>.
#
import subprocess
import os
# the basedir is the parent dir of the location of this script
@ -82,9 +83,10 @@ def update_static_html():
"prev_link": previous_link,
"next_link": next_link,
}
rendered = render("display.html", **values).encode("utf-8")
rendered = render("display.html", **values).encode("latin-1")
open(current_filename, "w").write(rendered)
file_index += 1
subprocess.call(["html2wml", "-n", current_filename, "-o", "ticker1.wml"], cwd=OUTPUT_DIR)
@bobo.query('/submit')
def submit_entry(entry_id=None, title=None, content=None, date=None):