summaryrefslogtreecommitdiff
path: root/support/inkscape/__main__.py
diff options
context:
space:
mode:
Diffstat (limited to 'support/inkscape/__main__.py')
-rw-r--r--support/inkscape/__main__.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/support/inkscape/__main__.py b/support/inkscape/__main__.py
index 7b3ea1a..ff23cc3 100644
--- a/support/inkscape/__main__.py
+++ b/support/inkscape/__main__.py
@@ -46,7 +46,16 @@ def main(in_path, out_path):
_unfuck_svg_document(temp_svg_path)
- _export_dxf(temp_svg_path, out_path, layers)
+ export_effect = effect.ExportEffect()
+ export_effect.affect(args = [temp_svg_path], output = False)
+
+ with open(out_path, 'w') as file:
+ if out_suffix == '.dxf':
+ export_effect.write_dxf(file)
+ elif out_suffix == '.asy':
+ export_effect.write_asy(file)
+ else:
+ raise Exception('Unknown file type: {}'.format(out_suffix))
try: