blob: 94827f1938742f3de152bbb9ce8c9c3aaf5cd656 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
}'
|