#!/usr/bin/env python """ Confer - Compare N-Triples inputs using Pyrple Author: Sean B. Palmer, inamidst.com License: GPL 2; share and enjoy! Requirement: http://infomesh.net/pyrple/ """ import sys import pyrple def main(argv=None): if argv is None: argv = sys.argv fnp, fnq = tuple(argv[1:]) Gp = pyrple.Graph(uri=fnp) Gq = pyrple.Graph(uri=fnq) result = Gp == Gq print fnq.split('.')[0], ('FAIL', 'pass')[result] if not result and False: print Gp.serialize('ntriples') print '--' print Gq.serialize('ntriples') if __name__=="__main__": main()