HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //usr/local/lib64/python3.8/site-packages/lxml/html/__pycache__/_diffcommand.cpython-38.pyc
U

O��i!�@s�ddlZddlZddlZddlZddlmZdZejded�Zej	ddd	d
ddd
�ej	dddddd�ddd�Z
dd�Ze�dej
ejB�Ze�dej
ejB�Zdd�Zdd�ZdS)�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)�actionrr
c	Cs�|dkrtjdd�}t�|�\}}|jr4t||�St|�dkrZtd�t��t�	d�|\}}t
|�}t
|�}t|�d}t|�\}}}	t||�}
||
|	}
|j
dkr�|
�d�s�|
d7}
tj�|
�n"t|j
d��}|�|
�W5QRXdS)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�file2Zinput1Zinput2Zbody1�preZbody2�post�result�f�r+�8/tmp/pip-install-gdmoqxf6/lxml/lxml/html/_diffcommand.py�mains,




r-c	CsP|dkrtj��}n8tj�|�s.td|��nt|d��}|��}W5QRX|S)Nr	zInput file %s does not exist�rb)r�stdin�read�os�path�exists�OSErrorr")�filename�cr*r+r+r,r7s�rz	<body.*?>z
</body.*?>cCsnd}}t�|�}|r6|d|���}||��d�}t�|�}|rd||��d�}|d|���}|||fS)Nr)�
body_start_re�search�end�body_end_re�start)�htmlr'r(�matchr+r+r,rGs

rcCstd�t�d�dS)NzNot yet implementedr)rrr)r$r#r+r+r,rSsr)N)�optparser�rer1Zdiffrr�OptionParserr�
add_optionr-r�compile�I�Sr7r:rrr+r+r+r,�<module>sH���

�
�