generate wap/wml-output
change encoding for wml compatible display of umlauts etc.
This commit is contained in:
parent
d9d3fabd2a
commit
97a0aa8bef
2 changed files with 4 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
||||||
xmlns:py="http://genshi.edgewall.org/">
|
xmlns:py="http://genshi.edgewall.org/">
|
||||||
<head>
|
<head>
|
||||||
<title>Ticker</title>
|
<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.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="bootstrap/css/bootstrap-theme.min.css" />
|
||||||
<link type="text/css" rel="stylesheet" media="all" href="style.css" />
|
<link type="text/css" rel="stylesheet" media="all" href="style.css" />
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
# License along with tycker. If not, see <http://www.gnu.org/licenses/>.
|
# License along with tycker. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
|
||||||
import os
|
import os
|
||||||
# the basedir is the parent dir of the location of this script
|
# the basedir is the parent dir of the location of this script
|
||||||
|
@ -82,9 +83,10 @@ def update_static_html():
|
||||||
"prev_link": previous_link,
|
"prev_link": previous_link,
|
||||||
"next_link": next_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)
|
open(current_filename, "w").write(rendered)
|
||||||
file_index += 1
|
file_index += 1
|
||||||
|
subprocess.call(["html2wml", "-n", current_filename, "-o", "ticker1.wml"], cwd=OUTPUT_DIR)
|
||||||
|
|
||||||
@bobo.query('/submit')
|
@bobo.query('/submit')
|
||||||
def submit_entry(entry_id=None, title=None, content=None, date=None):
|
def submit_entry(entry_id=None, title=None, content=None, date=None):
|
||||||
|
|
Loading…
Reference in a new issue