💾 Archived View for thatit.be › 2022-11-04-17-12-57.gmi captured on 2023-04-26 at 13:27:12. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-04-19)

➡️ Next capture (2023-06-14)

🚧 View Differences

-=-=-=-=-=-=-

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

updated: 2023-04-20 12:50:10 -0400

generated: 2023-04-23