Re: nbook: a notmuch based address book written in python
authorPatrick Totzke <patricktotzke@gmail.com>
Tue, 25 Sep 2012 10:44:57 +0000 (11:44 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:36 +0000 (09:49 -0800)
52/94c19b3f66a89104046fb4c08deabe92f40cc0 [new file with mode: 0644]

diff --git a/52/94c19b3f66a89104046fb4c08deabe92f40cc0 b/52/94c19b3f66a89104046fb4c08deabe92f40cc0
new file mode 100644 (file)
index 0000000..3759563
--- /dev/null
@@ -0,0 +1,133 @@
+Return-Path: <patricktotzke@gmail.com>\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 9FFE9431FC7\r
+       for <notmuch@notmuchmail.org>; Tue, 25 Sep 2012 03:44:59 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.7\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.7 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, RCVD_IN_DNSWL_LOW=-0.7]\r
+       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 OMbdXNDY-8Dv for <notmuch@notmuchmail.org>;\r
+       Tue, 25 Sep 2012 03:44:59 -0700 (PDT)\r
+Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com\r
+       [209.85.212.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id EB332431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 25 Sep 2012 03:44:58 -0700 (PDT)\r
+Received: by wiwc10 with SMTP id c10so2239431wiw.2\r
+       for <notmuch@notmuchmail.org>; Tue, 25 Sep 2012 03:44:56 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=content-type:mime-version:content-transfer-encoding:from:user-agent\r
+       :to:references:in-reply-to:message-id:subject:date;\r
+       bh=NbanrR4/4wWjPyTlmDO0dCxKwECl6V7xboOuSt5PR9o=;\r
+       b=d/T1WzCM8yItroLEm4U13yNakdZOGhtkgb5ccolZsY453v4HsSnBfze+dbLfNcgt5n\r
+       UUIQySU2ekf6hc12CEqg2IrAgnDCsiaMe3j/GrKBU708Y5u+6CExlo64xTi4YiOhW5uY\r
+       GYsKrvfnlqMG9RvBEoV6vTKJOlbIui+PULNvNv2gLiIo9NqqPuoKeJqiP/PVLFKBxSUf\r
+       pGSEGidMd3NDG9U9dKQCahPg2GcSaa0VTzKI+eE0ogZybKQWGH3BYtY8cnrxNgISt98a\r
+       0N3wGw2F6tokDv7vvsV+9eig7b3AX3bXH23OWvt3M0utnBypxTKfiaN3rIAkUhxVtrVf\r
+       dpoA==\r
+Received: by 10.216.202.133 with SMTP id d5mr4743023weo.63.1348569896301;\r
+       Tue, 25 Sep 2012 03:44:56 -0700 (PDT)\r
+Received: from localhost (dhcp-91-036.inf.ed.ac.uk. [129.215.91.36])\r
+       by mx.google.com with ESMTPS id do5sm22237246wib.10.2012.09.25.03.44.55\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Tue, 25 Sep 2012 03:44:55 -0700 (PDT)\r
+Content-Type: text/plain; charset="utf-8"\r
+MIME-Version: 1.0\r
+Content-Transfer-Encoding: quoted-printable\r
+From: Patrick Totzke <patricktotzke@gmail.com>\r
+User-Agent: alot/0.3.3+\r
+To: Suvayu Ali <fatkasuvayu+linux@gmail.com>,  notmuch@notmuchmail.org\r
+References: <20120924082646.GA10577@kuru.dyndns-at-home.com>\r
+In-Reply-To: <20120924082646.GA10577@kuru.dyndns-at-home.com>\r
+Message-ID: <20120925104457.12264.30350@megatron>\r
+Subject: Re: nbook: a notmuch based address book written in python\r
+Date: Tue, 25 Sep 2012 11:44:57 +0100\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: Tue, 25 Sep 2012 10:44:59 -0000\r
+\r
+Hey Suvayu, welcome to notmuch!\r
+\r
+I hope you are aware that there are already a few search based abook tools\r
+around for notmuch (listed in the wiki, albeit hidden in the emacs docs):\r
+http://notmuchmail.org/emacstips/#index14h2\r
+I personally use nottoomuch-addresses.sh, which apparently does some advanc=\r
+ed\r
+caching voodoo for speed.\r
+\r
+But to your tool; practice test:\r
+I wasn't able to use wildcards or simply prefixes of names. This is essenti=\r
+al\r
+if you want to use it for tabcompleting contacts in a MUA.\r
+The time lookups take seems to depend on how many matches there are:\r
+\r
+-------------------------------\r
+time nbook Suvayu\r
+1 unique email addresses found for `Suvayu'\r
+fatkasuvayu+linux@gmail.com     Suvayu Ali\r
+\r
+nbook Suvayu  0.04s user 0.01s system 95% cpu 0.050 total\r
+-------------------------------\r
+time nbook Justus\r
+...\r
+\r
+nbook Justus  0.21s user 0.07s system 11% cpu 2.484 total\r
+-------------------------------\r
+And If I look for my own name, this takes over a minute,\r
+eventually dying. This could be an issue with libnotmuch though.\r
+Possibly, your algorithm takes very long and then reads from an initially\r
+opened Database object again, which was invalidated by concurrent writes of=\r
+ other processes..\r
+\r
+-------------------------------\r
+[~] time nbook Patrick                     =\r
+\r
+\r
+Error opening /home/pazz/mail/gmail/[Google Mail].All Mail/cur/1330682270_0=\r
+.12958.megatron,U=3D8766,FMD5=3D66ff6a8bc18a8a3ac4b311daa93d358a:2,S: Too m=\r
+any open files\r
+Traceback (most recent call last):\r
+  File "/home/pazz/bin/nbook", line 167, in <module>\r
+  File "/home/pazz/bin/nbook", line 71, in __init__\r
+  File "/home/pazz/.local/lib/python2.7/site-packages/notmuch/message.py", =\r
+line 233, in get_header\r
+notmuch.errors.NullPointerError\r
+Error in sys.excepthook:\r
+Traceback (most recent call last):\r
+  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, i=\r
+n apport_excepthook\r
+ImportError: No module named fileutils\r
+\r
+Original exception was:\r
+Traceback (most recent call last):\r
+  File "/home/pazz/bin/nbook", line 167, in <module>\r
+  File "/home/pazz/bin/nbook", line 71, in __init__\r
+  File "/home/pazz/.local/lib/python2.7/site-packages/notmuch/message.py", =\r
+line 233, in get_header\r
+notmuch.errors.NullPointerError\r
+nbook Patrick  3.20s user 5.47s system 12% cpu 1:11.65 total\r
+------------------------------------\r
+\r
+Anyway, have fun hacking notmuch! If you are looking for a related project =\r
+to bring in your python skills\r
+I could think of one or two :D\r
+Best,\r
+/p\r