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 d9d3fabd2a
commit 97a0aa8bef
2 changed files with 4 additions and 2 deletions

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):