ocebuild.parsers.schema#

Methods for retrieving and handling Sample.plist schemas.

Module Contents#

Functions#

parse_schema(→ dict)

Gets the Sample.plist schema from a Configuration.tex file.

ocebuild.parsers.schema.parse_schema(file: List[str] | io.TextIOWrapper, sample_plist: dict, /, raw_schema: dict | None = None) dict[source]#

Gets the Sample.plist schema from a Configuration.tex file.

The Sample.plist schema is parsed from the Configuration.tex file, which is the source LaTeX file for the OpenCore documentation. These schema values match the declared failsafe values used as fallbacks in the OpenCore config file. Extracted schema values are then converted to a plist-compatible format and then coerced into native Python types.

Parameters:
  • file – The Configuration.tex file to parse.

  • sample_plist – The sample plist to use for comparison.

  • raw_schema – If specified, the raw schema will be stored in this dictionary.

Returns:

A dictionary representing failsafe values for the Sample.plist schema.