From 36c611a00c292b45b1d7b0c639c942d98c23be83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Mon, 29 Jan 2024 22:47:42 +0100 Subject: [PATCH] Found a typo and more changes --- qsgen2 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qsgen2 b/qsgen2 index a4de20f..eeb0918 100755 --- a/qsgen2 +++ b/qsgen2 @@ -312,15 +312,18 @@ function _pages() { # Grab the title from the Page if (${debug}) echo "_pages: Grepping for page_title" - page_title=$( echo ${page_content} | head -1 | grep '#title' | cut -d= -f2 ) + page_title=$( echo ${page_content} | head -1 | grep \#title | cut -d= -f2 ) # Remove the #title line from the buffer. No longer needed. - page_content=$( grep -v '#title' ${page_content} ) + if (${debug}) echo "_pages: Removing #title line from page_content" + page_content=$( grep -v \#title ${page_content} ) # HTML'ify the page content + if (${debug}) echo "_pages: Running engine on page_content" page_content=$( ${engine} ${page_content} ) # Look for links, images and videos and convert them if present. + if (${debug}) echo "_pages: Checking for #link, #showimg and #ytvideo in page_content" if [[ $( grep \#link ${page_content} ) ]]; then echo "If #link is present, run _link: ${page_content}" _link ${page_content} @@ -333,7 +336,7 @@ function _pages() { fi # Insert page_content into pages_tpl by replacing the BODY tag present there - page_tpl=$( sed -e "s|BODY|${page_content}|" ${page_tpl} ) + pages_tpl=$( sed -e "s|BODY|${page_content}|" ${pages_tpl} ) # Replace every #pagetitle in pages_tpl pages_tpl=$( sed -e "s|#pagetitle|${page_title}|g" ${pages_tpl} )