← Back
Editing: __init__.cpython-311.pyc
� �M�c8G � � � d Z dZddlZddlZddlZddlmZmZ ddlm Z G d� de j � � Z G d� d e j � � ZdS ) z� Plain HyperText Markup Language document tree Writer. The output conforms to the `HTML 5` specification. The cascading style sheet "minimal.css" is required for proper viewing, the style sheet "plain.css" improves reading experience. �reStructuredText� N)�frontend�nodes)� _html_basec � � e Zd ZdZ ddgZd ej ej � e � � � � gZej � ej ej � e � � � � d� � Z ej ej j de � d�dge d d �fdd� e� � z d gddej ed�fdd� e� � z dgdej ed�fddgd� � � ddd�fddgddd�f� � � Zed!d"ej d#gd$ej d%�fej d&gd'dd�fd(d)gd*d+ifd,d-gd.d$d/�fd0d1gd2dd�fffz Zd3Zd4� Zd5S )6�Writer)�html5�xhtml�htmlzminimal.cssz plain.css�.ztemplate.txtz)Template file. (UTF-8 encoded, default: "z")z --templatez<file>)�default�metavarz�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: "%s")�,z--stylesheet-pathz<file[,file,...]>� stylesheet)r � overrides� validatorr z�Comma-separated list of directories where stylesheets are found. Used by --stylesheet-path when expanding relative path arguments. (default: "%s")z--stylesheet-dirsz<dir[,dir,...]>)r r r zySpecify the initial header level. Does not affect document title & subtitle (see --no-doc-title). (default: 2 for "<h2>")z--initial-header-levelz1 2 3 4 5 6�2z<level>)�choicesr r zOmit the XML declaration.z--no-xml-declaration�xml_declaration�store_false)�dest�action)�template�stylesheet_path�stylesheet_dirs�initial_header_level�no_xml_declarationzHTML5 Writer Options� z--embed-images� store_true)r r z --link-images�embed_imageszUSuggest at which point images should be loaded: "embed", "link" (default), or "lazy".z--image-loadingr )�embed�link�lazyz'Append a self-link to section headings.z--section-self-linkr )r r z8Do not append a self-link to section headings. (default)z--no-section-self-link�section_self_linkzhtml5 writerc �, � i | _ t | _ d S �N)�parts�HTMLTranslator�translator_class)�selfs �J/usr/lib/python3/dist-packages/docutils/writers/html5_polyglot/__init__.py�__init__zWriter.__init__n s � ��� � .����� N)�__name__� __module__�__qualname__� supported�default_stylesheets�docutils�_datadir�os�path�abspath�__file__�default_stylesheet_dirs�join�default_templater �filter_settings_specr r � settings_spec�validate_comma_separated_list�split� SUPPRESS_HELP�validate_boolean�config_sectionr, � r- r+ r r % sa � � � � � �*�I�'�(�+�6��"�$5�H�$5�b�g�o�o�h�6O�6O�$P�$P�Q���w�|�|����"�'�/�/�(�3�3�4�4�n�F� F�� 2�H�1���'�L�8H�L�L�L� �N�(�X�>�>�@� � !$���)<� =� =� >� !�!�+�,�"�@�+� -� -� .� )�+.�8�8�4K�+L�+L� M� !�!�)�"�@�/� 1� 1�2� M� %�&�%�+�+�-�-�#�!� #� #� $� (� #�$�&�-�@�@�B�="� "� "�M�F "�� � � �� �!� �1�3� 3� 4� � �� �!�]� ;� ;� =�2�� ��/� � � 4� � !��<� 0� 0� 2� E�#� $�&�-� @� @� B�! �% � �M�2 $�N�/� /� /� /� /r- r c �" � � e Zd ZdZdZd� Zd� Zd� Zd� Zd� Z d� Z d d hZd� Zd� Z d � Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� ZdZ� fd�Zd� Zh d�Zd� Zd� Zd� Z d � Z!d!� Z"d"� Z#d#� Z$d$� Z%d%� Z&d&� Z'd'� Z(d(� Z)d)� Z*d*� Z+d+� Z,d,� Z-� fd-�Z.� xZ/S ).r( a> This writer generates `polyglot markup`: HTML5 that is also valid XML. Safe subclassing: when overriding, treat ``visit_*`` and ``depart_*`` methods as a unit to prevent breaks due to internal changes. See the docstring of docutils.writers._html_base.HTMLTranslator for details and examples. zG<meta name="viewport" content="width=device-width, initial-scale=1" /> c �d � | j � | � |dd� � � � d S )N�abbrr )�body�append�starttag�r* �nodes r+ � visit_acronymzHTMLTranslator.visit_acronym� s. � �� ������t�V�R�8�8�9�9�9�9�9r- c �: � | j � d� � d S )Nz</abbr>�rG rH rJ s r+ �depart_acronymzHTMLTranslator.depart_acronym� s � �� ����#�#�#�#�#r- c � � | � |dd�� � |D ]?}| � d| � |� � � � � z � � �@d S )N�authorsF��metaz$<meta name="author" content="%s" /> ��visit_docinfo_item�add_meta�attval�astext)r* rK �subnodes r+ � visit_authorszHTMLTranslator.visit_authors� sr � �����i�e��<�<�<�� 9� 9�G��M�M�A��+�+�g�n�n�&6�&6�7�7�8� 9� 9� 9� 9� 9� 9r- c �. � | � � � d S r&