diff --git a/pad/exportMeta.sh b/pad/exportMeta.sh index 9defd4afd4727a92df005ff0ff8f2e543f6b9796..7549ed40d6ffcabba9b3de5c129612f3f246aa47 100644 --- a/pad/exportMeta.sh +++ b/pad/exportMeta.sh @@ -4,6 +4,10 @@ for (( ; ; )); do mkdir -p svg eps + + rm -f svg/*.svg + rm -f eps/*.eps + echo 'prologues := 3; outputtemplate := "%c.eps";' > eps/metahoguet.eps.mp echo 'outputtemplate := "%c.svg";' > svg/metahoguet.svg.mp @@ -16,5 +20,4 @@ do mpost -interaction=batchmode -s 'outputformat="eps"' eps/metahoguet.eps.mp cd .. sleep 3 -done - +done \ No newline at end of file diff --git a/pad/index.html b/pad/index.html index 99db80bca88f92fa4f64256c1fea5e095b4d83af..4532e2e0ca1c5d09aa61e9e809a89dd87d30514d 100644 --- a/pad/index.html +++ b/pad/index.html @@ -1,13 +1,13 @@ - - - - - - - - - - - + $("body").on("click", "img", function(){ + var result = window.confirm('voulez-vous imprimer ce glyph ?'); - + if(result){ + var path = $(this).attr('src').replace(/svg/g, 'eps'); + $.get('/api/ploteps/', { epsfile : path }); + } + }); + + setInterval(function(){ + stamp = (new Date).getTime(); + $("img").each(function () { + var src = $(this).attr('src').split('?')[0]; + $(this).attr('src', src + '?' + stamp); + }); + }, 5000); + + testing(); + + + \ No newline at end of file