Commit e157024b authored by gijs's avatar gijs

Make a copy of the SVG when plotting

parent 1dade87d
......@@ -10,6 +10,7 @@ from plottertools.textbox import Textbox
from chiplotle.geometry.core.coordinate import Coordinate
from settings import db
import os.path
import shutil
from flask import Flask, Response, app, request, render_template
marginleft = 30 # margin left in mm
......@@ -33,8 +34,11 @@ app = Flask(__name__)
def ploteps():
epsfile = request.args.get('epsfile')
svgfile = './svg/{}.svg'.format(os.path.splitext(os.path.basename(epsfile))[0])
hpglfile = './{}.hpgl'.format(os.path.splitext(epsfile)[0])
shutil.copy(svgfile, './svg/{}.svg'.format(int(time.time()))
# converting eps to hpgl[
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment