X-Git-Url: https://git.madduck.net/etc/neomutt.git/blobdiff_plain/4a92afa79087948278dd9f94b4dc592ddb986274..a30fe043c4abb29671e4e56f48d5096b6770292e:/.config/neomutt/buildmimetree.py?ds=sidebyside diff --git a/.config/neomutt/buildmimetree.py b/.config/neomutt/buildmimetree.py index f7d7c56..c277e63 100755 --- a/.config/neomutt/buildmimetree.py +++ b/.config/neomutt/buildmimetree.py @@ -63,7 +63,7 @@ def parse_cli_args(*args, **kwargs): "--extensions", type=str, default="", - help="Markdown extension to use (comma-separated list)" + help="Markdown extension to use (comma-separated list)", ) parser.add_argument( @@ -85,7 +85,9 @@ def parse_cli_args(*args, **kwargs): ) subp = parser.add_subparsers(help="Sub-command parsers", dest="mode") - massage_p = subp.add_parser("massage", help="Massaging phase (internal use)") + massage_p = subp.add_parser( + "massage", help="Massaging phase (internal use)" + ) massage_p.add_argument( "--write-commands-to", @@ -223,7 +225,12 @@ def collect_inline_images( filewriter_fn(path, data.read(), "w+b") relparts.append( - Part(*mimetype.split("/"), path, cid=info.cid, desc=f"Image: {info.desc}") + Part( + *mimetype.split("/"), + path, + cid=info.cid, + desc=f"Image: {info.desc}", + ) ) return relparts @@ -426,7 +433,13 @@ def do_massage( cmds.flush() extensions = extensions.split(",") if extensions else [] - tree = converter(draft_f.read(), draftpath, tempdir=tempdir, extensions=extensions) + tree = converter( + draft_f.read(), + draftpath, + cssfile=cssfile, + tempdir=tempdir, + extensions=extensions, + ) mimetree = MIMETreeDFWalker(debug=debug_walk) @@ -436,7 +449,7 @@ def do_massage( depth-first, and responsible for telling NeoMutt how to assemble the tree. """ - KILL_LINE=r'\Ca\Ck' + KILL_LINE = r"\Ca\Ck" if isinstance(item, Part): # We've hit a leaf-node, i.e. an alternative or a related part