ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/guppy/gsl/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/guppy/gsl/__pycache__/Html.cpython-311.pyc

�

�܋f�E��:�Gd�d��ZGd�d��ZdS)c�D�eZdZd5d�Zd�Zd6d�Zd�Zd�Zd�Zd	�Z	d
�Z
d�Zd�Zd6d
�Z
d�Zd7d�Zd7d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�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-d.�Z.d/�Z/d0�Z0d1�Z1d2�Z2d3�Z3d4�Z4dS)8�	Node2HtmlNc���||_d|_|jj|_|�|jj}||_|�||_d|_g|_d|_d|_|�	g��d}|j�
|j�dd|j�dd��|j�d	d
|z��f����|�|�|��dSdS)NF��zutf-8�meta�zhttp-equiv=zContent-Type�content=ztext/html; charset=%s)
�mod�valid_html40�encode�encode_name�error_report�
document_lang�header_nodes�indent�
indentstep�set_out�append�node_of_taci�accept)�selfr
�noderr
�charsets      �a/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/guppy/gsl/Html.py�__init__zNode2Html.__init__s�����!����h�o������(�.�K�&����#� ,�D��!���������������R�������� � ���!6�!6��B���%�%�m�^�D�D���%�%�j�&=��&G�I�I�J�"K�"K�	L�	L�	L����K�K���������c��|���\}}|jj}|jD]#}	|�|���#|$rY� wxYwdS�N)�split_attrsr
�
ReportedError�childrenr)rr�attrs�E�chs     r�_visit_childrenzNode2Html._visit_children"sr���&�&�(�(���e��H�"���-�	�	�B�
��	�	�$�������
�
�
���
����	�	s�A�A�Arc��|r
d|�d|�d�}nd|z}||jjvrd|jdzz|z}|�|��|xj|jz
c_dS)N�<� �>z<%s>�
)r
�line_break_allowedrrr)r�tag�arg�ts    r�beginzNode2Html.begin,sw���	�	� �S�S�#�#�#�&�A�A����A��$�(�-�-�-��T�[�3�&�&��*�A����A�������t��&����rc�>�|j}|�|��|Sr)�outr)rr1�oos   r�chg_outzNode2Html.chg_out6s ��
�X�����S�����	rc��|�|jj��r"|t|jj��d�}nJ�|�|��}|Sr)�
startswithr
�
tgt_prefix�lenr
)r�names  r�encode_link_namezNode2Html.encode_link_name;s[���?�?�4�8�.�/�/�	���D�H�/�0�0�1�1�2�D�D�
�1�����%�%���rc�`�|xj|jzc_|�d|z��dS)Nz</%s>)rrr)rr,s  r�endz
Node2Html.endGs0�����t��&������G�c�M�"�"�"�"�"rc�2�d|z}|j|g|�Ri|��dS)Nz
Doc2Html: )r�r�msg�args�kwdss    r�errorzNode2Html.errorKs5���S� �����#�-��-�-�-��-�-�-�-�-rc�8�td|d|d|��t�)NzHTML ENCODING ERROR: zargs=zkwds=)�print�
ValueErrorr=s    rrzNode2Html.error_reportOs!��
�%�s�G�T�7�D�I�I�I��rc�d�|�d��|�dd|�|��z��|�d��|D]}|�|���|�d��|�d��|�d��dS)Nzb<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
   "http://www.w3.org/TR/REC-html40/strict.dtd">
�htmlzlang=%s�head�body�div)rr/�get_encoded_text�gen_stdhtmlr;)r�langrrs    r�gen_document_headerzNode2Html.gen_document_headerSs���	
����	�	�	�
	
�
�
�6�9�t�'<�'<�T�'B�'B�B�C�C�C��
�
�6���� �	#�	#�D����T�"�"�"�"���������
�
�6����
	
�
�
�5�����rc��|�d��|�d��|�d��dS)NrIrHrF)r;�rs r�gen_document_trailerzNode2Html.gen_document_traileris;������������������������rc�\�|�||��|xj|jzc_dSr)r/rr)rr,r-s   r�gen_empty_elmtzNode2Html.gen_empty_elmtns,���
�
�3��������t��&����rc�|�|�d��|�d��|�dd��|�d��|�d��|�d|jj�|jj�����z��dS)N�hrz
Generated by �az5href="https://zhuyifei1999.github.io/guppy3/gsl.html"zGSL-HTML 3.0.1z on )rRrr/r;r
�time�asctime�	localtimerOs r�gen_generated_from_gslz Node2Html.gen_generated_from_gslrs������D�!�!�!����O�$�$�$��
�
�3�O�P�P�P����$�%�%�%�����
�
�
����F�4�8�=�0�0����1H�1H�1J�1J�K�K�K�L�L�L�L�Lrc��|jj}|�|j}|j�|dd|d|��|d|j|j��g����dS)Nrrzname=r	)r
rr,rrr-r!)rrr,�mknodes    r�gen_metazNode2Html.gen_meta|s�����&���;��(�C��� � ��F�6�2��F�7�C�(�(��F�:�t�x���?�?�A�
B�
B�	C�	C�	C�	C�	Crc��|�|j}|�|��\}}|�|d�d�|D������||jjvrP|jr|�d|jz��|�|��|xj	|j
zc_	dS|�|��|�|��dS)Nr(c�"�g|]\}}|�d|����
S)�=�)�.0�key�vals   r�
<listcomp>z)Node2Html.gen_stdhtml.<locals>.<listcomp>�s7��";�";�";�&0�s�C�.1�S�S�#�#�"6�";�";�";rz*No enclosed text allowed for Html tag: %r.)
r,rr/�joinr
�_no_end_tag_elementsr-rA�no_childrenrr�
arg_acceptr;)rrr,�optionsr"s     rrKzNode2Html.gen_stdhtml�s����;��(�C��&�&�s�+�+���e��
�
�3����";�";�49�";�";�";�<�<�	=�	=�	=��$�(�/�/�/��x�
M��
�
�@�4�8�K�M�M�M����T�"�"�"��K�K�4�?�*�K�K�K�K��O�O�D�!�!�!��H�H�S�M�M�M�M�Mrc�d�|�g��}|�|�|j����|jD]?}|jdvr|�|���!|�d|jz|���@d�|�|����S)N)�text�charz(Only text and char allowed here, not %r.r)	r3rrr-r!r,rrAre)rr�old_outr$s    rrJzNode2Html.get_encoded_text�s����,�,�r�"�"�����D�K�K���)�)�*�*�*��-�	'�	'�B��v�)�)�)��	�	�$������
�
�E��6�"�#%�'�'�'�'��w�w�t�|�|�G�,�,�-�-�-rc�6�d�|j��S)Nr)rer1rOs r�get_htmlzNode2Html.get_html�s���w�w�t�x� � � rc�d�|jr(|�d|j�d|j�d���dSdS)NzNo children allowed for z. Got children nodes = �.)r!rAr,�rrs  rrgzNode2Html.no_children�sN���=�	*��J�J�J�����$�-�-�-�)�
*�
*�
*�
*�
*�	*�	*rc�D�||_|j|_|j|_dSr)r1�extendr)rr1s  rrzNode2Html.set_out�s������j����j����rc�0�|�|��dSr)r\rrs  r�visit_authorzNode2Html.visit_author�s���
�
�d�����rc�0�|�|��dSr�r%rrs  r�visit_blockzNode2Html.visit_block�������T�"�"�"�"�"rc���|���}||jjvrd|z}n�|dd�dkrt|dd�d��}n=|���rt|��}n|�d|z|��|jj�|��}|�d|z}nd|z}|�|��|�	|��dS)Nz&%s;��0x�zNo such character: %r.z&#%d;)
�get_nameargr
�name2codepoint�int�isdigitrA�codepoint2name�getrr%)rrr8rls    r�
visit_charzNode2Html.visit_char�s������!�!���4�8�*�*�*��D�=�D�D��B�Q�B�x�4����4����8�R�(�(��������
B��4�y�y����
�
�3�d�:�D�A�A�A��8�*�.�.�t�4�4�D��|���~�����}�����D�������T�"�"�"�"�"rc�@�|�d|jz��dS)Nz<col width="%s" />)rr-rrs  r�visit_col_widthzNode2Html.visit_col_width�s"�����(�4�8�3�4�4�4�4�4rc��dSrr`rrs  r�
visit_commentzNode2Html.visit_comment�s���rc���|j|jjvrF|j|jjvr|j�|��dS|�|��dS|�d|jz|��dS)Nz-I don't know what to generate for the tag %r.)r,r
�stdhtml�_head_elements�
head_nodesrrKrArrs  r�
visit_defaultzNode2Html.visit_default�s����8�t�x�'�'�'��x�4�8�2�2�2���&�&�t�,�,�,�,�,�� � ��&�&�&�&�&��J�J�G��x� �!%�
'�
'�
'�
'�
'rc��|�|j��}|�dd|z��|�|��|�d��dS)NrUzname=%r)r9r-r/r%r;�rrr8s   r�visit_definezNode2Html.visit_define�sW���$�$�T�X�.�.���
�
�3�	�D�(�)�)�)����T�"�"�"�����
�
�
�
�
rc��d|_|�g��}|�|��|���|�|��}|jj}|j}|s|dd��}d|_|�||j��|j	�
|��|���dS)Nr|r�enr)rr3r%rYr
rrrMrr1rtrP)rr�oldout�newoutr[rLs      r�visit_documentzNode2Html.visit_document�s���������b�!�!�����T�"�"�"��#�#�%�%�%����f�%�%����&���!���	1��6�/�4�0�0�D����� � ��t�'8�9�9�9����������!�!�#�#�#�#�#rc�N�|j�|�d|��||_dS)Nz"Duplicate document lang directive.)rrArrs  r�visit_document_langzNode2Html.visit_document_lang�s.����)��J�J�;�T�B�B�B�!����rc�v�|j�|j�d|j����dS)N�title)rrr
rr-rrs  r�visit_document_titlezNode2Html.visit_document_title�s3���� � ���!6�!6�w���!I�!I�J�J�J�J�Jrc���|�d��|jD]A}|�d��|�|��|�d���B|�d��dS)N�ol�li�r/r!rr;�rr�cs   r�visit_enumeratezNode2Html.visit_enumerate��j���
�
�4������	�	�A��J�J�t����
�H�H�T�N�N�N��H�H�T�N�N�N�N���������rc��i|_|jD]:}d�|j�d��D��}|D]}|j|j|<��;dS)Nc�6�g|]}|�����Sr`)�strip)ra�xs  rrdz*Node2Html.visit_exdefs.<locals>.<listcomp>s ��9�9�9�!�A�G�G�I�I�9�9�9r�,)�symplacer!r-�splitr,)rrr$�syms�syms     r�visit_exdefszNode2Html.visit_exdefssj����
��-�	,�	,�B�9�9�r�v�|�|�C�'8�'8�9�9�9�D��
,�
,��%'�V��
�c�"�"�
,�	,�	,rc�0�|�|��dSrrxrrs  r�
visit_filezNode2Html.visit_filerzrc�D�|j�|j��dSr)rrtr!rrs  r�visit_headerzNode2Html.visit_header
s!���� � ���/�/�/�/�/rc���|�d��|jD]A}|�d��|�|��|�d���B|�d��dS)N�ulr�r�r�s   r�
visit_itemizezNode2Html.visit_itemize
r�rc�p�|j}|jdj}|jdd�}|�d|�|����}|�dd|z��|s)|�|�|����n|D]}|�|���|�d��dS)Nrrz.html#rU�href=%r)r-r!r9r/rrrr;)rrr8�docnamer!�urir$s       r�visit_link_to_externzNode2Html.visit_link_to_externs����x���-��"�&���=����$��%�g�g�t�'<�'<�T�'B�'B�'B�C���
�
�3�	�C��(�(�(��	 ��K�K����D�)�)�*�*�*�*��
 �
 ���	�	�$���������
�
�
�
�
rc�*�|j}d|�|��z}|�dd|z��|js)|�|�|����n|�|��|�d��dS)Nz#%srUr�)r-r9r/r!rrr%r;)rrr8r�s    r�visit_link_to_localzNode2Html.visit_link_to_local"s����x���d�+�+�D�1�1�1���
�
�3�	�C��(�(�(��}�	'��K�K����D�)�)�*�*�*�*�� � ��&�&�&�����
�
�
�
�
rc���|j}|�d��|js)|�|�|����n|�|��|�d��dS)N�em)r-r/r!rrr%r;r�s   r�visit_link_to_unresolvedz"Node2Html.visit_link_to_unresolved,sm���x���
�
�4�����}�	'��K�K����D�)�)�*�*�*�*�� � ��&�&�&���������rc�2�|�|d��dS)N�pre)rKrrs  r�visit_literal_blockzNode2Html.visit_literal_block5s������u�%�%�%�%�%rc�0�|�|��dSrrxrrs  r�visit_man_page_modezNode2Html.visit_man_page_mode8rzrc�:�|j�|��dSr)�document_metasrrrs  r�
visit_metazNode2Html.visit_meta;s����"�"�4�(�(�(�(�(rc�0�|�d��dS)Nz<code>:</code>&nbsp;�rrrs  r�visit_spc_colonkindzNode2Html.visit_spc_colonkind>s��	
���*�+�+�+�+�+rc�0�|�d��dS)Nz <strong>-></strong> r�rrs  r�visit_spc_mapstozNode2Html.visit_spc_mapstoCs�����+�,�,�,�,�,rc�0�|�|��dSrrxrrs  r�visit_stringzNode2Html.visit_stringFrzrc�0�|�|��dSr)�
visit_textrrs  r�visit_symbolzNode2Html.visit_symbolIs����������rc���|�|j��}t|��dksd|vr|�d��|�|��|�|��dS)N�Pr*)rr-r7rr%�rrrks   rr�zNode2Html.visit_textLsj���{�{�4�8�$�$���t�9�9�r�>�>�T�T�\�\��K�K��������D�������T�"�"�"�"�"rc�0�|�|��dSrrxrrs  r�visit_to_document_onlyz Node2Html.visit_to_document_onlySrzrc�0�|�|��dSrrxrrs  r�visit_to_html_onlyzNode2Html.visit_to_html_onlyVrzrc��dSrr`rrs  r�visit_to_tester_onlyzNode2Html.visit_to_tester_onlyY����rc��||_|j�d���\}}|�d|�dd��z��dS)NT)�attrdictz�    <a href="http://validator.w3.org/check?uri=referer"><img
        src="%s"
        alt="Valid HTML 4.0 Strict" height="31" width="88"></a>
�srcz$http://www.w3.org/Icons/valid-html40)rrrr�)rrr"s   r�visit_valid_html40zNode2Html.visit_valid_html40\sl�� ����'�3�3�T�3�B�B���e�	
�����i�i��=�>�>�	?�	@�	@�	@�	@�	@rc��dSrr`rrs  r�
visit_withzNode2Html.visit_withhr�rc�0�|�|��dSrrxrrs  r�
visit_wordzNode2Html.visit_wordkrzr)NNN)rr)5�__name__�
__module__�__qualname__rr%r/r3r9r;rArrMrPrRrYr\rKrJrorgrrvryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r`rrrrs)����������@���'�'�'�'����

�
�
�#�#�#�.�.�.�������,���
'�'�'�'�M�M�M�C�C�C�C����� 
.�
.�
.�!�!�!�*�*�*�
!�!�!�
���#�#�#�#�#�#�&5�5�5����'�'�'����$�$�$�$"�"�"�
K�K�K����,�,�,�#�#�#�0�0�0�������������&�&�&�#�#�#�)�)�)�,�,�,�
-�-�-�#�#�#����#�#�#�#�#�#�#�#�#�
�
�
�
@�
@�
@�
�
�
�#�#�#�#�#rrc��eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
e
zdzZdZ
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS)�_GLUECLAMP_)	z_parent:SpecNodesz_parent.SpecNodes:node_of_taciz_parent.Gsml:is_not_asciiz_parent.Main:tgt_prefixz_parent.Main:ReportedErrorz"_root.html.entities:name2codepointz"_root.html.entities:codepoint2namez_root:rez
_root:time)�tag_uppercase_name_charsr)7rU�address�area�b�base�big�
blockquoterH�br�caption�center�cite�code�dfn�dt�dl�ddrIr��form�h1�h2�h3�h4�h5�h6rTrF�i�img�input�kbdr�r��option�p�paramr��samp�select�small�strong�style�sub�sup�table�td�textarea�th�theadr��tr�ttr��var)�applet�basefont�dir�font�isindex�strike�u)�script)�abbr�acronym�bdo�button�col�colgroup�del�fieldset�frame�frameset�iframe�ins�label�legend�noframes�noscript�object�optgroup�q�s�span�tbody�tfootr)r�r�linkrrr
r�)rr4r)rFrGrHr&)-r�r�r�r#rIr�r�r�r�r�r�rTr(rr,rr�rr�r�r�r��menur�r�r
r�r"r!rr3r2rrrr�r r$r*rr)rr.rr)r8z
http-equiv�content�schemerLrc�@�|j�d��jS)Nz[A-Za-z]��re�compile�matchrOs r�_get_is_name_starter_charz%_GLUECLAMP_._get_is_name_starter_char�s���w���{�+�+�1�1rc�@�|j�d��jS)Nz[A-Za-z0-9\-_:\.]r9rOs r�_get_is_name_follower_charz&_GLUECLAMP_._get_is_name_follower_char�s���w���3�4�4�:�:rc�H�i}|j|jz|jzD]}d||<�|S�Nr)�_html3_2�_html4_0_deprecated�_html4_0�r�shr�s   r�_get_stdhtmlz_GLUECLAMP_._get_stdhtml�s7��
�����!9�9�D�M�I�	�	�A��B�q�E�E��	rc�(�i}|jD]}d||<�|SrA)�_line_break_allowedrEs   r�_get_line_break_allowedz#_GLUECLAMP_._get_line_break_allowed�s)��
���)�	�	�A��B�q�E�E��	rc���|�||��}|j�|d|z��}|�d||�d|��g��}|S)Nz%s.html�
write_filerk)�doc2text�pathrer)	r�docrr8r�opts�IOrkrNs	         r�	doc2filerz_GLUECLAMP_.doc2filer�sh���}�}�S�$�'�'���w�|�|�C��T�!1�2�2��� � ��t�!%�!2�!2�6�4�!@�!@�6B�C�C���rc�`�t|||jj��}|���Sr)r�envrAro)rrOr�d2hs    rrMz_GLUECLAMP_.doc2text�s%����d�C�G�M�2�2���|�|�~�~�rc��|�|��}t|d��5}|�|��ddd��dS#1swxYwYdS)N�w)�	node2text�open�write)rr�filerk�fs     r�	node2filez_GLUECLAMP_.node2file�s����~�~�d�#�#��
�$��_�_�	��
�G�G�D�M�M�M�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�A	�	A
�A
c�J�t||�����}|Sr)rror�s   rrXz_GLUECLAMP_.node2text�s"����t�$�$�-�-�/�/���rc���|�dd��}|�dd��}|�dd��}|�dd��}|�d	d
��}|S)z-Encode special characters in `text` & return.�&z&amp;r'z&lt;�"z&quot;r)z&gt;�@z&#64;)�replace)rrks  rrz_GLUECLAMP_.encodesh���|�|�C��)�)���|�|�C��(�(���|�|�C��*�*���|�|�C��(�(���|�|�C��)�)���rc�F�|j}g}|j}d}|dd�}|dks|�|��s|d��|dkr|d��|D]�}|dks||��sG|r
|d��d}|d��|dkr|dt|��z��|d���Z|���r"|jr|s
|d��d}||����|r
|d��d}||����|r|d��d�|��S)Nrr�z�-z%dr)�is_name_follower_charr�is_name_starter_char�ord�isupperr�re)rr8rg�nsr�
upperstater$s       rr
z_GLUECLAMP_.encode_namesy�� $� :��
������
�
�"�1�"�X��
��9�9�D�5�5�b�9�9�9��F�3�K�K�K��S�y�y���s�����	�	�B��S�y�y� 5� 5�b� 9� 9�y��#��F�3�K�K�K�!"�J���s������9�9��F�4�#�b�'�'�>�*�*�*���s����������	
�$�"?�	
�!�#��F�3�K�K�K�!"�J���r�
�
�
�
��#��F�3�K�K�K�!"�J���r�
�
�
�
��	��F�3�K�K�K��w�w�r�{�{�rN)r�r�r��	_imports_�	_chgable_r�rBrC�_html_avoidrDr�rfrI�meta_attributesr=r?rGrJrRrMr]rXrr
r`rrr�r�os������
�I�.�I� !���H�"���K�#�H��N����	�����"0�O�2�2�2�;�;�;����������������
������" � � � � rr�N)rr�r`rr�<module>rqsr��k#�k#�k#�k#�k#�k#�k#�k#�\D�D�D�D�D�D�D�D�D�Dr

Zerion Mini Shell 1.0