Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 from __future__ import print_function
00023 import argparse
00024 import os
00025 from xmldiff.xmldiff import compareFiles
00026
00027 if __name__ == '__main__':
00028 parser = argparse.ArgumentParser(
00029 description='Compares all the .xacro in two folders.')
00030 parser.add_argument('folder1')
00031 parser.add_argument('folder2')
00032 args = parser.parse_args()
00033 files1 = set([i for i in os.listdir(args.folder1)
00034 if i.endswith('.xacro')])
00035 files2 = set([i for i in os.listdir(args.folder2)
00036 if i.endswith('.xacro')])
00037 for i in files1.intersection(files2):
00038 diff = compareFiles(os.path.join(args.folder1, i),
00039 os.path.join(args.folder2, i))
00040 if diff:
00041 print('---------------------------------------------------------')
00042 print('File %s in common' % i)
00043 print('---------------------------------------------------------')
00044 print(diff)