summary refs log tree commit diff
path: root/md2saait
diff options
context:
space:
mode:
Diffstat (limited to 'md2saait')
-rwxr-xr-xmd2saait/frontmatter2cfg2
-rwxr-xr-xmd2saait/getdate5
2 files changed, 4 insertions, 3 deletions
diff --git a/md2saait/frontmatter2cfg b/md2saait/frontmatter2cfg
index c53a905..e4fb4e2 100755
--- a/md2saait/frontmatter2cfg
+++ b/md2saait/frontmatter2cfg
@@ -8,4 +8,4 @@
 
 INPUT=$1
 
-sed -n '/---/,/---/p' $INPUT | tail -n +2 | head -n -1 | yq '{title: .title, created: .date, updated: .date, keywords: .title, image: .image}' -y | sed "/\(created\|updated\)/s/T.*'/'/" | sed "s/:/ =/"
+sed -n '/---/,/---/p' $INPUT | tail -n +2 | head -n -1 | yq '{title: .title, created: .date, updated: .date, keywords: .title, image: .image}' -y | sed "/\(created\|updated\)/s/T.*'/'/" | sed "s/:/ =/" | sed "s/'//g"
diff --git a/md2saait/getdate b/md2saait/getdate
index 280d5cc..76ab2a6 100755
--- a/md2saait/getdate
+++ b/md2saait/getdate
@@ -1,4 +1,5 @@
 #!/bin/sh
 
-frontmatter2cfg $1 | grep created | \
-  cut -d' ' -f 3 | cut -c 2- | rev | cut -c 2- | rev
+cfg=`./md2saait/frontmatter2cfg $1 | grep created`
+date=`echo $cfg | cut -d' ' -f 3`
+echo $date