#!/bin/bash


for file in `ls main.weight.full.*.pdf` 
do
    filecut="${file%.*}"
    echo $filecut;
    convert -flatten -density 150 -antialias -depth 8 ${filecut}.pdf ${filecut}.png 
done
ffmpeg -y -i main.weight.full.animation.%5d.png -vcodec libx264 -pix_fmt yuv420p -an -f mp4 -crf 20  main.weight.full.single.length.animation.mp4
find . -name "main.weight.full.animation.[0-9]*.p[dn][fg]" -exec rm -f \{\} \;
