INNER CODE UNIT · Python
info
yifanfeng97/Hyper-Extract · hyperextract/cli/cli.py:855
def info(
ka_path: str = typer.Argument(..., help="Knowledge Abstract directory"),
sources: bool = typer.Option(
False,
"--sources",
help="Show the source ledger (documents that contributed to this KA)",
),
):
"""View Knowledge Abstract information and statistics."""
logger.info("command=info ka_path=%s sources=%s", ka_path, sources)
import json
path = validate_ka_with_data(ka_path)
metadata = load_ka_metadata(path)
data_file = path / "data.json"
with open(data_file, "r", encoding="utf-8") as f: