From c3bbd8488d6cf2ff752f5100dcb29a7b7391ab38 Mon Sep 17 00:00:00 2001 From: Christoph Stelz Date: Wed, 23 Jun 2021 10:25:50 +0200 Subject: [PATCH] Only export SVG if file not already there --- tuhi/export.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tuhi/export.py b/tuhi/export.py index 1c72826..4e4d61e 100644 --- a/tuhi/export.py +++ b/tuhi/export.py @@ -13,6 +13,7 @@ from gi.repository import GObject import svgwrite +import os from svgwrite import mm import cairo @@ -83,6 +84,8 @@ class JsonSvg(ImageExportBase): _pen_pressure_width_factor = 0.2 def _convert(self): + if os.path.isfile(self.filename): + return width, height = self.output_dimensions size = width * mm, height * mm