• File: _diffcommand.cpython-37.opt-1.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib64/python3.7/site-packages/lxml/html/__pycache__/_diffcommand.cpython-37.opt-1.pyc
  • Date Modified: 04/24/2023 6:38 PM
  • File size: 2.15 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

MO]I@sddlmZddlZddlZddlZddlZddlmZdZej	dedZ
e
jdd	d
ddd
de
jdddddddddZddZ
edejejBZedejejBZddZddZdS) )absolute_importN)htmldiffzR%prog [OPTIONS] FILE1 FILE2
%prog --annotate [OPTIONS] INFO1 FILE1 INFO2 FILE2 ...)Zusagedescriptionz-oz--outputFILEoutput-zFile to write the difference to)metavardestdefaulthelpz-az--annotation
store_true
annotationzDo an annotation)actionrr
c	Cs|dkrtjdd}t|\}}|jr4t||St|dkrZtdtt	d|\}}t
|}t
|}t|d}t|\}}}	t||}
||
|	}
|j
dkr|
ds|
d7}
tj|
n"t|j
d}||
WdQRXdS)NrzError: you must give two filesr	
wb)sysargvparser
parse_argsrannotatelenprintZ
print_helpexit	read_file
split_bodyrrendswithstdoutwriteopen)argsoptionsZfile1Zfile2Zinput1Zinput2Zbody1preZbody2postresultfr(I/opt/alt/python37/lib64/python3.7/site-packages/lxml/html/_diffcommand.pymain s,




r*c	CsP|dkrtj}n8tj|s.td|nt|d}|}WdQRX|S)Nr	zInput file %s does not existrb)rstdinreadospathexistsOSErrorr!)filenamecr'r(r(r)r9srz	<body.*?>z
</body.*?>cCsnd}}t|}|r6|d|}||d}t|}|rd||d}|d|}|||fS)Nr)
body_start_researchendbody_end_restart)Zhtmlr$r%matchr(r(r)rIs

rcCstdtddS)NzNot yet implementedr)rrr)r#r"r(r(r)rUsr)N)Z
__future__rZoptparserrer.ZdiffrrZOptionParserrZ
add_optionr*rcompileISr4r7rrr(r(r(r)<module>s8