
    Mh                     >    d Z ddlmZ ddlmZ  G d de          ZdS )zModule containing a preprocessor that converts outputs in the notebook from
one format to another.

Converts all of the outputs in a notebook from one format to another.
    )Unicode   )Preprocessorc                        e Zd ZdZ ed                              d          Z ed                              d          Z fdZd Z	d	 Z
 xZS )
ConvertFiguresPreprocessorzO
    Converts all of the outputs in a notebook from one format to another.
    zFormat the converter accepts)helpT)configzFormat the converter writesc                 :     t                      j        di | dS )z$
        Public constructor
        N )super__init__)selfkw	__class__s     f/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/nbconvert/preprocessors/convertfigures.pyr   z#ConvertFiguresPreprocessor.__init__   s(     	2    c                     t                      )zConvert the figure.)NotImplementedError)r   data_formatdatas      r   convert_figurez)ConvertFiguresPreprocessor.convert_figure   s    !###r   c                     |                     dg           D ]_}|j        dv rT| j        |j        v rF| j        |j        vr8|                     | j        |j        | j                           |j        | j        <   `||fS )zK
        Apply a transformation on each cell,

        See base.py
        outputs>   display_dataexecute_result)getoutput_typefrom_formatr   	to_formatr   )r   cell	resources
cell_indexoutputs        r   preprocess_cellz*ConvertFiguresPreprocessor.preprocess_cell    s     hhy"-- 	 	F"&HHH$33N&+55.2.A.A$fk$2B&C/ /DN+ Yr   )__name__
__module____qualname____doc__r   tagr   r   r   r   r$   __classcell__)r   s   @r   r   r      s          '=>>>BB$BOOK:;;;??t?LLI    $ $ $      r   r   N)r(   	traitletsr   baser   r   r   r   r   <module>r-      si                $ $ $ $ $ $ $ $ $ $r   