poly_scribe_code_gen.cli
cli
Command line interface for the poly_scribe_code_gen package.
This module provides the command line interface for generating code from WebIDL files.
Functions:
-
poly_scribe_code_gen–Main entry point for the poly_scribe_code_gen command line interface.
poly_scribe_code_gen
poly_scribe_code_gen() -> int
Main entry point for the poly_scribe_code_gen command line interface.
This function parses command line arguments, processes the input WebIDL file, and generates the requested code files. It supports generating C++, Python, and JSON schema files based on the provided WebIDL. It also allows for additional data to be passed for code generation.
If the --schema option is used, it requires either the --py or --py-package option to be specified,
as the schema generation relies on the Python code being generated.
Returns:
-
int–Exit code, 0 for success, non-zero for failure.
Raises:
-
RuntimeError–If there is an error in the command line arguments or during code generation.