Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 68FA9429E25 for ; Sat, 10 Dec 2011 15:19:37 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.29 X-Spam-Level: X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9JH6FHU6XNgA for ; Sat, 10 Dec 2011 15:19:35 -0800 (PST) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id 6D270431FB6 for ; Sat, 10 Dec 2011 15:19:35 -0800 (PST) Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1]) by earth-doxen-postvirus (Postfix) with ESMTP id 125EF66E0092; Sat, 10 Dec 2011 15:19:35 -0800 (PST) X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new Received: from finestructure.net (cpe-76-174-137-84.socal.res.rr.com [76.174.137.84]) (Authenticated sender: jrollins) by earth-doxen-submit (Postfix) with ESMTP id 2890266E00E9; Sat, 10 Dec 2011 15:19:32 -0800 (PST) Received: by finestructure.net (Postfix, from userid 1000) id CE85B236E; Sat, 10 Dec 2011 18:19:31 -0500 (EST) From: Jameson Graef Rollins To: Ciprian Dorin Craciun Subject: Re: Exporting a single email as JSON In-Reply-To: References: <87zkf05gk4.fsf@servo.finestructure.net> User-Agent: Notmuch/0.10.2+74~g994a706 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Sat, 10 Dec 2011 15:19:29 -0800 Message-ID: <878vmk581q.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Dec 2011 23:19:37 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Sun, 11 Dec 2011 00:46:51 +0200, Ciprian Dorin Craciun wrote: > I've given a quick look into `notmuch-show.c` (commit from > December 4) and indeed it seems quite trivial to add new formats. >=20 > Thus I wonder: > a) Is the code suitable for experimenting such a feature? (I mean > is the "overhaul" almost done, or still in progress?) I think it's more just beginning rather than hearing completion. You can follow what's happened so far in the thread starting here: id:"1322446871-14986-1-git-send-email-amdragon@mit.edu" > c) Would someone else be interested in such a feature? (Or it's > something so remote that only the two of us stumbled upon it?) I think it would be a useful feature, and if it's useful for you it's probably worth implementing. > * in my use-case I would need each line of the output to be a > standalone JSON object of an individual message; (thus I can script > with Bash `notmuch ... | while read message ; do ... ; done`;) This is actually a slightly different idea than what I thought you were originally proposing. Outputting a series of json objects rather than a single list has been talked about for notmuch search as well. I'm don't have a good sense of whether this is a sensible idea or not. > * maybe someone else would need that the output to contain > **exactly one** such message (maybe the first); This is what I thought we were talking about. This is an option I would like to see, at least. > * or maybe the separator in the first use case should be `\0` > instead of `\n`; I think specifying the separator should just be an option. jamie. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJO4+kBAAoJEO00zqvie6q8busP/Ar9Dk6gZaoRnC+qhlST7n7S mF5xxzqCNzYG8qQYQOmFrAIpP0nhEnlVTmAV/KSHxbzelFgAAl1Y2NCWM/lkmNQr OX1W5C50nV+1weixsXORwSSHu+V1AKLHheddP1f18chNhg5l2nJE89ei/ng6ial+ p80qz91MnH+5cvPd6NxMQquadWEcFG8z8u5ehnCV4obIcS4FMjA3zXgoWm4kGo5q 5/PkB8bIRGnfKsCKD6T8iCusBlbFaRpKmDnWBK6GrMHTHYPsG8NYMRUr42RsV7Gt 0HEmdsN4Gw1flvj+aptItfelvV7xuzyQieLCAQG6cXHE+awbq03KjOoEM4Z/CVU5 uQJQFrUK+QdU16VhGt0RMqGIr2fmlS6q5T3zfbapCwTjukB7exgaQSXWhVfLnvaX DyWDa8sJjngJ54tDU64QDMIiQsuTW/RgnFLbJ3zFK/2wnteNyV/ZY6Y1NuKXVL5X fzm3W6X6B9uZ2kh5VEQVTIXngkdgRULZjeiXBbpvpUj/QDHCUj20W1PhtiRqH9sz /lzjWdHA0R3nktvt0XyV7jkypP99neJvGAKDciM785SXWZBWO8hzzeMi4nStyp6o vbz/lorVhcHoROmVg0Tbn8CcnefaqN1zusk+DlKbsCYJLL9niYz02vm7xe/XhzPp tCDvNQHDA3v5F0FZM68q =RkjW -----END PGP SIGNATURE----- --=-=-=--