def configure_parser(subparsers: argparse._SubParsersAction) -> None:
"""Register the export subcommand parser."""
parser = subparsers.add_parser(
"export",
help="Run a CLTK pipeline and write multiple outputs in one pass.",
formatter_class=HelpFormatter,
)
parser.add_argument(
"--lang",
"--language",
dest="language",
required=True,
help="Glottolog id or CLTK language key.",
)
parser.add_argument(
"--backend",
default="stanza",
help="Backend to use (stanza, openai, ollama, mistral, spacy).",
)
parser.add_argument("--pipeline", help="Optional pipeline class name to use.")
parser.add_argument("--text", help="Raw text to analyze.")
parser.add_argument("--text-file", help="Path to a text file to analyze.")
parser.add_argument(
"--config",
help="JSON string or path to JSON file for backend/pipeline settings.",
)
parser.add_argument(
"--conllu",
help="Write CoNLL-U output to this path.",
)
parser.add_argument(
"--readers-guide",
dest="readers_guide",
help="Write reader's guide Markdown to this path.",
)
parser.add_argument(
"--json",
dest="json_path",
help="Write JSON output to this path.",
)
parser.add_argument(
"--csv",
help="Write feature table CSV to this path.",
)
parser.add_argument(
"--tsv",
help="Write feature table TSV to this path.",
)
parser.add_argument(
"--parquet",
help="Write feature table Parquet to this path.",
)
parser.add_argument(
"--raw",
help="Write raw summary output to this path.",
)
parser.add_argument(
"--quiet",
action="store_true",
help="Suppress non-error logs.",
)
parser.add_argument(
"--verbose",
action="store_true",
help="Enable info-level logs.",
)
parser.set_defaults(func=run)