diff options
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 +}' + |