commit 2148af2e289f2843b2f3567dd09999d1a6f6522c
parent 18c7a0580532053781c24f30eb143f9b6e182b85
Author: pyratebeard <root@pyratebeard.net>
Date: Wed, 13 Jan 2021 22:41:25 +0000
fixed input_date
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pyratelog.sh b/pyratelog.sh
@@ -3,10 +3,11 @@
function initialise() {
cd /blog
input=$(find content/ -type f -name "*.md" | cut -f2 -d '/' | cut -f1 -d '.')
- input_date=$(echo ${input} | cut -f1 -d '-' | date +%Y\ %m\ %d)
+ input_date=$(echo ${input} | cut -f1 -d '-' )
+ input_date=$(date -d ${input_date} +%Y\ %m\ %d)
input_title=$(echo ${input} | cut -f2 -d '-' | sed 's/_/\ /g')
input_link="<li><a class="index" href='content/${input}.html'>${input_date} - ${input_title}</a></li>"
-
+
grep ${input} index.html >/dev/null && return
pandoc -s \