add default directorie for svg files
This commit is contained in:
parent
c89985ec09
commit
82c2829c07
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ from pathlib import Path
|
||||||
import shlex
|
import shlex
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import uuid
|
||||||
|
|
||||||
class D2langDirective(SphinxDirective):
|
class D2langDirective(SphinxDirective):
|
||||||
required_arguments = 0
|
required_arguments = 0
|
||||||
|
@ -24,7 +25,7 @@ class D2langDirective(SphinxDirective):
|
||||||
if 'filename' in self.options:
|
if 'filename' in self.options:
|
||||||
output_fname = self.options.get('filename')
|
output_fname = self.options.get('filename')
|
||||||
else:
|
else:
|
||||||
output_fname = 'test.svg'
|
output_fname = "d2lang_svg/" + str(uuid.uuid4())
|
||||||
if 'layout' in self.options:
|
if 'layout' in self.options:
|
||||||
layout = self.options.get('layout')
|
layout = self.options.get('layout')
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue