#!/usr/bin/env bash # this does the same thing as typst-unlit.lhs, but depends on typst and jq # this script does clobber the line numbers, so users beware typst query "$3" 'raw.where(lang: "haskell-top")' | jq -r '.[].text' > "$4" typst query "$3" 'raw.where(lang: "haskell")' | jq -r '.[].text' >> "$4"