diff --git a/screenless/bureau/mailroom/mailroom.py b/screenless/bureau/mailroom/mailroom.py index 0a54f11..bdc8f31 100644 --- a/screenless/bureau/mailroom/mailroom.py +++ b/screenless/bureau/mailroom/mailroom.py @@ -91,7 +91,7 @@ class MailRoom(Bureau): """ internaldate = resp_obj[b'INTERNALDATE'] - msg_data = resp_obj[b'RFC822'].decode('utf-8') + msg_data = resp_obj[imap_id][b'RFC822'].decode('utf-8') msg_obj = email.message_from_string(msg_data) # format and tidy header data @@ -168,25 +168,28 @@ class MailRoom(Bureau): resp = self.imapserv.fetch([imap_id], ['INTERNALDATE', 'RFC822']) + print("got imap msg:", imap_id, resp) + msg = self._make_msg_object(imap_id, resp) + # TODO: switch this to inline svgs # make action barcodes - barcode_png = os.path.join("/tmp", "POun." + msg.shortcode + ".png") + barcode_png = os.path.join("/tmp", "POun." + shortcode + ".png") code128.image("POun." + shortcode).save(barcode_png) msg.un_bc = str(barcode_png) - barcode_png = os.path.join("/tmp", "POd." + msg.shortcode + ".png") + barcode_png = os.path.join("/tmp", "POd." + shortcode + ".png") code128.image("POd." + shortcode).save(barcode_png) msg.d_bc = str(barcode_png) - barcode_png = os.path.join("/tmp", "POsp." + msg.shortcode + ".png") + barcode_png = os.path.join("/tmp", "POsp." + shortcode + ".png") code128.image("POsp." + shortcode).save(barcode_png) msg.sp_bc = str(barcode_png) - barcode_png = os.path.join("/tmp", "POre." + msg.shortcode + ".png") + barcode_png = os.path.join("/tmp", "POre." + shortcode + ".png") code128.image("POre." + shortcode).save(barcode_png) msg.re_bc = str(barcode_png) - barcode_png = os.path.join("/tmp", "POrea." + msg.shortcode + ".png") + barcode_png = os.path.join("/tmp", "POrea." + shortcode + ".png") code128.image("POrea." + shortcode).save(barcode_png) msg.rea_bc = str(barcode_png) - barcode_png = os.path.join("/tmp", "POr." + msg.shortcode + ".png") + barcode_png = os.path.join("/tmp", "POr." + shortcode + ".png") code128.image("POr." + shortcode).save(barcode_png) msg.r_bc = str(barcode_png) diff --git a/screenless/bureau/publications/news.html b/screenless/bureau/publications/news.html index f5af043..a1d2e36 100644 --- a/screenless/bureau/publications/news.html +++ b/screenless/bureau/publications/news.html @@ -9,11 +9,11 @@ } } html { - font-size: 120%; + font-size: 100%; } body { font-family: "CMU Serif"; - font-size: 24pt; + font-size: 12px; line-height: 1; } h1 { @@ -36,7 +36,7 @@ font-family: "Fold"; font-weight: 400; text-transform: uppercase; - font-size: 50mm; + font-size: 5em; text-align: center; margin: 0; } @@ -46,7 +46,6 @@ padding: 5px; clear: both; font-variant: small-caps; - font-size: 24pt; } #motto { float: left; @@ -78,14 +77,45 @@ margin-top: 0.25em; } .entry .barcode svg { - width: 130%; - margin-left: -15%; - border: 1px solid black; + width: 100%; + height: auto; + /*width: 130%; + margin-left: -15%;*/ } .entry .summary{ text-align: justify; hyphens: auto; } + .mail { + clear: both; + } + .mail div { + float: left; + } + .mail .mailsender { + width: 25%; + word-break: break-all; + } + .mail .mailsubject { + width: 50%; + } + .mail .maildate { + width: 25%; + } + .mail div.mailact { + width: 25%; + float: right; + } + .mail div.actname { + font-variant: small-caps; + } + .mail div.mailact svg { + width: 100%; + height: auto; + } + .mail .mailrow { + clear: both; + }

Yesterday's Tomorrows

@@ -107,19 +137,26 @@ % endfor + % if len(inbox) > 0:

Post

- % for msg in inbox: - - - - - - +
+
+
${msg["fromname"]} ${msg["fromaddr"]}
+
${msg["subject"]}
${msg["date"]}
+
+
+
read
delete
mark as spam
+
+
+
${msg["r_bc"]}
${msg["d_bc"]}
${msg["sp_bc"]}
+
+
% endfor
${msg["fromname"]} ${msg["fromaddr"]}${msg["subject"]}${msg["date"]}
READDELETEMARK AS SPAM
${msg["r_bc"]}${msg["d_bc"]}${msg["sp_bc"]}
+ % endif