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 Linhares http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
$ 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 <mauricio.linha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I was looking for something that could turn the diff output into nice HTML, but thanks anyway. - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Mon, Feb 9, 2009 at 3:37 PM, Jeff Lewis <jeff.burly-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > $ 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 <mauricio.linha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---