curated_feed.export =================== .. py:module:: curated_feed.export .. autoapi-nested-parse:: Render a corpus file as compact Markdown for pasting into a chat session. A collection day can run to several hundred items, so the output is deliberately terse: two lines per item, numbered for reference and carrying the record `id` so that picks can be traced back to the corpus. The numbering is the same one `policy.py` puts in the prompt, and comes from the same renderer. A chat session and a pipeline run therefore refer to an article by the same number, which is what lets a response saved from one drive the other. Functions --------- .. autoapisummary:: curated_feed.export.render_markdown curated_feed.export.render curated_feed.export.build_parser curated_feed.export.resolve_corpus_file curated_feed.export.main Module Contents --------------- .. py:function:: render_markdown(candidates: collections.abc.Sequence[curated_feed.models.Candidate], *, title: str, max_items: int | None = None) -> str Numbered Markdown under a heading, one item per two lines. .. py:function:: render(candidates: collections.abc.Sequence[curated_feed.models.Candidate], *, config: curated_feed.config.Config, title: str, max_items: int | None = None, as_prompt: bool = False, prompt_path: pathlib.Path | None = None) -> str The listing on its own, or the whole prompt the pipeline would send. The prompt form is what a chat session wants: the same policy documents and the same numbering the pipeline uses, so a response saved from that session can be fed straight back with `curate-score --provider file`. .. py:function:: build_parser() -> argparse.ArgumentParser .. py:function:: resolve_corpus_file(args: argparse.Namespace, config: curated_feed.config.Config) -> pathlib.Path .. py:function:: main(argv: collections.abc.Sequence[str] | None = None) -> int