$ 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
***************
*** 1,2 ****
--- 1,3 ----
  testing 123
+ hey, something new
  testing

</pre></body></html>
=> nil
>>

Jeff

On Feb 8, 12:08 pm, Maurício Linhares <[email protected]>
wrote:
> 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.
>
> -
> Maurício Linhareshttp://alinhavado.wordpress.com/(pt-br) 
> |http://blog.codevader.com/(en)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to