#!/usr/bin/env bash
ROOT=`stack path --project-root`
EXAMPLES='boundingbox colormaps goo latex_basic latex_color latex_draw
latex_wheel raster sphere blender_default_cube'
WIDTH=640
HEIGHT=$((WIDTH*9/16))
FPS=30
SRC_DIR=$ROOT/examples
DST_DIR=$ROOT/docs/rendered
OPTS="--fps $FPS --width $WIDTH --height $HEIGHT"
cat << EOF > $ROOT/docs/gallery.md
# Gallery
This file is auto-generated by docs/render_all.sh. DO NOT EDIT.
EOF
for e in $EXAMPLES; do
cat << EOF >> $ROOT/docs/gallery.md
## $e
View $e.hs
{!examples/$e.hs!}