From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 7356E6DE02C5 for ; Sun, 15 Sep 2019 11:02:09 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -1.354 X-Spam-Level: X-Spam-Status: No, score=-1.354 tagged_above=-999 required=5 tests=[AWL=1.147, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iNQnkYr_K7XA for ; Sun, 15 Sep 2019 11:02:08 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTPS id EB7F46DE028C for ; Sun, 15 Sep 2019 11:02:07 -0700 (PDT) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1568570525; h=from : to : subject : date : message-id : mime-version : content-type : content-transfer-encoding : from; bh=jegBGUHru4mJ9STQg4ohXhxnN1gPZ85fx2Nq3v2Mplw=; b=UftwqdWBCm812STE6p17Y1nDz9rSswhvY5vtvRmITT8b9Aop6gReFXSx xfTy0YiVLxLBJXZsx3rf9kl++XilCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1568570525; h=from : to : subject : date : message-id : mime-version : content-type : content-transfer-encoding : from; bh=jegBGUHru4mJ9STQg4ohXhxnN1gPZ85fx2Nq3v2Mplw=; b=Dp4Y1h/YTteT6QL2t4VZVN69MlENlvBJFIDvecWc1SY8J7dRnemBbFkf qWSdAL7CYQZPXD3N6nMc+cMhcKC5KmI+5+gD9psicWSyC87YfdqesdPHxV GOPE4METSDyEnXH9IXdIWiGs28EaGUNJQgrat7Ss8VaeuawID5f/YUbHsG b+Bq0qBonrivyu0HNf7pFoNMsSk0ehmJUFFdTMkJ3tA4OOSp+SchBKE/fE eAzUmMiv8gUeJErDGbzfVmXRh0btaj+Ur+knvFsskqP7cgzktAG1lQN2/B HEMDywDPbXgN3Q0vy5f0gcF5UZlFFNidMmFd0JilyEMMLUph0POfLQ== Received: from fifthhorseman.net (ool-6c3a0662.static.optonline.net [108.58.6.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id D6974F9A5 for ; Sun, 15 Sep 2019 14:02:04 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 4D79C20303; Sun, 15 Sep 2019 14:02:03 -0400 (EDT) From: Daniel Kahn Gillmor To: Notmuch Mail Subject: [PATCH] Drop devel/printmimestructure (it is in mailscripts 0.11) Date: Sun, 15 Sep 2019 14:02:03 -0400 Message-Id: <20190915180203.26426-1-dkg@fifthhorseman.net> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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: Sun, 15 Sep 2019 18:02:09 -0000 mailscripts 0.11 now ships a derivative of devel/printmimestructure called email-print-mime-structure. Maintenance for that utility will happen in mailscripts from now on, so we should not track an independent copy of it in notmuch's source tree. See https://bugs.debian.org/939993 for more details about the adoption. Signed-off-by: Daniel Kahn Gillmor --- devel/printmimestructure | 69 ---------------------------------------- 1 file changed, 69 deletions(-) delete mode 100755 devel/printmimestructure diff --git a/devel/printmimestructure b/devel/printmimestructure deleted file mode 100755 index 70e0a5c0..00000000 --- a/devel/printmimestructure +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -# Author: Daniel Kahn Gillmor -# License: GPLv3+ - -# This script reads a MIME message from stdin and produces a treelike -# representation on it stdout. - -# Example: -# -# 0 dkg@alice:~$ printmimestructure < 'Maildir/cur/1269025522.M338697P12023.monkey,S=6459,W=6963:2,Sa' -# └┬╴multipart/signed 6546 bytes -# ├─╴text/plain inline 895 bytes -# └─╴application/pgp-signature inline [signature.asc] 836 bytes -# 0 dkg@alice:~$ - - -# If you want to number the parts, i suggest piping the output through -# something like "cat -n" - -from __future__ import print_function - -import email -import sys - -def print_part(z, prefix): - fname = '' if z.get_filename() is None else ' [' + z.get_filename() + ']' - cset = '' if z.get_charset() is None else ' (' + z.get_charset() + ')' - disp = z.get_params(None, header='Content-Disposition') - if (disp is None): - disposition = '' - else: - disposition = '' - for d in disp: - if d[0] in [ 'attachment', 'inline' ]: - disposition = ' ' + d[0] - if z.is_multipart(): - nbytes = len(z.as_string()) - else: - nbytes = len(z.get_payload()) - - print('{}{}{}{}{} {:d} bytes'.format( - prefix, - z.get_content_type(), - cset, - disposition, - fname, - nbytes, - )) - -def test(z, prefix=''): - if (z.is_multipart()): - print_part(z, prefix+'┬╴') - if prefix.endswith('└'): - prefix = prefix.rpartition('└')[0] + ' ' - if prefix.endswith('├'): - prefix = prefix.rpartition('├')[0] + '│' - parts = z.get_payload() - i = 0 - while (i < parts.__len__()-1): - test(parts[i], prefix + '├') - i += 1 - test(parts[i], prefix + '└') - # FIXME: show epilogue? - else: - print_part(z, prefix+'─╴') - -test(email.message_from_file(sys.stdin), '└') -- 2.23.0