diff --git a/src/wireviz/DataClasses.py b/src/wireviz/DataClasses.py index 2f7cc14e..b98cb431 100644 --- a/src/wireviz/DataClasses.py +++ b/src/wireviz/DataClasses.py @@ -18,6 +18,7 @@ class Connector: type: Optional[str] = None subtype: Optional[str] = None pincount: Optional[int] = None + image: Optional[str] = None notes: Optional[str] = None pinlabels: List[Any] = field(default_factory=list) pins: List[Any] = field(default_factory=list) @@ -90,6 +91,7 @@ class Cable: length: float = 0 wirecount: Optional[int] = None shield: bool = False + image: Optional[str] = None notes: Optional[str] = None colors: List[Any] = field(default_factory=list) color_code: Optional[str] = None diff --git a/src/wireviz/Harness.py b/src/wireviz/Harness.py index 9cc6b96d..58d24868 100644 --- a/src/wireviz/Harness.py +++ b/src/wireviz/Harness.py @@ -96,6 +96,7 @@ def create_graph(self) -> Graph: f'{connector.pincount}-pin' if connector.show_pincount else None, connector.color, '' if connector.color else None], '' if connector.style != 'simple' else None, + [f'' if connector.image else None], [html_line_breaks(connector.notes)]] html = nested_html_table(rows) @@ -243,6 +244,8 @@ def create_graph(self) -> Graph: html = f'{html}' # conductor table html = f'{html}' # main table + if cable.image: + html = f'{html}' if cable.notes: html = f'{html}{html_line_breaks(cable.notes)}' # notes table html = f'{html} ' # spacer at the end