From 1b2926e5479596a09567826b678469d025edcbb4 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 5 Aug 2017 12:10:59 -0400 Subject: [PATCH] Print inkscape command used to generate PNG this allows the user to edit the SVG and regenerate the PNG --- SotMDeckBuilder.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SotMDeckBuilder.py b/SotMDeckBuilder.py index a6dc17b..a427457 100755 --- a/SotMDeckBuilder.py +++ b/SotMDeckBuilder.py @@ -122,8 +122,12 @@ def makeFaces(deckJson, outfile): cardNum += 1 baseImage.write(outfile + ".svg") - subprocess.call(["inkscape", "-z", "-f", outfile + ".svg", "-w", - str(baseX * CARD_WIDTH * 4), "-e", outfile + ".png"]) + command = ["inkscape", "-z", + "-f", outfile + ".svg", + "-w", str(baseX * CARD_WIDTH * 5), + "-e", outfile + ".png"] + print("To regenerate PNG after editing SVG, run:\n " + " ".join(command)) + subprocess.run(command) return baseX def makeCardJson(template, nickname, description, cardID):