From 0d9cead275145c7e37e9acc6c1bd62bbbfd09f2e Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 12 Dec 2017 14:55:25 +0300 Subject: [PATCH] Split mimedecode.py into a mimedecode library and a small script --- ANNOUNCE | 10 +++++---- ChangeLog | 10 +++++++++ Makefile.4xslt | 2 +- Makefile.sgmlt | 2 +- Makefile.xsltproc | 2 +- TODO | 8 ------- mimedecode.docbook | 20 +++++++++--------- mimedecode/__init__.py | 1 + mimedecode/__main__.py | 4 ++++ .../__version__.py | 2 +- .../formatparam_27.py | 0 mimedecode.py => mimedecode/mimedecode.py | 11 +++++++--- setup.py | 15 ++++++++++--- test/expected-save/msg_07-1.txt | 2 +- test/expected-save/msg_07-3.txt | Bin 3718 -> 3715 bytes test/expected-save/msg_07-4.txt | Bin 3710 -> 3707 bytes test/expected/msg_01-1.txt | 2 +- test/expected/msg_01-2.txt | 2 +- test/expected/msg_01.txt | 2 +- test/expected/msg_02-1.txt | 16 +++++++------- test/expected/msg_02.txt | 16 +++++++------- test/expected/msg_06.txt | 2 +- test/expected/msg_07-1.txt | Bin 4170 -> 4164 bytes test/expected/msg_07.txt | Bin 4178 -> 4172 bytes test/expected/msg_08.txt | 8 +++---- test/expected/msg_09.txt | 6 +++--- test/expected/msg_10.txt | 16 +++++++------- test/expected/msg_12.txt | 12 +++++------ test/expected/msg_12a.txt | 12 +++++------ test/expected/msg_13.txt | Bin 4403 -> 4394 bytes test/expected/msg_14.txt | 2 +- test/expected/msg_15-1.txt | 6 +++--- test/expected/msg_15-2.txt | 6 +++--- test/expected/msg_15.txt | 8 +++---- test/expected/msg_16-1.txt | 4 ++-- test/expected/msg_16-2.txt | 4 ++-- test/expected/msg_16.txt | 4 ++-- test/expected/msg_18-1.txt | 2 +- test/expected/msg_18.txt | 2 +- test/expected/msg_20.txt | 2 +- test/expected/msg_21.txt | 4 ++-- test/expected/msg_22-1.txt | Bin 1901 -> 1889 bytes test/expected/msg_22.txt | Bin 2015 -> 2003 bytes test/expected/msg_26.txt | Bin 2029 -> 2023 bytes test/expected/msg_26.txt-py3 | Bin 2021 -> 2015 bytes test/expected/msg_27.txt | 2 +- test/expected/msg_28.txt | 4 ++-- test/expected/msg_29-1.txt | 2 +- test/expected/msg_29.txt | 2 +- test/expected/msg_30.txt | 4 ++-- test/expected/msg_32.txt | 2 +- test/expected/msg_33.txt | 4 ++-- test/expected/msg_38.txt | 2 +- test/expected/msg_39.txt | 6 +++--- test/expected/msg_39.txt-py3 | 6 +++--- test/expected/msg_46.txt | 2 +- test/test_all | 2 +- 57 files changed, 144 insertions(+), 121 deletions(-) create mode 100644 mimedecode/__init__.py create mode 100644 mimedecode/__main__.py rename mimedecode_version.py => mimedecode/__version__.py (85%) rename formatparam_27.py => mimedecode/formatparam_27.py (100%) rename mimedecode.py => mimedecode/mimedecode.py (99%) diff --git a/ANNOUNCE b/ANNOUNCE index 05d7830..198bf47 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -30,16 +30,18 @@ everything else. This is how it could be done: mimedecode.py -t application/pdf -t application/postscript -t text/plain -b text/html -B 'image/*' -i '*/*' +Version 2.9.0 (2017-12-??) + + Split mimedecode.py into a mimedecode library and a small script. + + Made the library executable via ``python -m mimedecode``. + Version 2.8.0 (2017-11-03) Python 3. Stop supporting Python 2.6. - Code cleanup: fixed flake8 errors and warnings. - - Pushed to GitHub. Tests at Travis. - WHERE TO GET Home page: http://phdru.name/Software/Python/#mimedecode diff --git a/ChangeLog b/ChangeLog index eeb317c..5ea9936 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Version 2.9.0 (2017-12-??) + + Split mimedecode.py into a mimedecode library and a small script. + + Moved formatparam_27.py and mimedecode_version.py to the library. + + Made the library executable via ``python -m mimedecode``. + + Renamed mimedecode_version.py to __version__.py. + Version 2.8.0 (2017-11-03) Python 3. diff --git a/Makefile.4xslt b/Makefile.4xslt index 96981a0..cea0f13 100644 --- a/Makefile.4xslt +++ b/Makefile.4xslt @@ -5,7 +5,7 @@ mimedecode.html: mimedecode.docbook Makefile.4xslt mimedecode.man: mimedecode.docbook Makefile.4xslt 4xslt $< $(DOCBOOK_XSL)/manpages/docbook.xsl - mv mimedecode.py.1 $@ + mv mimedecode.1 $@ mimedecode.txt: mimedecode.html Makefile.4xslt elinks -dump -no-numbering -no-references $< >$@ diff --git a/Makefile.sgmlt b/Makefile.sgmlt index cadd36f..ba8e333 100644 --- a/Makefile.sgmlt +++ b/Makefile.sgmlt @@ -1,6 +1,6 @@ mimedecode.html: mimedecode.docbook Makefile.sgmlt sgmltools -b html $< - mv mimedecode/mimedecode.py.html mimedecode.html + mv mimedecode/mimedecode.html mimedecode.html rmdir mimedecode mimedecode.man: mimedecode.docbook Makefile.sgmlt diff --git a/Makefile.xsltproc b/Makefile.xsltproc index c800f78..421f413 100644 --- a/Makefile.xsltproc +++ b/Makefile.xsltproc @@ -5,7 +5,7 @@ mimedecode.html: mimedecode.docbook Makefile.xsltproc mimedecode.man: mimedecode.docbook Makefile.xsltproc xsltproc $(DOCBOOK_XSL)/manpages/docbook.xsl $< - mv mimedecode.py.1 $@ + mv mimedecode.1 $@ mimedecode.txt: mimedecode.html Makefile.xsltproc elinks -dump -no-numbering -no-references $< >$@ diff --git a/TODO b/TODO index e665141..62aa862 100644 --- a/TODO +++ b/TODO @@ -1,11 +1,3 @@ -Split mimedecode.py into a library and a small script. -Move formatparam_27.py and mimedecode_version.py to the library. -Rename mimedecode_version.py to __version__.py. - - -Release 2.9. - - Convert mimedecode.py library from global functions to a class. diff --git a/mimedecode.docbook b/mimedecode.docbook index 0129709..8da5d2f 100644 --- a/mimedecode.docbook +++ b/mimedecode.docbook @@ -2,10 +2,10 @@ - + - mimedecode.py + mimedecode mimedecode.docbook Oleg @@ -20,18 +20,18 @@ - mimedecode.py + mimedecode 1 - mimedecode.py + mimedecode decode MIME message - mimedecode.py + mimedecode @@ -122,7 +122,7 @@ - Here is a solution - mimedecode.py! + Here is a solution - mimedecode! @@ -494,8 +494,8 @@ Save output to the file related to the destination directory from option -O. Also useful in case of redirected stdin: - mimedecode.py -o output_file < input_file -cat input_file | mimedecode.py -o output_file + mimedecode -o output_file < input_file +cat input_file | mimedecode -o output_file @@ -512,7 +512,7 @@ cat input_file | mimedecode.py -o output_file - mimedecode.py -t application/pdf -t application/postscript -t text/plain + mimedecode -t application/pdf -t application/postscript -t text/plain -b text/html -B 'image/*' -i '*/*' @@ -641,7 +641,7 @@ cat input_file | mimedecode.py -o output_file SEE ALSO - mimedecode.py home page: + mimedecode home page: http://phdru.name/Software/Python/#mimedecode diff --git a/mimedecode/__init__.py b/mimedecode/__init__.py new file mode 100644 index 0000000..792d600 --- /dev/null +++ b/mimedecode/__init__.py @@ -0,0 +1 @@ +# diff --git a/mimedecode/__main__.py b/mimedecode/__main__.py new file mode 100644 index 0000000..d41b0c0 --- /dev/null +++ b/mimedecode/__main__.py @@ -0,0 +1,4 @@ +from .mimedecode import main + +if __name__ == "__main__": + main() diff --git a/mimedecode_version.py b/mimedecode/__version__.py similarity index 85% rename from mimedecode_version.py rename to mimedecode/__version__.py index 1c7393c..f5653d0 100644 --- a/mimedecode_version.py +++ b/mimedecode/__version__.py @@ -1,4 +1,4 @@ -__version__ = "2.8.0" +__version__ = "2.9.0" __author__ = "Oleg Broytman " __copyright__ = "Copyright (C) 2001-2017 PhiloSoft Design" __license__ = "GNU GPL" diff --git a/formatparam_27.py b/mimedecode/formatparam_27.py similarity index 100% rename from formatparam_27.py rename to mimedecode/formatparam_27.py diff --git a/mimedecode.py b/mimedecode/mimedecode.py similarity index 99% rename from mimedecode.py rename to mimedecode/mimedecode.py index 9019669..c3d4e0a 100755 --- a/mimedecode.py +++ b/mimedecode/mimedecode.py @@ -5,12 +5,12 @@ import os import subprocess import sys -from mimedecode_version import __version__, __copyright__ +from .__version__ import __version__, __copyright__ if sys.version_info[0] >= 3: # Replace email.message._formatparam with _formatparam from Python 2.7 # to avoid re-encoding non-ascii params. - import formatparam_27 # noqa: F401: Imported for its side effect + from mimedecode import formatparam_27 # noqa: F401: Imported for its side effect me = os.path.basename(sys.argv[0]) @@ -678,7 +678,7 @@ def get_opts(): return arguments -if __name__ == "__main__": +def main(): arguments = get_opts() la = len(arguments) @@ -725,6 +725,7 @@ if __name__ == "__main__": g.host_name = socket.gethostname() g.outfile = outfile + global output if hasattr(outfile, 'buffer'): def output_bytes(s): if not isinstance(s, bytes): @@ -749,3 +750,7 @@ if __name__ == "__main__": finally: infile.close() outfile.close() + + +if __name__ == "__main__": + main() diff --git a/setup.py b/setup.py index fcfb53e..6d51a56 100755 --- a/setup.py +++ b/setup.py @@ -1,5 +1,8 @@ #! /usr/bin/env python +from imp import load_source +from os.path import abspath, dirname, join + try: from setuptools import setup is_setuptools = True @@ -7,7 +10,9 @@ except ImportError: from distutils.core import setup is_setuptools = False -from mimedecode_version import __version__, __copyright__, __license__ +versionpath = join(abspath(dirname(__file__)), "mimedecode", "__version__.py") +load_source("mimedecode_version", versionpath) +from mimedecode_version import __version__, __copyright__, __license__ # noqa: ignore flake8 E402 kw = {} if is_setuptools: @@ -43,7 +48,11 @@ setup( 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], - py_modules=['formatparam_27', 'mimedecode_version'], - scripts=['mimedecode.py'], + packages=['mimedecode'], + entry_points={ + 'console_scripts': [ + 'mimedecode = mimedecode.__main__:main' + ] + }, **kw ) diff --git a/test/expected-save/msg_07-1.txt b/test/expected-save/msg_07-1.txt index 0ddf15f..e2b1480 100644 --- a/test/expected-save/msg_07-1.txt +++ b/test/expected-save/msg_07-1.txt @@ -1,5 +1,5 @@ Content-Type: image/gif; name="dingusfish.gif" Content-Transfer-Encoding: 8bit content-disposition: attachment; filename="dingusfish.gif" -X-MIME-Autoconverted: from base64 to 8bit by test id mimedecode.py +X-MIME-Autoconverted: from base64 to 8bit by test id mimedecode diff --git a/test/expected-save/msg_07-3.txt b/test/expected-save/msg_07-3.txt index cc8962b78e115a8135b6190f6517830c6e937b9d..89bed6d4de23a3ec4bf61defd9f932ea666f5fe1 100644 GIT binary patch delta 10 RcmZpZZI+#Ia^sm@yZ{*_1mOSx delta 14 VcmZpcZIhjFl3A~ya^uNeyZ|ZS1^55} diff --git a/test/expected-save/msg_07-4.txt b/test/expected-save/msg_07-4.txt index 047192840e2e1aa92113499e30617a2fe938420f..90e022b5505dbbd1ed4bd024402ae377f87edd8c 100644 GIT binary patch delta 10 Scmew-^IK-Z!Hq|D@d5xLL&Mu>b%7 delta 32 icmZ3bv{`9GGb6KJLFMFT#+zU|hUqtm-W<++nHK=YA`9&R diff --git a/test/expected/msg_14.txt b/test/expected/msg_14.txt index 70c0e14..c78e454 100644 --- a/test/expected/msg_14.txt +++ b/test/expected/msg_14.txt @@ -11,7 +11,7 @@ Subject: This is a test message Date: Fri, 4 May 2001 14:05:44 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode Hi, diff --git a/test/expected/msg_15-1.txt b/test/expected/msg_15-1.txt index 272ad45..416e7f6 100644 --- a/test/expected/msg_15-1.txt +++ b/test/expected/msg_15-1.txt @@ -20,17 +20,17 @@ Content-type: multipart/alternative; --MS_Mac_OE_3071477847_720252_MIME_Part Content-transfer-encoding: 8bit -X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode.py +X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode Some removed test. --MS_Mac_OE_3071477847_720252_MIME_Part Content-type: text/html; charset="ISO-8859-1" Content-transfer-encoding: 8bit -X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode.py +X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode diff --git a/test/expected/msg_15-2.txt b/test/expected/msg_15-2.txt index 50d8a05..60e9298 100644 --- a/test/expected/msg_15-2.txt +++ b/test/expected/msg_15-2.txt @@ -20,17 +20,17 @@ Content-type: multipart/alternative; --MS_Mac_OE_3071477847_720252_MIME_Part Content-transfer-encoding: 8bit -X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode.py +X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode Some removed test. --MS_Mac_OE_3071477847_720252_MIME_Part Content-type: text/html; charset="ISO-8859-1" Content-transfer-encoding: 8bit -X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode.py +X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode Message body of type text/html skipped. diff --git a/test/expected/msg_15.txt b/test/expected/msg_15.txt index ae8288f..f846150 100644 --- a/test/expected/msg_15.txt +++ b/test/expected/msg_15.txt @@ -20,20 +20,20 @@ Content-type: multipart/alternative; --MS_Mac_OE_3071477847_720252_MIME_Part Content-transfer-encoding: 8bit -X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode.py +X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode Some removed test. --MS_Mac_OE_3071477847_720252_MIME_Part Content-transfer-encoding: 8bit -X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode.py +X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode X-MIME-Autoconverted: from text/html to text/plain by test id ./html2txt.py MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode diff --git a/test/expected/msg_16-1.txt b/test/expected/msg_16-1.txt index b2e4bb9..b48f54f 100644 --- a/test/expected/msg_16-1.txt +++ b/test/expected/msg_16-1.txt @@ -18,7 +18,7 @@ Content-Type: multipart/report; boundary="Boundary_(ID_PGS2F2a+z+/jL7hupKgRhA)" --Boundary_(ID_PGS2F2a+z+/jL7hupKgRhA) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode This report relates to a message you sent with the following header fields: @@ -67,7 +67,7 @@ X-BeenThere: scr@socal-raves.org X-Mailman-Version: 2.1a3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode I always love to find more Ian's that are over 3 years old!! diff --git a/test/expected/msg_16-2.txt b/test/expected/msg_16-2.txt index 7daa4f5..e060db1 100644 --- a/test/expected/msg_16-2.txt +++ b/test/expected/msg_16-2.txt @@ -6,7 +6,7 @@ Content-Type: multipart/report; boundary="Boundary_(ID_PGS2F2a+z+/jL7hupKgRhA)" --Boundary_(ID_PGS2F2a+z+/jL7hupKgRhA) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode This report relates to a message you sent with the following header fields: @@ -33,7 +33,7 @@ Content-type: MESSAGE/RFC822 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode I always love to find more Ian's that are over 3 years old!! diff --git a/test/expected/msg_16.txt b/test/expected/msg_16.txt index e533601..0d593fe 100644 --- a/test/expected/msg_16.txt +++ b/test/expected/msg_16.txt @@ -36,7 +36,7 @@ Content-Type: multipart/report; boundary="Boundary_(ID_PGS2F2a+z+/jL7hupKgRhA)" --Boundary_(ID_PGS2F2a+z+/jL7hupKgRhA) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode This report relates to a message you sent with the following header fields: @@ -114,7 +114,7 @@ List-Unsubscribe: , List-Archive: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode I always love to find more Ian's that are over 3 years old!! diff --git a/test/expected/msg_18-1.txt b/test/expected/msg_18-1.txt index 28af17d..01898fa 100644 --- a/test/expected/msg_18-1.txt +++ b/test/expected/msg_18-1.txt @@ -3,5 +3,5 @@ Content-Transfer-Encoding: 7bit X-Foobar-Spoink-Defrobnit: wasnipoop MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode diff --git a/test/expected/msg_18.txt b/test/expected/msg_18.txt index b380885..2af15eb 100644 --- a/test/expected/msg_18.txt +++ b/test/expected/msg_18.txt @@ -4,5 +4,5 @@ X-Foobar-Spoink-Defrobnit: wasnipoop; giraffes="very-long-necked-animals"; spooge="yummy"; hippos="gargantuan"; marshmallows="gooey" MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode diff --git a/test/expected/msg_20.txt b/test/expected/msg_20.txt index 3ea86f2..45912f4 100644 --- a/test/expected/msg_20.txt +++ b/test/expected/msg_20.txt @@ -14,7 +14,7 @@ Subject: This is a test message Date: Fri, 4 May 2001 14:05:44 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode Hi, diff --git a/test/expected/msg_21.txt b/test/expected/msg_21.txt index 3827163..c69cae7 100644 --- a/test/expected/msg_21.txt +++ b/test/expected/msg_21.txt @@ -9,14 +9,14 @@ MIME message Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode One --BOUNDARY Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode Two --BOUNDARY-- diff --git a/test/expected/msg_22-1.txt b/test/expected/msg_22-1.txt index 1545c7302a6547d4d460a171936292f396c2c66f..f16cc48c36c2ecc6556b3c76121bb80ee80ca0d7 100644 GIT binary patch delta 32 mcmaFM_mFSHA;!si?ADW*er*2DWWqH0H&gQFsjSmLg7yI8m<+K1 delta 46 qcmaFJ_m*$NAx37sg38T@7>&V<$(pRmni4RHu diff --git a/test/expected/msg_22.txt b/test/expected/msg_22.txt index 0caea80e2ff2a8e079d5be24dc47d44eea496531..03354950b92e4192a47c5168632de58471f07468 100644 GIT binary patch delta 29 jcmcc5f0=*7A;!rI*sV7)88U7*Va{dRyoB{9NW>lhtL+NM delta 50 ucmcc2f1iKDAx37sg38HL*sVAJWi$kHHtR9xGJ!?)n3FgEW1R+5Vh;ex`4KDt diff --git a/test/expected/msg_26.txt b/test/expected/msg_26.txt index 16b74b55f8935ec1c220cc1f66f0732e79c5d463..1c97140d490b4c8f849aa3e225f3e08b4e5a9f85 100644 GIT binary patch delta 17 ZcmaFM|D1orALh;fnSB^H`?1bv0su@W2TK3| delta 25 dcmaFP|CWElA7*B~g38T*n0*+*3=h`%OaO_%33dPg diff --git a/test/expected/msg_26.txt-py3 b/test/expected/msg_26.txt-py3 index bf2880234a3a392432574a073232266b4bfb3c15..f07ea9264c336782fe75a328603e3dfcc579d4db 100644 GIT binary patch delta 17 ZcmaFLf1iKDcjnE%m^~RcyRpt^0su;h2POaj delta 25 dcmcc5|CE2jcV=e2g38U`nLQc73 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode -- It's never too late to have a happy childhood. diff --git a/test/expected/msg_39.txt b/test/expected/msg_39.txt index 9c99abd..32bb20d 100644 --- a/test/expected/msg_39.txt +++ b/test/expected/msg_39.txt @@ -16,7 +16,7 @@ Content-Type: application/octet-stream Content-ID: <20592.1022586929.3@example.com> Content-Description: patch1 Content-Transfer-Encoding: 8bit -X-MIME-Autoconverted: from base64 to 8bit by test id mimedecode.py +X-MIME-Autoconverted: from base64 to 8bit by test id mimedecode XXX @@ -25,7 +25,7 @@ Content-Type: application/octet-stream Content-ID: <20592.1022586929.4@example.com> Content-Description: patch2 Content-Transfer-Encoding: 8bit -X-MIME-Autoconverted: from base64 to 8bit by test id mimedecode.py +X-MIME-Autoconverted: from base64 to 8bit by test id mimedecode XXX @@ -81,7 +81,7 @@ XXX Content-ID: <20592.1022586929.15@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode -- It's never too late to have a happy childhood. diff --git a/test/expected/msg_39.txt-py3 b/test/expected/msg_39.txt-py3 index 5866bf7..5dc16d4 100644 --- a/test/expected/msg_39.txt-py3 +++ b/test/expected/msg_39.txt-py3 @@ -16,7 +16,7 @@ Content-Type: application/octet-stream Content-ID: <20592.1022586929.3@example.com> Content-Description: patch1 Content-Transfer-Encoding: 8bit -X-MIME-Autoconverted: from base64 to 8bit by test id mimedecode.py +X-MIME-Autoconverted: from base64 to 8bit by test id mimedecode ]u ------- =_aaaaaaaaaa1 @@ -24,7 +24,7 @@ Content-Type: application/octet-stream Content-ID: <20592.1022586929.4@example.com> Content-Description: patch2 Content-Transfer-Encoding: 8bit -X-MIME-Autoconverted: from base64 to 8bit by test id mimedecode.py +X-MIME-Autoconverted: from base64 to 8bit by test id mimedecode ]u ------- =_aaaaaaaaaa1-- @@ -79,7 +79,7 @@ XXX Content-ID: <20592.1022586929.15@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode -- It's never too late to have a happy childhood. diff --git a/test/expected/msg_46.txt b/test/expected/msg_46.txt index 0260b99..5f1ae5a 100644 --- a/test/expected/msg_46.txt +++ b/test/expected/msg_46.txt @@ -20,6 +20,6 @@ Subject: GroupwiseForwardingTest Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -X-MIME-Autoconverted: from iso-8859-15 to utf-8 by test id mimedecode.py +X-MIME-Autoconverted: from iso-8859-15 to utf-8 by test id mimedecode Testing email forwarding with Groupwise 1.2.2010 diff --git a/test/test_all b/test/test_all index 1074273..02329d5 100755 --- a/test/test_all +++ b/test/test_all @@ -30,7 +30,7 @@ test1() { fi shift - $PYTHON ../mimedecode.py -H test -f utf-8 "$@" input/"$infile" >tmp/"$expfile" || return 1 + mimedecode -H test -f utf-8 "$@" input/"$infile" >tmp/"$expfile" || return 1 if cmp -s expected/"$expfile" tmp/"$expfile"; then rm tmp/"$expfile" && return 0 || return 1 else -- 2.39.2