관리-도구
편집 파일: _diffcommand.cpython-311.pyc
� \�DgI � �b � d dl mZ d dlZd dlZd dlZd dlZddlmZ dZ ej de�� � Z e � dd d ddd �� � e � ddddd�� � dd�Zd� Z ej dej ej z � � Z ej dej ej z � � Zd� Zd� ZdS )� )�absolute_importN� )�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 r c � � | �t j dd � } t � | � � \ }} |j rt || � � S t | � � dk r<t d� � t � � � t j d� � | \ }}t |� � }t |� � }t |� � d }t |� � \ }}} t ||� � } || z | z } |j dk r;| � d� � s| dz } t j � | � � d S t# |j d� � 5 }|� | � � d d d � � d S # 1 swxY w Y d S )Nr � zError: you must give two filesr � �wb)�sys�argv�parser� parse_argsr �annotate�len�print� print_help�exit� read_file� split_bodyr r �endswith�stdout�write�open)�args�options�file1�file2�input1�input2�body1�pre�body2�post�result�fs �x/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/lxml/html/_diffcommand.py�mainr3 s� � ��|��x����|���%�%�d�+�+�M�G�T��� '����&�&�&� �4�y�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�O�O� � � � � � � � � � � � ���� � � � � � s �E;�;E?�E?c �* � | dk rt j � � � }nmt j � | � � st d| z � � �t | d� � 5 }|� � � }d d d � � n# 1 swxY w Y |S )Nr zInput file %s does not exist�rb)r �stdin�read�os�path�exists�OSErrorr% )�filename�cr1 s r2 r r 9 s� � ��3����I�N�N����� �W�^�^�H� %� %� ��*�X�5�7� 7� 7� �(�D� !� !� �Q������A� � � � � � � � � � � ���� � � � ��Hs �'B�B�Bz <body.*?>z </body.*?>c �d � dx}}t � | � � }|r8| d |� � � � }| |� � � d � } t � | � � }|r8| |� � � d � }| d |� � � � } || |fS )Nr )� body_start_re�search�end�body_end_re�start)�htmlr- r/ �matchs r2 r! r! I s� � ��O�C�$�� � ��&�&�E�� "��<�E�I�I�K�K�<� ���E�I�I�K�K�L�L�!�����t�$�$�E�� $��E�K�K�M�M�N�N�#���N�U�[�[�]�]�N�#����d�?�� c �L � t d� � t j d� � d S )NzNot yet implementedr )r r r )r'