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 5D287431FBD for ; Tue, 9 Feb 2010 22:10:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.331 X-Spam-Level: X-Spam-Status: No, score=-1.331 tagged_above=-999 required=5 tests=[AWL=-1.332, BAYES_50=0.001] autolearn=ham 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 GCCAkH2QSJfD for ; Tue, 9 Feb 2010 22:10:08 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 37D54431FAE for ; Tue, 9 Feb 2010 22:10:08 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 616657601AA; Tue, 9 Feb 2010 22:10:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uDOGkN5onN11; Tue, 9 Feb 2010 22:10:04 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 472407601AE; Tue, 9 Feb 2010 22:10:04 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 29C6E7601AA; Tue, 9 Feb 2010 22:10:04 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id 815C211C0DA; Tue, 9 Feb 2010 22:10:02 -0800 (PST) From: Keith Packard To: Carl Worth , Alex Ghitza , notmuch@notmuchmail.org In-Reply-To: <87iqa6lz1b.fsf@yoom.home.cworth.org> References: <54iqa6bt4m.fsf@gmail.com> <87iqa6lz1b.fsf@yoom.home.cworth.org> Date: Tue, 09 Feb 2010 22:10:02 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] viewing text/html (inline or otherwise) 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: Wed, 10 Feb 2010 06:10:09 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Tue, 09 Feb 2010 16:22:56 -0800, Carl Worth wrote: > I know that Keith is using a little script he wrote so that he can hit > '|' on a message and pipe it to his script. The script then uses a > utility, (munpack?) to extract all the various MIME parts to a temporary > directory and then run a web broswer on that directory. Perhaps Keith > would be so kind as to share that script with the community here. It's not much of a script, I call it 'view-html' #!/bin/sh dir=3D`mktemp -d` trap "rm -r $dir" 0 cat "$@" > "$dir"/msg if munpack -C "$dir" -t < "$dir"/msg 2>&1 | grep 'Did not find'; then sed -n '/[Hh][Tt][Mm][Ll]/,$p' "$dir"/msg > $dir/part1.html rm "$dir"/msg fi for i in "$dir"/part*; do if grep -q -i -e '' -e 'text/html' "$i"; then iceweasel "$i" & sleep 3 exit 0 fi done Note that if iceweasel isn't already running, it seems to shut down when the script exits. I don't know why. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLck26Qp8BWwlsTdMRAgW8AJ9rDdGpYYEdxfLURa6lWTao7VaUjwCfVt58 6waGkFWv0o++W8C4CDkb/wA= =qNuC -----END PGP SIGNATURE----- --=-=-=--