diff --git a/packages/df-wiki-cli/df_wiki_cli/content/main.py b/packages/df-wiki-cli/df_wiki_cli/content/main.py index b61c48eede519f54f3685d6fcfd85b984b4cf92a..11113150dfc2665ea144855cd5e2d85fd79834f4 100644 --- a/packages/df-wiki-cli/df_wiki_cli/content/main.py +++ b/packages/df-wiki-cli/df_wiki_cli/content/main.py @@ -7,7 +7,10 @@ from pydantic_yaml import parse_yaml_raw_as, to_yaml_str import frontmatter from enum import Enum from rich.console import Console -from rich.pretty import pprint +from rich import print as rprint +from rich.layout import Layout +from rich.panel import Panel + console = Console() app = typer.Typer() @@ -53,7 +56,8 @@ def lint( ), ], ): - print(f"check system {file}") + console.rule(f"[bold blue]{file.name}", style="blue") + with open(file) as f: metadata, _ = frontmatter.parse(f.read()) # print(metadata) @@ -65,7 +69,8 @@ def lint( # print(exc.errors()) # pprint(exc.errors(), expand_all=True) for err in exc.errors(): - console.print(f"{err['msg']} : {err['type']} {','.join(err['loc'])}", style="red") - print("\n") + console.print( + f"[red]{err['msg']} : {err['type']} {' -> '.join(err['loc'])}" + ) else: - console.print("OK!\n", style="green") + console.print("[green] Everything is alright")