Do not output .gv files by default

This commit is contained in:
Daniel Rojas 2021-10-02 15:31:09 +02:00
parent 6a08988ca9
commit b1fa2b9de9
2 changed files with 3 additions and 3 deletions

View File

@ -464,7 +464,7 @@ class Harness:
data.seek(0) data.seek(0)
return data.read() return data.read()
def output(self, filename: (str, Path), view: bool = False, cleanup: bool = True, fmt: tuple = ('gv','html','png','svg','tsv')) -> None: def output(self, filename: (str, Path), view: bool = False, cleanup: bool = True, fmt: tuple = ('html','png','svg','tsv')) -> None:
# graphical output # graphical output
graph = self.create_graph() graph = self.create_graph()
svg_already_exists = Path(f'{filename}.svg').exists() # if SVG already exists, do not delete later svg_already_exists = Path(f'{filename}.svg').exists() # if SVG already exists, do not delete later

View File

@ -15,7 +15,7 @@ from wireviz.Harness import Harness
from wireviz.wv_helper import expand, get_single_key_and_value, is_arrow, open_file_read from wireviz.wv_helper import expand, get_single_key_and_value, is_arrow, open_file_read
def parse_text(yaml_str: str, file_out: (str, Path) = None, return_types: (None, str, Tuple[str]) = ('gv','html','png','svg','tsv'), image_paths: List = []) -> Any: def parse_text(yaml_str: str, file_out: (str, Path) = None, return_types: (None, str, Tuple[str]) = ('html','png','svg','tsv'), image_paths: List = []) -> Any:
""" """
Parses a YAML input string and does the high-level harness conversion Parses a YAML input string and does the high-level harness conversion
@ -32,7 +32,7 @@ def parse_text(yaml_str: str, file_out: (str, Path) = None, return_types: (None,
yaml_data = yaml.safe_load(yaml_str) yaml_data = yaml.safe_load(yaml_str)
return parse(yaml_data=yaml_data, file_out=file_out, return_types=return_types, image_paths=image_paths) return parse(yaml_data=yaml_data, file_out=file_out, return_types=return_types, image_paths=image_paths)
def parse(yaml_data: Dict, file_out: (str, Path) = None, return_types: (None, str, Tuple[str]) = ('gv','html','png','svg','tsv'), image_paths: List = []) -> Any: def parse(yaml_data: Dict, file_out: (str, Path) = None, return_types: (None, str, Tuple[str]) = ('html','png','svg','tsv'), image_paths: List = []) -> Any:
""" """
Parses a YAML dictionary and does the high-level harness conversion Parses a YAML dictionary and does the high-level harness conversion