Added final stuff for PDF output

Everythnig was alredy prepairt and I just had to make some minor changes.
I do not know why this was prepaired but not finished.
This commit is contained in:
Tobias Falk 2024-05-29 10:33:41 +02:00
parent a3281b07a2
commit 1d2ffb59b6
27 changed files with 7 additions and 7 deletions

BIN
examples/demo01.pdf Normal file

Binary file not shown.

BIN
examples/demo02.pdf Normal file

Binary file not shown.

BIN
examples/ex01.pdf Normal file

Binary file not shown.

BIN
examples/ex02.pdf Normal file

Binary file not shown.

BIN
examples/ex03.pdf Normal file

Binary file not shown.

BIN
examples/ex04.pdf Normal file

Binary file not shown.

BIN
examples/ex05.pdf Normal file

Binary file not shown.

BIN
examples/ex06.pdf Normal file

Binary file not shown.

BIN
examples/ex07.pdf Normal file

Binary file not shown.

BIN
examples/ex08.pdf Normal file

Binary file not shown.

BIN
examples/ex09.pdf Normal file

Binary file not shown.

BIN
examples/ex10.pdf Normal file

Binary file not shown.

BIN
examples/ex11.pdf Normal file

Binary file not shown.

BIN
examples/ex12.pdf Normal file

Binary file not shown.

BIN
examples/ex13.pdf Normal file

Binary file not shown.

BIN
examples/ex14.pdf Normal file

Binary file not shown.

View File

@ -682,7 +682,7 @@ class Harness:
).exists() # if SVG already exists, do not delete later ).exists() # if SVG already exists, do not delete later
# graphical output # graphical output
for f in fmt: for f in fmt:
if f in ("png", "svg", "html"): if f in ("png", "svg", "html", "pdf"):
if f == "html": # if HTML format is specified, if f == "html": # if HTML format is specified,
f = "svg" # generate SVG for embedding into HTML f = "svg" # generate SVG for embedding into HTML
# SVG file will be renamed/deleted later # SVG file will be renamed/deleted later
@ -707,9 +707,9 @@ class Harness:
if "html" in fmt: if "html" in fmt:
generate_html_output(filename, bomlist, self.metadata, self.options) generate_html_output(filename, bomlist, self.metadata, self.options)
# PDF output # PDF output
if "pdf" in fmt: #if "pdf" in fmt:
# TODO: implement PDF output # # TODO: implement PDF output
print("PDF output is not yet supported") # print("PDF output is not yet supported")
# delete SVG if not needed # delete SVG if not needed
if "html" in fmt and not "svg" in fmt: if "html" in fmt and not "svg" in fmt:
# SVG file was just needed to generate HTML # SVG file was just needed to generate HTML

View File

@ -36,7 +36,7 @@ groups = {
input_extensions = [".yml"] input_extensions = [".yml"]
extensions_not_containing_graphviz_output = [".gv", ".bom.tsv"] extensions_not_containing_graphviz_output = [".gv", ".bom.tsv"]
extensions_containing_graphviz_output = [".png", ".svg", ".html"] extensions_containing_graphviz_output = [".png", ".svg", ".html", ".pdf"]
generated_extensions = ( generated_extensions = (
extensions_not_containing_graphviz_output + extensions_containing_graphviz_output extensions_not_containing_graphviz_output + extensions_containing_graphviz_output
) )
@ -64,7 +64,7 @@ def build_generated(groupkeys):
# collect and iterate input YAML files # collect and iterate input YAML files
for yaml_file in collect_filenames("Building", key, input_extensions): for yaml_file in collect_filenames("Building", key, input_extensions):
print(f' "{yaml_file}"') print(f' "{yaml_file}"')
wireviz.parse(yaml_file, output_formats=("gv", "html", "png", "svg", "tsv")) wireviz.parse(yaml_file, output_formats=("gv", "html", "png", "svg", "tsv", "pdf"))
if build_readme: if build_readme:
i = "".join(filter(str.isdigit, yaml_file.stem)) i = "".join(filter(str.isdigit, yaml_file.stem))

View File

@ -18,7 +18,7 @@ format_codes = {
"g": "gv", "g": "gv",
"h": "html", "h": "html",
"p": "png", "p": "png",
# "P": "pdf", "P": "pdf",
"s": "svg", "s": "svg",
"t": "tsv", "t": "tsv",
} }

BIN
tutorial/tutorial01.pdf Normal file

Binary file not shown.

BIN
tutorial/tutorial02.pdf Normal file

Binary file not shown.

BIN
tutorial/tutorial03.pdf Normal file

Binary file not shown.

BIN
tutorial/tutorial04.pdf Normal file

Binary file not shown.

BIN
tutorial/tutorial05.pdf Normal file

Binary file not shown.

BIN
tutorial/tutorial06.pdf Normal file

Binary file not shown.

BIN
tutorial/tutorial07.pdf Normal file

Binary file not shown.

BIN
tutorial/tutorial08.pdf Normal file

Binary file not shown.