genmon / sirius

112 stars 37 forks source link

Dithering & UTF-8 fix #13

Open markostamcar opened 9 years ago

markostamcar commented 9 years ago

Not going to do a pull request, but you might find this useful:

  1. Dithering instead of threshold: In sirius/coding/image_encoding.py, find def threshold(im): and add im = im.convert('1') In sirius/coding/templating.py, find <body> and change it to <body style="background-color: #ffffff">
  2. To fix UTF-8 support: In sirius/coding/templating.py, find <html> and add <head><meta charset="utf-8"></head> Then find return t.render(raw_html=raw_html) and add .encode('utf-8') In sirius/web/printer_print.py, find message = flask.request.data and add .decode('utf-8')

:smile: