INNER CODE UNIT · Python
export_csv_cmd
yifanfeng97/Hyper-Extract · hyperextract/cli/cli.py:791
def export_csv_cmd(
ka_path: str = typer.Argument(..., help="Knowledge Abstract directory"),
output: str = typer.Option(..., "--output", "-o", help="Output directory"),
force: bool = typer.Option(
False, "--force", "-f", help="Write into an existing, non-empty directory"
),
):
"""Export a Knowledge Abstract to node and edge CSV tables."""
from hyperextract.utils.exporters.ka import (
GraphTypeError,
export_ka_csv,
is_hypergraph_ka,
)
logger.info("command=export-csv ka_path=%s output=%s", ka_path, output)
output_path = Path(output)
nonempty = (