Compare commits
No commits in common. "3d639f6ec232ea9efb35d467ae0a360e4a7884f1" and "4da9fe4886ec49d4dc9ad8819bd7a95a1f098787" have entirely different histories.
3d639f6ec2
...
4da9fe4886
@ -40,7 +40,6 @@ Note that there must be one single space between `--` and `%` at both ends.
|
|||||||
| `<!-- %sheet_total% -->` | `1` (multi-page documents not yet supported) |
|
| `<!-- %sheet_total% -->` | `1` (multi-page documents not yet supported) |
|
||||||
| `<!-- %diagram% -->` | Embedded SVG diagram as valid HTML |
|
| `<!-- %diagram% -->` | Embedded SVG diagram as valid HTML |
|
||||||
| `<!-- %diagram_png_b64% -->` | Embedded base64 encoded PNG diagram as URI |
|
| `<!-- %diagram_png_b64% -->` | Embedded base64 encoded PNG diagram as URI |
|
||||||
| `<!-- %revision% -->` | The name of the last revision |
|
|
||||||
| `<!-- %{item}% -->` | String or numeric value of `metadata.{item}` |
|
| `<!-- %{item}% -->` | String or numeric value of `metadata.{item}` |
|
||||||
| `<!-- %{item}_{i}% -->` | Category number `{i}` within dict value of `metadata.{item}` |
|
| `<!-- %{item}_{i}% -->` | Category number `{i}` within dict value of `metadata.{item}` |
|
||||||
| `<!-- %{item}_{i}_{key}% -->` | Value of `metadata.{item}.{category}.{key}` |
|
| `<!-- %{item}_{i}_{key}% -->` | Value of `metadata.{item}.{category}.{key}` |
|
||||||
|
|||||||
@ -87,7 +87,6 @@ class Options:
|
|||||||
color_output_mode: ColorOutputMode = ColorOutputMode.EN_UPPER
|
color_output_mode: ColorOutputMode = ColorOutputMode.EN_UPPER
|
||||||
mini_bom_mode: bool = True
|
mini_bom_mode: bool = True
|
||||||
template_separator: str = "."
|
template_separator: str = "."
|
||||||
output_dpi: Optional[float] = 96.0
|
|
||||||
_pad: int = 0
|
_pad: int = 0
|
||||||
# TODO: resolve template and image paths during rendering, not during YAML parsing
|
# TODO: resolve template and image paths during rendering, not during YAML parsing
|
||||||
_template_paths: List = field(default_factory=list)
|
_template_paths: List = field(default_factory=list)
|
||||||
|
|||||||
@ -632,7 +632,6 @@ def set_dot_basics(dot, options):
|
|||||||
bgcolor=options.bgcolor.html,
|
bgcolor=options.bgcolor.html,
|
||||||
nodesep="0.33",
|
nodesep="0.33",
|
||||||
fontname=options.fontname,
|
fontname=options.fontname,
|
||||||
dpi=f"{options.output_dpi}",
|
|
||||||
) # TODO: Add graph attribute: charset="utf-8",
|
) # TODO: Add graph attribute: charset="utf-8",
|
||||||
dot.attr(
|
dot.attr(
|
||||||
"node",
|
"node",
|
||||||
|
|||||||
@ -15,7 +15,7 @@ from wireviz.wv_utils import (
|
|||||||
smart_file_resolve,
|
smart_file_resolve,
|
||||||
)
|
)
|
||||||
|
|
||||||
mime_subtype_replacements = {"jpg": "jpeg", "svg": "svg+xml", "tif": "tiff"}
|
mime_subtype_replacements = {"jpg": "jpeg", "tif": "tiff"}
|
||||||
|
|
||||||
|
|
||||||
# TODO: Share cache and code between data_URI_base64() and embed_svg_images()
|
# TODO: Share cache and code between data_URI_base64() and embed_svg_images()
|
||||||
@ -64,12 +64,6 @@ def get_mime_subtype(filename: Union[str, Path]) -> str:
|
|||||||
return mime_subtype
|
return mime_subtype
|
||||||
|
|
||||||
|
|
||||||
def _get_latest_revision(metadata: Dict) -> str:
|
|
||||||
if "revisions" not in metadata:
|
|
||||||
return ""
|
|
||||||
return list(metadata.get("revisions"))[-1]
|
|
||||||
|
|
||||||
|
|
||||||
def embed_svg_images_file(
|
def embed_svg_images_file(
|
||||||
filename_in: Union[str, Path], overwrite: bool = True
|
filename_in: Union[str, Path], overwrite: bool = True
|
||||||
) -> None:
|
) -> None:
|
||||||
@ -158,7 +152,6 @@ def generate_html_output(
|
|||||||
"<!-- %template_sheetsize% -->": metadata.get("template", {}).get(
|
"<!-- %template_sheetsize% -->": metadata.get("template", {}).get(
|
||||||
"sheetsize", ""
|
"sheetsize", ""
|
||||||
),
|
),
|
||||||
"<!-- %revision% -->": _get_latest_revision(metadata),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def replacement_if_used(key: str, func: Callable[[], str]) -> None:
|
def replacement_if_used(key: str, func: Callable[[], str]) -> None:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user