| Server IP : 104.21.37.246 / Your IP : 104.23.243.32 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/2388322/root/usr/lib64/python2.6/site-packages/meld3/ |
Upload File : |
from meld3 import parse_html
import sys
def main(srcfile, tgtfile):
srcroot = parse_html(srcfile)
tgtroot = parse_html(tgtfile)
changes = srcroot.diffmeld(tgtroot)
added = changes['unreduced']['added']
if added:
print 'Added: %s' % ', '.join([ x.meldid() for x in added])
removed = changes['unreduced']['removed']
if removed:
print 'Removed: %s' % ', '.join([ x.meldid() for x in removed])
moved = changes['reduced']['moved']
if moved:
print 'Moved: %s' % ', '.join([ x.meldid() for x in moved])
if __name__ == '__main__':
main(sys.argv[1], sys.argv[2])