diff --git a/screenless/bureau/mailroom/mailroom.py b/screenless/bureau/mailroom/mailroom.py index b66bec0..11d8012 100644 --- a/screenless/bureau/mailroom/mailroom.py +++ b/screenless/bureau/mailroom/mailroom.py @@ -325,10 +325,16 @@ class MailRoom(Bureau): msg.subject = clean_header(envelope.subject.decode("utf-8")) # make action barcodes - msg.d_bc = kode256.svg("POd." + shortcode) - msg.sp_bc = kode256.svg("POsp." + shortcode) - msg.r_bc = kode256.svg("POr." + shortcode) - + msg.d_bc = os.path.join("/tmp", "POd." + shortcode + ".svg") + with open(msg.d_bc, "w") as svgfile: + svgfile.write(kode256.svg("POd." + shortcode)) + msg.r_bc = os.path.join("/tmp", "POr." + shortcode + ".svg") + with open(msg.r_bc, "w") as svgfile: + svgfile.write(kode256.svg("POr." + shortcode)) + msg.sp_bc = os.path.join("/tmp", "POd." + shortcode + ".svg") + with open(msg.sp_bc, "w") as svgfile: + svgfile.write(kode256.svg("POsp." + shortcode)) + msgs.append(msg.__dict__) diff --git a/screenless/bureau/publications/news.html b/screenless/bureau/publications/news.html index e321513..f95de1e 100644 --- a/screenless/bureau/publications/news.html +++ b/screenless/bureau/publications/news.html @@ -224,7 +224,7 @@
read
delete
mark as spam
-
${msg["sp_bc"]}
${msg["d_bc"]}
${msg["r_bc"]}
+
% endfor