md2star.click_cli module

Click front-end for md2star — a modern alternative to the argparse CLI.

md2star’s primary command-line surface is argparse-based (md2docx / md2pptx / md2pdf / md2star ), which is what forwards unknown flags straight to Pandoc. This module adds a click front-end over the same conversion pipeline for users who prefer click’s grouped-command ergonomics and rich --help. It is a thin adapter: every command reconstructs the flag list and delegates to md2star.cli._convert() (and the existing GUI / doctor dispatch), so there is exactly one implementation of the conversion logic and the two front-ends can never drift.

Installed as the md2star-x console script:

md2star-x docx report.md --author "Ada Lovelace"
md2star-x pptx slides.md --reference-doc deck.pptx
md2star-x pdf paper.md --bib refs.bib
md2star-x gui --port 9000
md2star-x doctor --json

click is a light, ubiquitous dependency; it is declared in the core requirements so md2star-x is always available alongside the argparse CLI.

Author

[Warith Harchaoui](https://www.linkedin.com/in/warith-harchaoui/)

md2star.click_cli.main(argv=None)[source]

Console entry point for md2star-x.

click normally manages its own process exit; we wrap it so the function is callable in tests and returns an int like the argparse main.

Parameters:

argv (list[str] | None)

Return type:

int