Skip to content

Commit

Permalink
added config_name to final output for additional clarity (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
bullmoose20 authored Feb 24, 2025
1 parent 363127f commit b2925b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion modules/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def reorder_library_section(library_data):
return reordered_data


def build_config(header_style="standard"):
def build_config(header_style="standard", config_name=None):
"""
Build the final configuration, including all sections and headers,
ensuring the libraries section is properly processed.
Expand Down Expand Up @@ -440,6 +440,7 @@ def build_config(header_style="standard"):
yaml_content = (
f"# yaml-language-server: $schema=https://raw.githubusercontent.com/Kometa-Team/Kometa/{kometa_branch}/json-schema/config-schema.json\n\n"
f"{add_border_to_ascii_art(section_heading('KOMETA', font=header_style)) if header_style not in ['none', 'single line'] else section_heading('KOMETA', font=header_style)}\n\n"
f"{add_border_to_ascii_art(section_heading(config_name, font=header_style)) if header_style not in ['none', 'single line'] else section_heading(config_name, font=header_style)}\n\n"
f"{header_comment}\n\n"
)

Expand Down
3 changes: 2 additions & 1 deletion quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,9 +692,10 @@ def step(name):
data["sho-template_variables"] = {}

# Ensure correct rendering for the final validation page
config_name = session.get("config_name") or page_info.get("config_name", "default")
if name == "900-final":
validated, validation_error, config_data, yaml_content = build_config(
header_style
header_style, config_name=config_name
)

page_info["yaml_valid"] = validated
Expand Down

0 comments on commit b2925b2

Please sign in to comment.