vikit.postprocessing.subtitles.model ==================================== .. py:module:: vikit.postprocessing.subtitles.model Overview -------- .. list-table:: Classes :header-rows: 0 :widths: auto :class: summarytable * - :py:obj:`SubtitleConfig ` - Usage docs: https://docs.pydantic.dev/2.7/concepts/models/ Classes ------- .. py:class:: SubtitleConfig(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Usage docs: https://docs.pydantic.dev/2.7/concepts/models/ A base class for creating Pydantic models. .. attribute:: __class_vars__ The names of classvars defined on the model. .. attribute:: __private_attributes__ Metadata about the private attributes of the model. .. attribute:: __signature__ The signature for instantiating the model. .. attribute:: __pydantic_complete__ Whether model building is completed, or if there are still undefined fields. .. attribute:: __pydantic_core_schema__ The pydantic-core schema used to build the SchemaValidator and SchemaSerializer. .. attribute:: __pydantic_custom_init__ Whether the model has a custom `__init__` function. .. attribute:: __pydantic_decorators__ Metadata containing the decorators defined on the model. This replaces `Model.__validators__` and `Model.__root_validators__` from Pydantic V1. .. attribute:: __pydantic_generic_metadata__ Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these. .. attribute:: __pydantic_parent_namespace__ Parent namespace of the model, used for automatic rebuilding of models. .. attribute:: __pydantic_post_init__ The name of the post-init method for the model, if defined. .. attribute:: __pydantic_root_model__ Whether the model is a `RootModel`. .. attribute:: __pydantic_serializer__ The pydantic-core SchemaSerializer used to dump instances of the model. .. attribute:: __pydantic_validator__ The pydantic-core SchemaValidator used to validate instances of the model. .. attribute:: __pydantic_extra__ An instance attribute with the values of extra fields from validation when `model_config['extra'] == 'allow'`. .. attribute:: __pydantic_fields_set__ An instance attribute with the names of fields explicitly set. .. attribute:: __pydantic_private__ Instance attribute with the values of private attributes set on the model instance. .. rubric:: Overview .. list-table:: Attributes :header-rows: 0 :widths: auto :class: summarytable * - :py:obj:`bg_color ` - \- * - :py:obj:`font_size_px ` - \- * - :py:obj:`highlight_color ` - \- * - :py:obj:`highlight_opacity ` - \- * - :py:obj:`input_video_path ` - \- * - :py:obj:`margin_bottom_ratio ` - \- * - :py:obj:`margin_left_ratio ` - \- * - :py:obj:`margin_right_ratio ` - \- * - :py:obj:`output_video_name ` - \- * - :py:obj:`subtitle_srt_path ` - \- * - :py:obj:`subtitle_style ` - \- * - :py:obj:`text_color ` - \- * - :py:obj:`text_font ` - \- .. list-table:: Methods :header-rows: 0 :widths: auto :class: summarytable * - :py:obj:`validate_color `\ (v, info) - :summarylabel:`class` \- * - :py:obj:`validate_font_size_px `\ (v) - :summarylabel:`class` \- * - :py:obj:`validate_positive_number `\ (v, info) - :summarylabel:`class` \- * - :py:obj:`validate_subtitle_srt_path `\ (v) - :summarylabel:`class` \- * - :py:obj:`validate_subtitle_style `\ (v) - :summarylabel:`class` \- * - :py:obj:`validate_video_path `\ (v, info) - :summarylabel:`class` \- .. rubric:: Members .. py:attribute:: bg_color :type: Optional[str] .. py:attribute:: font_size_px :type: Optional[int] .. py:attribute:: highlight_color :type: Optional[str] .. py:attribute:: highlight_opacity :type: Optional[float] .. py:attribute:: input_video_path :type: str .. py:attribute:: margin_bottom_ratio :type: Optional[float] .. py:attribute:: margin_left_ratio :type: Optional[float] .. py:attribute:: margin_right_ratio :type: Optional[float] .. py:attribute:: output_video_name :type: str .. py:attribute:: subtitle_srt_path :type: str .. py:attribute:: subtitle_style :type: Optional[str] .. py:attribute:: text_color :type: Optional[str] .. py:attribute:: text_font :type: Optional[str] .. py:method:: validate_color(v, info) :classmethod: .. py:method:: validate_font_size_px(v) :classmethod: .. py:method:: validate_positive_number(v, info) :classmethod: .. py:method:: validate_subtitle_srt_path(v) :classmethod: .. py:method:: validate_subtitle_style(v) :classmethod: .. py:method:: validate_video_path(v, info) :classmethod: