diff --git a/mbox2web b/mbox2web index ceae0cd..4a22c10 100755 --- a/mbox2web +++ b/mbox2web @@ -54,17 +54,18 @@ def render_message(msg): def save_part(msg, disposition): content_type = msg.get_content_type() extension = { - "application/octet-stream": ".bin", - "text/html": ".html", - "text/x-vcard": ".vcf", - "text/plain": ".txt", - "application/x-gzip": ".gz", # more likely tar.gz, but we can't know without looking into it which we ain't - "image/gif": ".gif", - "text/x-c": ".c", - "application/x-perl": ".pl", - "application/msword": ".doc", - "application/ms-tnef": ".ms-tnef", - "application/x-bzip2": ".bz2", # more likely tar.bz2, but we can't know without looking into it which we ain't + "application/octet-stream": ".bin", + "text/html": ".html", + "text/x-vcard": ".vcf", + "text/plain": ".txt", + "application/x-gzip": ".gz", # more likely tar.gz, but we can't know without looking into it which we ain't + "image/gif": ".gif", + "text/x-c": ".c", + "application/x-perl": ".pl", + "application/msword": ".doc", + "application/ms-tnef": ".ms-tnef", + "application/x-bzip2": ".bz2", # more likely tar.bz2, but we can't know without looking into it which we ain't + "application/x-shellscript": ".sh", }[content_type] name = msg.get_param("name") or "(data)" diff --git a/templates/attachment_application_x-shellscript.html b/templates/attachment_application_x-shellscript.html new file mode 100644 index 0000000..703ae72 --- /dev/null +++ b/templates/attachment_application_x-shellscript.html @@ -0,0 +1,8 @@ +
+
+ application/x-shellscript +
+
+ {{name}} +
+