Rewriting _html

This commit is contained in:
Stig-Ørjan Smelror 2024-01-29 22:17:38 +01:00
parent bdbb1cbf61
commit 0d79b4bfc8

79
qsgen2
View File

@ -643,45 +643,46 @@ function _html() {
local debug=true
if (${debug}) echo "${red}_html: Generating HTML for ${1}${end}"
sed -i -- "s|\#BR|<br/>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#BD|<b>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EBD|</b>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#UN|<u>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EUN|</u>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#P|<p>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EP|</p>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#Q|<blockquote>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EQ|</blockquote>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#STRONG|<strong>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#ESTRONG|</strong>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#I|<i>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EI|</i>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#C|<code>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EC|</code>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EM|<em>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#SEM|</em>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#OT|\&quot;|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#UL|\n<ul>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#OL|<ol>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#LI|<li class=\"libody\">|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#ELI|</li>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EUL|\n</ul>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EOL|</ol>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#H1|<h1>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#H2|<h2>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#H3|<h3>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#H4|<h4>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#H5|<h5>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#H6|<h6>|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EH1|</h1>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EH2|</h2>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EH3|</h3>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EH4|</h4>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EH5|</h5>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#EH6|</h6>\n|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#LT|\&lt;|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#GT|\&gt;|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#NUM|\&num;|g" ${www_root}/${1%.*}.html
sed -i -- "s|\#BR|<br/>\n|g" \
-i -- "s|\#BD|<b>|g" \
-i -- "s|\#EBD|</b>|g" \
-i -- "s|\#UN|<u>|g" \
-i -- "s|\#EUN|</u>\n|g" \
-i -- "s|\#P|<p>\n|g" \
-i -- "s|\#EP|</p>\n|g" \
-i -- "s|\#Q|<blockquote>|g" \
-i -- "s|\#EQ|</blockquote>|g" \
-i -- "s|\#STRONG|<strong>|g" \
-i -- "s|\#ESTRONG|</strong>|g" \
-i -- "s|\#I|<i>|g" \
-i -- "s|\#EI|</i>|g" \
-i -- "s|\#C|<code>\n|g" \
-i -- "s|\#EC|</code>\n|g" \
-i -- "s|\#EM|<em>|g" \
-i -- "s|\#SEM|</em>|g" \
-i -- "s|\#OT|\&quot;|g" \
-i -- "s|\#UL|\n<ul>\n|g" \
-i -- "s|\#OL|<ol>\n|g" \
-i -- "s|\#LI|<li class=\"libody\">|g" \
-i -- "s|\#ELI|</li>\n|g" \
-i -- "s|\#EUL|\n</ul>\n|g" \
-i -- "s|\#EOL|</ol>\n|g" \
-i -- "s|\#H1|<h1>|g" \
-i -- "s|\#H2|<h2>|g" \
-i -- "s|\#H3|<h3>|g" \
-i -- "s|\#H4|<h4>|g" \
-i -- "s|\#H5|<h5>|g" \
-i -- "s|\#H6|<h6>|g" \
-i -- "s|\#EH1|</h1>\n|g" \
-i -- "s|\#EH2|</h2>\n|g" \
-i -- "s|\#EH3|</h3>\n|g" \
-i -- "s|\#EH4|</h4>\n|g" \
-i -- "s|\#EH5|</h5>\n|g" \
-i -- "s|\#EH6|</h6>\n|g" \
-i -- "s|\#LT|\&lt;|g" \
-i -- "s|\#GT|\&gt;|g" \
-i -- "s|\#NUM|\&num;|g" \
${1}
}