added a get method
This commit is contained in:
parent
59bd42f185
commit
c7b708da77
@ -36,10 +36,10 @@ function get_posts_in_category () {
|
|||||||
|
|
||||||
for post in ${CATEGORY_PATH}/*.wiki; do
|
for post in ${CATEGORY_PATH}/*.wiki; do
|
||||||
FULLPATH=$post
|
FULLPATH=$post
|
||||||
FILENAME="${post/*\//}"
|
FILENAME="${post/*\/}"
|
||||||
TIMESTAMP=`cut -d '-' -f 1 <<< "$FILENAME"`
|
TIMESTAMP=`cut -d '-' -f 1 <<< "$FILENAME"`
|
||||||
DATE=`date -d @$TIMESTAMP +"$DATE_FORMAT"`
|
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)"
|
POST_TITLE="`grep '%title' $FULLPATH | cut -d ' ' -f 2-` ($DATE)"
|
||||||
DATA="$FULLPATH:$WIKI_PATH:$POST_TITLE"
|
DATA="$FULLPATH:$WIKI_PATH:$POST_TITLE"
|
||||||
OUTPUT_POST_VAR+=( "$DATA" )
|
OUTPUT_POST_VAR+=( "$DATA" )
|
||||||
|
Loading…
Reference in New Issue
Block a user