"""Console entry point for placeholder-utils."""

import argparse

from .core import placeholder_paragraph


def main(argv=None) -> None:
    parser = argparse.ArgumentParser(
        description="Generate placeholder text for demos and tests.",
    )
    parser.add_argument(
        "-s",
        "--sentences",
        type=int,
        default=3,
        help="number of sentences to generate (default: 3)",
    )
    parser.add_argument(
        "-w",
        "--width",
        type=int,
        default=72,
        help="wrap output to this width (default: 72)",
    )
    parser.add_argument(
        "--seed",
        type=int,
        default=None,
        help="optional seed for deterministic output",
    )

    args = parser.parse_args(argv)
    text = placeholder_paragraph(
        sentences=args.sentences,
        width=args.width,
        seed=args.seed,
    )
    print(text)


if __name__ == "__main__":  # pragma: no cover
    main()

