Make the blog post match up when author presupplies a DATE to the create_new_entry.sh script
This commit is contained in:
@ -13,6 +13,14 @@ ENTRIES=data/$I2P_OS/$I2P_BRANCH/entries.html
|
||||
UUIDGEN="`which uuidgen || which uuid`"
|
||||
if [ -z "$DATE" ]; then
|
||||
DATE=$(date +%Y-%m-%dT%H:00:00Z)
|
||||
YEAR=$(date +%Y)
|
||||
MONTH=$(date +%m)
|
||||
DAY=$(date +%d)
|
||||
else
|
||||
DATE2=$(echo "$DATE" | sed 's/T.*//')
|
||||
YEAR=$(echo "$DATE2" | cut -d - -f 1)
|
||||
MONTH=$(echo "$DATE2" | cut -d - -f 2)
|
||||
DAY=$(echo "$DATE2" | cut -d - -f 3)
|
||||
fi
|
||||
if [ -z "$HREF" ]; then
|
||||
if [ ! -z "$CHANGEME_URL_HERE" ]; then
|
||||
@ -20,7 +28,7 @@ if [ -z "$HREF" ]; then
|
||||
else
|
||||
CHANGEME_URL_HERE=$(echo "$TITLE" | tr "[:upper:]" "[:lower:]" | sed 's| |_|g')
|
||||
fi
|
||||
HREF="http://i2p-projekt.i2p/en/blog/post/"$(date +%Y)/$(date +%m)/$(date +%d)"/$CHANGEME_URL_HERE"
|
||||
HREF="http://i2p-projekt.i2p/en/blog/post/$YEAR/$MONTH/$DAY/$CHANGEME_URL_HERE"
|
||||
fi
|
||||
TITLE=${TITLE:-TITLE_HERE}
|
||||
AUTHOR=${AUTHOR:-AUTHOR_HERE}
|
||||
|
Reference in New Issue
Block a user