Re: A tool for printing from notmuch
authorAndreas Amann <a.amann@ucc.ie>
Fri, 28 Jan 2011 20:59:06 +0000 (20:59 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:49 +0000 (09:37 -0800)
de/325add78e4965b17ad3c54815ab34b745880c3 [new file with mode: 0644]

diff --git a/de/325add78e4965b17ad3c54815ab34b745880c3 b/de/325add78e4965b17ad3c54815ab34b745880c3
new file mode 100644 (file)
index 0000000..fab44bd
--- /dev/null
@@ -0,0 +1,112 @@
+Return-Path: <a.amann@ucc.ie>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 30C5B431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 28 Jan 2011 13:01:12 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id li9hH6BWYZiE for <notmuch@notmuchmail.org>;\r
+       Fri, 28 Jan 2011 13:01:11 -0800 (PST)\r
+Received: from mail4.ucc.ie (mail4.ucc.ie [143.239.1.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 67501431FB5\r
+       for <notmuch@notmuchmail.org>; Fri, 28 Jan 2011 13:01:11 -0800 (PST)\r
+Received: from msstf091.ucc.ie (msstf091.ucc.ie [143.239.76.91])\r
+       by mail4.ucc.ie (8.13.8/8.13.8) with ESMTP id p0SKx7lw014490;\r
+       Fri, 28 Jan 2011 21:00:16 GMT\r
+Received: by msstf091.ucc.ie (Postfix, from userid 1000)\r
+       id DF904A2793; Fri, 28 Jan 2011 20:59:06 +0000 (GMT)\r
+From: Andreas Amann <a.amann@ucc.ie>\r
+To: Jesse Rosenthal <jrosenthal@jhu.edu>, notmuch@notmuchmail.org\r
+Subject: Re: A tool for printing from notmuch\r
+In-Reply-To: <m162t87p3b.fsf@watt.hwcampus.jhu.edu>\r
+References: <m162t87p3b.fsf@watt.hwcampus.jhu.edu>\r
+User-Agent: Notmuch/0.5-16-gceb5a1c (http://notmuchmail.org) Emacs/24.0.50.1\r
+       (x86_64-unknown-linux-gnu)\r
+Date: Fri, 28 Jan 2011 20:59:06 +0000\r
+Message-ID: <87y664pwx1.fsf@msstf091.ucc.ie>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-MD-NoSA: yes\r
+X-Scanned-By: MIMEDefang 2.68 on 143.239.1.34\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 28 Jan 2011 21:01:12 -0000\r
+\r
+Dear Jesse,\r
+\r
+\r
+> Printing from notmuch is a bit of a pain. Muttprint doesn't really help\r
+> much, because it can't handle multiparts well, doesn't know what to do\r
+> with html, and will print out pages of base64 if you have\r
+> attachments. And more often than not, what I need to print is an HTML\r
+> email (a bus ticket or something).\r
+> \r
+> A solution I've been working on for my own use is here:\r
+> \r
+> http://commonmeasure.org/~jkr/notmuchprint\r
+\r
+Thanks, that sounds great! I have been waiting for something like this\r
+...\r
+\r
+Unfortunately I could not get it to work with python2.7:\r
+\r
+Traceback (most recent call last):\r
+  File "/home/amann/local/bin/notmuchprint", line 284, in <module>\r
+    main(config)\r
+  File "/home/amann/local/bin/notmuchprint", line 238, in main\r
+    VIEW_IN_BROWSER = config.getboolean('DEFAULT', 'view_in_browser')\r
+  File "/usr/lib/python2.7/ConfigParser.py", line 360, in getboolean\r
+    v = self.get(section, option)\r
+  File "/usr/lib/python2.7/ConfigParser.py", line 581, in get\r
+    return self._interpolate(section, option, value, d)\r
+  File "/usr/lib/python2.7/ConfigParser.py", line 621, in _interpolate\r
+    if value and "%(" in value:\r
+TypeError: argument of type 'bool' is not iterable\r
+\r
+\r
+is this a known problem, or am I missing something obvious? \r
+\r
+Next I commented out the offending line via \r
+\r
+    VIEW_IN_BROWSER = False\r
+\r
+\r
+however still no luck:\r
+\r
+Traceback (most recent call last):\r
+  File "/home/amann/local/bin/notmuchprint", line 284, in <module>\r
+    main(config)\r
+  File "/home/amann/local/bin/notmuchprint", line 263, in main\r
+    nm_msg = NotmuchMsg(msgid, config)\r
+  File "/home/amann/local/bin/notmuchprint", line 58, in __init__\r
+    self.json_thread = json.loads(json_string)\r
+  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads\r
+    return _default_decoder.decode(s)\r
+  File "/usr/lib/python2.7/json/decoder.py", line 360, in decode\r
+    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\r
+  File "/usr/lib/python2.7/json/decoder.py", line 378, in raw_decode\r
+    raise ValueError("No JSON object could be decoded")\r
+ValueError: No JSON object could be decoded\r
+\r
+\r
+\r
+Any hints?\r
+\r
+Andreas\r