From 2fe5fb5769d9269253b489417518a51ba9c050e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Tue, 30 Jan 2024 13:12:42 +0100 Subject: [PATCH] Working on _blog_idx_for_index --- qsgen2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qsgen2 b/qsgen2 index 9864926..f26d03a 100755 --- a/qsgen2 +++ b/qsgen2 @@ -548,13 +548,14 @@ function _blog_idx_for_index() { # Iterate over each component and extract information for component in "${meta_array[@]}"; do case "${component}" in - SDATE:*) sdate=(${component#SDATE: }) ;; + SDATE:*) sdate=${component#SDATE: } ;; BTITLE:*) btitle=${component#BTITLE: } ;; INGRESS:*) ingress=${component#INGRESS: } ;; URL:*) url=${component#URL: } ;; esac - bdate="${sdate[1]} - ${sdate[4]}/${sdate[3]}/${sdate[2]}" + adate=( echo ${sdate} ) + bdate="${adate[1]} - ${adate[4]}/${adate[3]}/${adate[2]}" blog_list_content=$(echo "${blog_list}" | perl -pe "s|BLOGURL|${url}|g") blog_list_content=$(echo "${blog_list}" | perl -pe "s|BLOGTITLE|${btitle}|g") blog_list_content=$(echo "${blog_list}" | perl -pe "s|INGRESS|${ingress}|g")