Hello,
Anyone knows of any tool that can generate a diff between two files and output HTML code that i could use in a page?
Doesn't need to be a Ruby tool, any Unix compatible tool would do the trick, I just need it to output HTML.
Hello,
Anyone knows of any tool that can generate a diff between two files and output HTML code that i could use in a page?
Doesn't need to be a Ruby tool, any Unix compatible tool would do the trick, I just need it to output HTML.
$ irb
`echo "testing 123\ntesting" > ./file1.txt`
=> ""
`echo "testing 123\nhey, something new\ntesting" > ./file2.txt`
=> ""
puts "<html><body><pre>\n#{`diff -cws file1.txt file2.txt`}\n</pre></body></html>"
<html><body><pre> *** file1.txt 2009-02-09 10:25:44.000000000 -0800 --- file2.txt 2009-02-09 10:28:31.000000000 -0800
I was looking for something that could turn the diff output into nice HTML, but thanks anyway.