41 lines
2.2 KiB
Bash
Executable File
41 lines
2.2 KiB
Bash
Executable File
#!/bin/sh
|
|
# read stdin
|
|
content=$(cat)
|
|
content_safe=$(echo "$content"| sed -E 's/^(>+)/\1 /g ;
|
|
s/^(>+) /\1 /g ;
|
|
s|<|\<|g ;
|
|
s|>|\>|g ;
|
|
s|^\>\>\>\>\>\>|\>\>\>\>\></span><span style="color: x">\></span>|g ;
|
|
s|^\>\>\>\>\>|\>\>\>\></span><span style="color: gray">\></span>|g ;
|
|
s|^\>\>\>\>|\>\>\></span><span style="color: brown">\></span>|g ;
|
|
s|^\>\>\>|\>\></span><span style="color: green">\></span>|g ;
|
|
s|^\>\>|\><span style="color: orange">\></span>|g ;
|
|
s|^\>|<span style="color: blue">\></span>|g ;
|
|
s|^----------.*|<span style="color: gray">&</span>| ;
|
|
s|^Sender: |<b>&</b>| ;
|
|
s|^Date: |<b>&</b>| ;
|
|
s|^To: |<b>&</b>| ;
|
|
s|^Cc: |<b>&</b>| ;
|
|
s|^Subject: |<b>&</b>| ;
|
|
s|^-- $|</font><font face="Arial" size="0.75" color="gray">--\ |g ;
|
|
s|^Stefan Hagen$|<b>&</b>|g ;
|
|
s|^SAP SE Germany, Walldorf$|<b>&</b>|g')
|
|
|
|
# wrap html
|
|
echo '<html>'
|
|
echo ' <head>'
|
|
echo ' <meta charset="utf-8">'
|
|
echo ' <meta name="viewport" content="width=device-width, initial-scale=1">'
|
|
echo ' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">'
|
|
echo ' <meta http-equiv="X-UA-Compatible" content="IE=edge">'
|
|
echo ' <title></title>'
|
|
echo ' </head>'
|
|
echo ' <body style="min-width: 74ch; color: black; font-size: 11; line-height: 1.6; font: 11, \"Calibri\"">'
|
|
echo ' <pre>'
|
|
echo ' <font size="3" face="Calibri">'
|
|
echo "$content_safe"
|
|
echo '</font>'
|
|
echo '</pre>'
|
|
echo '</body>'
|
|
echo '</html>'
|