def daisydiff(before, after):
    with tempfile.NamedTemporaryFile() as f_a:
        with tempfile.NamedTemporaryFile() as f_b:
            with tempfile.NamedTemporaryFile() as f_out:
                f_a.write(before.encode('utf-8'))
                f_b.write(after.encode('utf-8'))

                f_a.flush()
                f_b.flush()

                proc = subprocess.Popen(stdout=subprocess.PIPE, args=[
                    'java',
                    '-jar',
                    settings.DAISYDIFF_JAR_PATH,
                    f_b.name,
                    f_a.name,
                    '--file=' + f_out.name,
                ])
                proc.communicate()
                retcode = proc.poll()
                if retcode:
                    assert False, "Daisydiff returned %s" % retcode

                diff_html = f_out.read().decode('utf-8')

                # remove the daisydiff chrome so we can add our own
                parsed = BeautifulSoup(diff_html)
                body = parsed.find('body')
                for i in body.find_all(recursive=False)[:6]:
                    i.extract()
                return force_text(body)
Given two strings of html documents in a and b, return a string containing
dataset/ETHPy150Open fusionbox/django-widgy/widgy/views/versioning.py/daisydiff