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 d6a303c1e9b1c4852e42d9b23867e21e48b1f990..b61c48eede519f54f3685d6fcfd85b984b4cf92a 100644 --- a/packages/df-wiki-cli/df_wiki_cli/content/main.py +++ b/packages/df-wiki-cli/df_wiki_cli/content/main.py @@ -6,7 +6,10 @@ from pydantic import BaseModel, ValidationError 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 +console = Console() app = typer.Typer() @@ -60,8 +63,9 @@ def lint( # print(repr(exc.errors()[0]["type"])) # print(repr(exc)) # print(exc.errors()) + # pprint(exc.errors(), expand_all=True) for err in exc.errors(): - print(f"{err['msg']} : {err['type']} {err['loc']}") + console.print(f"{err['msg']} : {err['type']} {','.join(err['loc'])}", style="red") print("\n") else: - print("OK!\n") + console.print("OK!\n", style="green")