Viewing File: /opt/hc_python/lib/python3.12/site-packages/lxml/html/__pycache__/_diffcommand.cpython-312.pyc

�

_��g!��x�ddlZddlZddlZddlZddlmZdZejde��Zejddd	d
dd�
�ejddddd��dd�Z
d�Zejdejejz�Zejdejejz�Zd�Zd�Zy)�N�)�htmldiff�zR%prog [OPTIONS] FILE1 FILE2
%prog --annotate [OPTIONS] INFO1 FILE1 INFO2 FILE2 ...)�usage�descriptionz-oz--output�FILE�output�-zFile to write the difference to)�metavar�dest�default�helpz-az--annotation�
store_true�
annotationzDo an annotation)�actionrrc��|�tjdd}tj|�\}}|jrt||�St
|�dk7r4td�tj�tjd�|\}}t|�}t|�}t|�d}t|�\}}}	t||�}
||
z|	z}
|jdk(r6|
jd�s|
dz
}
tjj!|
�yt#|jd�5}|j!|
�ddd�y#1swYyxYw)Nr�zError: you must give two filesr
�
�wb)�sys�argv�parser�
parse_argsr�annotate�len�print�
print_help�exit�	read_file�
split_bodyrr	�endswith�stdout�write�open)�args�options�file1�file2�input1�input2�body1�pre�body2�post�result�fs            �G/opt/hc_python/lib64/python3.12/site-packages/lxml/html/_diffcommand.py�mainr2s���|��x�x���|���%�%�d�+�M�G�T�������&�&�
�4�y�A�~�
�.�/�����������L�E�5�
�u�
�F�
�u�
�F��v��q�!�E�!�&�)��C���
�e�U�
#�F�
�6�\�D�
 �F��~�~������t�$��d�N�F��
�
���� �
�'�.�.�$�
'�1�
�G�G�F�O�(�
'�
'�s�/E
�
Ec��|dk(r tjj�}|Stjj|�st
d|z��t|d�5}|j�}ddd�|S#1swYSxYw)Nr
zInput file %s does not exist�rb)r�stdin�read�os�path�exists�OSErrorr$)�filename�cr0s   r1rr7su���3���I�I�N�N���
�H�
�W�W�^�^�H�
%��*�X�5�7�	7��(�D�
!�Q�����A�"��H�"��H�s�A:�:Bz	<body.*?>z
</body.*?>c��dx}}tj|�}|r&|d|j�}||j�d}tj|�}|r&||j	�d}|d|j	�}|||fS)Nr)�
body_start_re�search�end�body_end_re�start)�htmlr,r.�matchs    r1r r Gs����O�C�$�� � ��&�E���<�E�I�I�K� ���E�I�I�K�L�!�����t�$�E���E�K�K�M�N�#���N�U�[�[�]�#����d�?��c�D�td�tjd�y)NzNot yet implementedr)rrr)r&r%s  r1rrSs��	�
� ��H�H�Q�KrE)N)�optparser�rer7�diffrr�OptionParserr�
add_optionr2r�compile�I�Sr>rAr r�rEr1�<module>rPs����
�	�	����
��	�	�=��
������*��	��	*�������.��	�	�	���2	
���
�
��"�$�$�r�t�t�)��
��b�j�j��2�4�4����9���
�rE
Back to Directory File Manager