diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-04-01 12:47:12 +0200 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-04-01 12:47:12 +0200 |
commit | 5a9da62ded70cfb05309aebcb1c1ee09d17948c5 (patch) | |
tree | 0ddbdff0a75279bd6d4dae48fe83510cb5e32108 /scripts/postinfo | |
parent | 71ab18ec4264197aae27efe64e4565c4989a19cd (diff) |
added scripts for post meta json things
Diffstat (limited to 'scripts/postinfo')
-rwxr-xr-x | scripts/postinfo | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/postinfo b/scripts/postinfo new file mode 100755 index 0000000..94827f1 --- /dev/null +++ b/scripts/postinfo @@ -0,0 +1,20 @@ +#!/bin/sh + +filename=$1 + +jq -n \ + --argjson title "$(./meta title $filename)" \ + --argjson subtitle "$(./meta subtitle $filename)" \ + --argjson author "$(./meta author $filename)" \ + --argjson date "$(./meta date $filename)" \ + --argjson tags "$(./meta tags $filename)" \ + --argjson urlname "$(basename $filename .md | jq --raw-input)" \ +'{ + "title": $title, + "subtitle": $subtitle, + "author": $author, + "date": $date, + "tags": $tags, + "urlname": $urlname +}' + |