examples,tutorial: provide default metadata
This commit is contained in:
parent
1ea0b9febd
commit
f0a6631af5
24
examples/metadata.yml
Normal file
24
examples/metadata.yml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
metadata:
|
||||||
|
|
||||||
|
title: test
|
||||||
|
pn: test-01
|
||||||
|
company: some company
|
||||||
|
address: 8888 fancy street west
|
||||||
|
|
||||||
|
authors:
|
||||||
|
created:
|
||||||
|
name: bob ross
|
||||||
|
date: 2023-03-29
|
||||||
|
reviewed:
|
||||||
|
name: n/a
|
||||||
|
date: n/a
|
||||||
|
|
||||||
|
revisions:
|
||||||
|
a:
|
||||||
|
name: bob ross
|
||||||
|
date: 2023-03-29
|
||||||
|
changelog: initial release
|
||||||
|
|
||||||
|
template:
|
||||||
|
name: din-6771
|
||||||
|
sheetsize: A3
|
||||||
@ -63,9 +63,16 @@ def build_generated(groupkeys):
|
|||||||
with (path / readme).open("w") as out:
|
with (path / readme).open("w") as out:
|
||||||
out.write(f'# {groups[key]["title"]}\n\n')
|
out.write(f'# {groups[key]["title"]}\n\n')
|
||||||
# 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):
|
||||||
try:
|
try:
|
||||||
res = cli(["--formats", "ghpst", str(yaml_file)])
|
res = cli([
|
||||||
|
"--formats",
|
||||||
|
"ghpst",
|
||||||
|
str(yaml_file),
|
||||||
|
"--prepend",
|
||||||
|
yaml_file.parent / "metadata.yml"
|
||||||
|
])
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
if str(e) != "0" and not isinstance(
|
if str(e) != "0" and not isinstance(
|
||||||
e, (click.ClickException, SystemExit)
|
e, (click.ClickException, SystemExit)
|
||||||
|
|||||||
24
tutorial/metadata.yml
Normal file
24
tutorial/metadata.yml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
metadata:
|
||||||
|
|
||||||
|
title: test
|
||||||
|
pn: test-01
|
||||||
|
company: some company
|
||||||
|
address: 8888 fancy street west
|
||||||
|
|
||||||
|
authors:
|
||||||
|
created:
|
||||||
|
name: bob ross
|
||||||
|
date: 2023-03-29
|
||||||
|
reviewed:
|
||||||
|
name: n/a
|
||||||
|
date: n/a
|
||||||
|
|
||||||
|
revisions:
|
||||||
|
a:
|
||||||
|
name: bob ross
|
||||||
|
date: 2023-03-29
|
||||||
|
changelog: initial release
|
||||||
|
|
||||||
|
template:
|
||||||
|
name: din-6771
|
||||||
|
sheetsize: A4
|
||||||
Loading…
x
Reference in New Issue
Block a user