Skip to content

Instantly share code, notes, and snippets.

@a-berg
Created May 13, 2025 15:06
Show Gist options
  • Save a-berg/d6eb30509e3217684807b5eca7c69a67 to your computer and use it in GitHub Desktop.
Save a-berg/d6eb30509e3217684807b5eca7c69a67 to your computer and use it in GitHub Desktop.
Typst CLI extract code blocks with yq (filtering by language)
typst query notes.typ "<export-code>" --pretty --format yaml | yq '.[] | select(.lang == "bash") | .text'
@a-berg
Copy link
Author

a-berg commented May 13, 2025

The same could be done with jq I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment