Rewrite _cleanup

This commit is contained in:
Stig-Ørjan Smelror 2024-01-29 23:34:26 +01:00
parent caf60edcc1
commit 5a70bc1159

13
qsgen2
View File

@ -635,13 +635,14 @@ function _youtube() {
function _cleanup() {
# This removes tags used in the templates that may be left over for some reason
local debug=false
local debug=true
if (${debug}) echo "${red}_cleanup: Cleaning up links in: ${www_root}/${1%.*}.html${end}"
sed -i -- "s|¤||g" ${www_root}/${1%.*}.html
sed -i -- "s|#showimg\ ||g" ${www_root}/${1%.*}.html
sed -i -- "s|#ytvideo\ ||g" ${www_root}/${1%.*}.html
sed -i -- "s|#link\ ||g" ${www_root}/${1%.*}.html
if (${debug}) echo "${red}_cleanup: Cleaning up links in: ${1}${end}"
echo ${1} | sed \
-e "s|¤||g" \
-e "s|#showimg\ ||g" \
-e "s|#ytvideo\ ||g" \
-e "s|#link\ ||g"
}