Commit adeb796e authored by gijs's avatar gijs

Snapshotting refactor

parent e157024b
......@@ -34,10 +34,11 @@ app = Flask(__name__)
@app.route("/api/ploteps/")
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])
charnum = os.path.splitext(os.path.basename(epsfile))[0]
svgfile = './svg/{}.svg'.format(charnum)
hpglfile = './hpgl/{}.hpgl'.format(charnum)
shutil.copy(svgfile, './svg/{}.svg'.format(int(time.time()))
shutil.copy(svgfile, './svg/snaps/{}-{}.svg'.format(charnum, int(time.time())))
# converting eps to hpgl
subprocess.call([
......
../pad/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