OpenTranscode/opentranscode/__main__.py

27 lines
736 B
Python

"""``python -m opentranscode`` entry point.
Delegates to :func:`opentranscode.cli.main`, then propagates the returned
exit code via :func:`sys.exit`. Defined as a ``main()`` function (not inline
code) so it can be referenced as the
``opentranscode = opentranscode.__main__:main`` console-script entry point
in ``pyproject.toml``.
Extracted from ``open-transcode.v3.py`` (QA item v4-03 — package split).
This is a pure code-organization refactor; behavior is identical to v3.
"""
from __future__ import annotations
import sys
from .cli import main as cli_main
def main() -> int:
"""Module entry point — equivalent to ``opentranscode.cli.main()``."""
return cli_main()
if __name__ == "__main__":
sys.exit(main())