#!/bin/bash
TIME=$(date +%y%m%d_%H%M)
MAINFILE="${1%.typ}"
PNG="${MAINFILE}.png"
JPG="${MAINFILE}_${TIME}.jpg"
#typst compile "${MAINFILE}.typ" --ppi 300 "${PNG}"
typst compile "${MAINFILE}.typ" --font-path ./fonts --ppi 300 "${PNG}"
magick "${PNG}" ${JPG}
rm "${PNG}"
chown ${USER}:sharemnt ${JPG}
