]Nc@s ddkZddkZddkZddkZddklZdZeidddeZei ddd d d d d dddei ddddd dddddZ dZ ei deieiBZei deieiBZdZdZdS(iN(thtmldiffttusagesR%prog [OPTIONS] FILE1 FILE2 %prog --annotate [OPTIONS] INFO1 FILE1 INFO2 FILE2 ...t descriptions-os--outputtmetavartFILEtdesttoutputtdefaultt-thelpsFile to write the difference tos-as --annotationtactiont store_truet annotationsDo an annotationc CsS|djotid}nti|\}}|iot||St|djo dGHtiti dn|\}}t |}t |}t |d}t |\}}} t ||} || | } |i djo2| idp| d7} ntii| n*t|i d} | i| | idS(NiisError: you must give two filesR s twb(tNonetsystargvtparsert parse_argsR tannotatetlent print_helptexitt read_filet split_bodyRRtendswithtstdouttwritetopentclose( targstoptionstfile1tfile2tinput1tinput2tbody1tpretbody2tposttresulttf((s</usr/lib/python2.6/vendor-packages/lxml/html/_diffcommand.pytmains.       cCsp|djotii}nMtii|ptd|n&t|d}|i}|i|S(NR sInput file %s does not existtrb( RtstdintreadtostpathtexiststOSErrorRR(tfilenametcR*((s</usr/lib/python2.6/vendor-packages/lxml/html/_diffcommand.pyR8s   s s cCsti|}|o$||i }||i}nti|}|o$||i}||i }n|||fS(N(t body_start_retsearchtendt body_end_retstart(thtmltmatchR&R(((s</usr/lib/python2.6/vendor-packages/lxml/html/_diffcommand.pyRIscCsdGHtiddS(NsNot yet implementedi(RR(R R((s</usr/lib/python2.6/vendor-packages/lxml/html/_diffcommand.pyRTs(toptparseRtreR/tlxml.html.diffRRt OptionParserRt add_optionRR+RtcompiletItSR5R8RR(((s</usr/lib/python2.6/vendor-packages/lxml/html/_diffcommand.pyts6