
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
3
'YW                 @   s   d dl mZ d dlZd dlZd dlZd dlZddlmZ dZej	dedZ
e
jdd	d
dddd e
jdddddd dddZdd ZejdejejB ZejdejejB Zdd Zdd ZdS )     )absolute_importN   )htmldiff zR%prog [OPTIONS] FILE1 FILE2
%prog --annotate [OPTIONS] INFO1 FILE1 INFO2 FILE2 ...)Zusagedescriptionz-oz--outputFILEoutput-zFile to write the difference to)metavardestdefaulthelpz-az--annotation
store_true
annotationzDo an annotation)actionr   r   c             C   s   | d krt jdd  } tj| \}} |jr4t|| S t| dkrZtd tj  t j	d | \}}t
|}t
|}t|d }t|\}}}	t||}
||
 |	 }
|jdkr|
jds|
d7 }
t jj|
 nt|jd}|j|
 |j  d S )Nr      zError: you must give two filesr	   
wb)sysargvparser
parse_argsr   annotatelenprintZ
print_helpexit	read_file
split_bodyr   r   endswithstdoutwriteopenclose)argsoptionsZfile1Zfile2Zinput1Zinput2Zbody1preZbody2postresultf r)   $/usr/lib64/python3.6/_diffcommand.pymain    s.    





r+   c             C   sL   | dkrt jj }n4tjj| s.td|  nt| d}|j }|j  |S )Nr	   zInput file %s does not existrb)	r   stdinreadospathexistsOSErrorr!   r"   )filenamecr(   r)   r)   r*   r   :   s    
r   z	<body.*?>z
</body.*?>c             C   sn   d }}t j| }|r6| d |j  }| |j d  } tj| }|rd| |j d  }| d |j  } || |fS )Nr   )body_start_researchendbody_end_restart)Zhtmlr%   r&   matchr)   r)   r*   r   K   s    

r   c             C   s   t d tjd d S )NzNot yet implementedr   )r   r   r   )r$   r#   r)   r)   r*   r   W   s    r   )N)Z
__future__r   Zoptparser   rer/   Zdiffr   r   ZOptionParserr   Z
add_optionr+   r   compileISr5   r8   r   r   r)   r)   r)   r*   <module>   s8   
