관리-도구
편집 파일: _html_base.cpython-311.pyc
� P�Dg� � �( � d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl Z ddlZddlmZm Z mZmZmZ ddlmZ ddlmZ ddlmZ dd lmZmZmZmZmZ G d � dej � � Z G d� d ej � � Z G d� dej � � Z!dS )z,common definitions for Docutils HTML writers� N)�unquote)�url2pathname)�frontend� languages�nodes�utils�writers)� length_or_percentage_or_unitless)�PIL)� writer_aux)�unichar2tex�pick_math_environment� math2html�latex2mathml�tex2mathml_externc � � � e Zd ZdZ ddddgddifdd gd dej d�fd dgddej d�fddgdej d�fddgddej d�fddgddd�fdd gd!� � � d"d#d$�fd%d&gd'd(gd(d)d*d+�fd,d-gg d.�d/d)d$�fd0d1gd2dej d�fd3d4gd5dd�fd6d7gd2dej d�fd8d9gd:dd�fd;d<gd=d>ifd?d@gd=dAifdBdCgdDdej d�fdEdFgdGdd�fdHdIgdej dJ�fffZdKdLiZ dMZ dNZdOZ� fdP�Z dQ� ZdR� ZdS� ZdT� Z� xZS )U�Writer)�html�xhtmlzHTML Writer OptionsNzFSpecify the template file (UTF-8 encoded). (default: writer dependent)z --template�metavarz<file>zhComma separated list of stylesheet URLs. Overrides previous --stylesheet and --stylesheet-path settings.z--stylesheetz<URL[,URL,...]>�stylesheet_path)r � overrides� validatorz�Comma separated list of stylesheet paths. Relative paths are expanded if a matching file is found in the --stylesheet-dirs. With --link-stylesheet, the path is rewritten relative to the output HTML file. (default: writer dependent)z--stylesheet-pathz<file[,file,...]>� stylesheetz�Comma-separated list of directories where stylesheets are found. Used by --stylesheet-path when expanding relative path arguments. (default: writer dependent)z--stylesheet-dirsz<dir[,dir,...]>)r r zvEmbed the stylesheet(s) in the output HTML file. The stylesheet files must be accessible during processing. (default)z--embed-stylesheet� � store_true)�default�actionr z3Link to the stylesheet(s) in the output HTML file. z--link-stylesheet�embed_stylesheet�store_false)�destr z}Specify the initial header level. Does not affect document title & subtitle (see --no-doc-title).(default: writer dependent).z--initial-header-levelz1 2 3 4 5 6�2z<level>)�choicesr r zYFormat for footnote references: one of "superscript" or "brackets". (default: "brackets")z--footnote-references�superscript�bracketsz<format>�trim_footnote_reference_space)r# r r r zyFormat for block quote attributions: one of "dash" (em-dash prefix), "parentheses"/"parens", or "none". (default: "dash")z --attribution��dash�parentheses�parens�noner( zgRemove extra vertical whitespace between items of "simple" bullet lists and enumerated lists. (default)z--compact-listsTz3Disable compact simple bullet and enumerated lists.z--no-compact-lists� compact_listszORemove extra vertical whitespace between items of simple field lists. (default)z--compact-field-listsz#Disable compact simple field lists.z--no-compact-field-lists�compact_field_listsz�Added to standard table classes. Defined styles: borderless, booktabs, align-left, align-center, align-right, colwidths-auto, colwidths-grid.z --table-styler � zmMath output format (one of "MathML", "HTML", "MathJax", or "LaTeX") and option(s). (default: "HTML math.css")z --math-outputz HTML math.csszPrepend an XML declaration. z--xml-declarationFzOmit the XML declaration.z--no-xml-declaration�xml_declarationzyObfuscate email addresses to confuse harvesters while still keeping email links usable with standards-compliant browsers.z--cloak-email-addresses)r r �output_encoding_error_handler�xmlcharrefreplacezhtml base writer)r zhtml writers)�head_prefix�headr �body_prefix�body_pre_docinfo�docinfo�body�body_suffix�title�subtitle�header�footer�meta�fragment�html_prolog� html_head� html_title� html_subtitle� html_bodyc �` �� t � � � � � t j gz S �N)�super�get_transformsr �Admonitions)�self� __class__s ��{/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/docutils/writers/_html_base.pyrG zWriter.get_transforms� s$ �� ��w�w�%�%�'�'�:�+A�*B�B�B� c � � | � | j � � x| _ }| j � |� � | j D ]!}t | |t ||� � � � �"| � � � | _ d S rE ) �translator_class�document�visitor� walkabout�visitor_attributes�setattr�getattr�apply_template�output)rI rP �attrs rK � translatezWriter.translate� s| � �!%�!6�!6�t�}�!E�!E�E���w�� ����(�(�(��+� 8� 8�D��D�$���� 6� 6�7�7�7�7��)�)�+�+����rL c �� � t | j j j d�� � 5 }|� � � }d d d � � n# 1 swxY w Y | � � � }||z S )N�utf-8��encoding)�openrO �settings�template�read�interpolation_dict)rI �fpr_ �subss rK rU zWriter.apply_template� s� � � �$�-�(�1�G� D� D� D� !���w�w�y�y�H� !� !� !� !� !� !� !� !� !� !� !���� !� !� !� !��&�&�(�(���$��s �A�A� Ac �� � i }| j j }| j D ];}d� t | |� � � � � d� � ||<