I\'m looking for a way to produce HTML files from a git-diff output, preferably using python. I\'ve been looking at http://docs.python.org/library/difflib.html without being abl
I wrote a simple implementation for my maildiff
def getHtml(diffData):
""" This method convertes git diff data to html color code
"""
openTag = ""
nbsp = ' '
return ''.join([("%s%s%s%s%s
" % (openTag, '#ff0000' if line.startswith('-') else ('#007900' if line.startswith('+') else '#000000'), openTagEnd, nbsp*line.count('\t') ,line)) for line in diffData])
have a look at it.