summaryrefslogtreecommitdiff
path: root/email-print-mime-structure
diff options
context:
space:
mode:
Diffstat (limited to 'email-print-mime-structure')
-rwxr-xr-xemail-print-mime-structure39
1 files changed, 25 insertions, 14 deletions
diff --git a/email-print-mime-structure b/email-print-mime-structure
index 49e7208..7adeb2b 100755
--- a/email-print-mime-structure
+++ b/email-print-mime-structure
@@ -1,23 +1,34 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-# Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
-# License: GPLv3+
-
-# This script reads a MIME message from stdin and produces a treelike
-# representation on it stdout.
-
-# Example:
+# Copyright (C) 2019 Daniel Kahn Gillmor
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
#
-# 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:~$
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+'''
+This script reads a MIME message from stdin and produces a treelike
+representation on it stdout.
-# If you want to number the parts, i suggest piping the output through
-# something like "cat -n"
+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"
+'''
import email
import sys