added a get method

This commit is contained in:
Tristan Ancelet 2024-01-15 10:11:22 -06:00
parent 59bd42f185
commit c7b708da77

View File

@ -36,10 +36,10 @@ function get_posts_in_category () {
for post in ${CATEGORY_PATH}/*.wiki; do
FULLPATH=$post
FILENAME="${post/*\//}"
FILENAME="${post/*\/}"
TIMESTAMP=`cut -d '-' -f 1 <<< "$FILENAME"`
DATE=`date -d @$TIMESTAMP +"$DATE_FORMAT"`
WIKI_PATH=/posts/$CATEGORY/$FILENAME
WIKI_PATH=/posts/$CATEGORY_NAME/$FILENAME
POST_TITLE="`grep '%title' $FULLPATH | cut -d ' ' -f 2-` ($DATE)"
DATA="$FULLPATH:$WIKI_PATH:$POST_TITLE"
OUTPUT_POST_VAR+=( "$DATA" )