7

For working with text that is prose, stored in plain text, I really like the output of git diff --color-words, but I don't like the way it is dependent on ANSI terminal escape sequences. I'd like to get output that I can use to turn into HTML, some kind of user-friendly raw character display, or to generate statistics on the differences between the two files.

I prefer Perl (including CPAN), but would settle for pretty much anything.

brian d foy
  • 129,424
  • 31
  • 207
  • 592
singingfish
  • 3,136
  • 22
  • 25

1 Answers1

9

This question asks about converting ANSI escape sequences into HTML color directives, and the accepted answer is a link to the Perl module HTML::FromANSI, in CPAN.

Community
  • 1
  • 1
caf
  • 233,326
  • 40
  • 323
  • 462
  • this seems like a bit of a dirty hack, but it'll do if git, perl and the distributed lib are requirements for my end users – singingfish Sep 15 '09 at 09:35