Skip to content

Commit

Permalink
Blank Path Adjusted
Browse files Browse the repository at this point in the history
  • Loading branch information
twinkletwinkie committed Aug 18, 2020
1 parent dc21ec6 commit 8f01f5f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions inkscape/svg2shenzhen/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
from copy import deepcopy
from inkex import bezier
from inkex.transforms import Transform
from pathlib import Path


homePath = str()
homePath = Path.home()

EXPORT_PNG_MAX_PROCESSES = 3
EXPORT_KICAD_MAX_PROCESSES = 2

Expand Down Expand Up @@ -254,7 +258,7 @@ def __init__(self):
}

def add_arguments(self, pars):
pars.add_argument("--path", default="~/")
pars.add_argument("--path", default=homePath)
pars.add_argument('-f', '--filetype', default='jpeg', help='Exported file type')
pars.add_argument("--crop", type=inkex.Boolean, default=False)
pars.add_argument("--dpi", type=int, default=600)
Expand Down Expand Up @@ -338,7 +342,12 @@ def processAutoMaskFromTo(self, from_layer, to_layer):
def processExportLayer(self):
options = self.options

output_path = os.path.expanduser(options.path)
if os.path.dirname(os.getcwd()) == options.path:
inkex.errormsg('EXPORT ERROR! Please Select A Directory To Export To!')
exit()
else:
output_path = os.path.expanduser(options.path)

curfile = self.options.input_file
layers = self.get_layers(curfile)
name = self.get_name()
Expand Down

0 comments on commit 8f01f5f

Please sign in to comment.