jq and yq to process yaml in my notes

for f in *.md ; do yq "{\"file\":\"$f\", \"headers\":.}" < <(sed -n '2,/^---$/ {/^---$/d; p}' $f ) ; done 

Or…

for f in *.md ; do
 sed -n '2,/^---$/ {/^---$/d; p}' "${f}" | yq "{\"file\":\"$f\", \"headers\":.}"
done 

There may be more optimal ways to organize them, but this was the first bit I liked. Need to learn more jq query syntax to be able to use it to search.

Tags

=> #meta

Navigation

=> index | tags

created: 2022-11-04

updated: 2022-11-05 01:39:06

(re)generated: 2025-01-11

Proxy Information
Original URL
gemini://thatit.be/2022-11-04-17-12-57.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
442.127565 milliseconds
Gemini-to-HTML Time
0.26932 milliseconds

This content has been proxied by September (ba2dc).