diff --git a/helpers/functions/asy2png b/helpers/functions/asy2png new file mode 100644 index 0000000..011611c --- /dev/null +++ b/helpers/functions/asy2png @@ -0,0 +1,10 @@ +# +# Create an image file from an asymptote file and convert it to svg and png +# + +asy "$1" +filename=$(basename -s .asy "$1") + +convert -density 300 "${filename}.pdf" -quality 100 $(echo "${filename}.pdf" | sed -e 's/pdf$/svg/') + +convert -density 300 "${filename}.pdf" -quality 100 $(echo "${filename}.pdf" | sed -e 's/pdf$/png/') diff --git a/helpers/init.zsh b/helpers/init.zsh new file mode 100644 index 0000000..58f2503 --- /dev/null +++ b/helpers/init.zsh @@ -0,0 +1,3 @@ +# +# Helpers aliases +# \ No newline at end of file