Hi all, has anyone seen/used a post filter that prettyprints the output? Like running it though Tidy to get consistent indentation and perhaps wrap at a certain column. I use quite a lot of partials and the indentation does get pretty messed up. :-) Many thanks in advance! Nicky
I normally don''t care how the output gets printed out to the browser. As long as your source is clean, who cares what the output looks like. I say save yourself the extra overhead of running tidy on your output and just leave it as it is. On 4/24/05, Nickolay Kolev <nmkolev-OhoefBWHl6Eb1SvskN2V4Q@public.gmane.org> wrote:> > Hi all, > > has anyone seen/used a post filter that prettyprints the output? Like > running it though Tidy to get consistent indentation and perhaps wrap > at a certain column. > > I use quite a lot of partials and the indentation does get pretty > messed up. :-) > > Many thanks in advance! > > Nicky > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- - Ramin http://www.getintothis.com/blog _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 4/25/05, Ramin <i8ramin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 4/24/05, Nickolay Kolev <nmkolev-OhoefBWHl6Eb1SvskN2V4Q@public.gmane.org> wrote: > > Hi all, > > > > has anyone seen/used a post filter that prettyprints the output? Like > > running it though Tidy to get consistent indentation and perhaps wrap > > at a certain column. > > > > I use quite a lot of partials and the indentation does get pretty > > messed up. :-) > > > > Many thanks in advance! > > > > Nicky > > > I normally don''t care how the output gets printed out to the browser. As > long as your source is clean, who cares what the output looks like. I say > save yourself the extra overhead of running tidy on your output and just > leave it as it is. >Well, it''s a little easier to debug html/css problems if the source looks neat. I''d be interested in hearing a solution to this problem. Joe
On 4/25/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Well, it''s a little easier to debug html/css problems if the source > looks neat. I''d be interested in hearing a solution to this problem.If it really bothers you, save the outputted HTML and only run tidy on the static .html file when you''re trying to debug it. Personally I think it''s a lot of extra overhead for zero benefit. I just make sure that the .rhtml files are pretty clean, though the output isn''t perfect as, eg, textalized stuff comes out pretty messy. -- Urban Artography http://artography.ath.cx
On 4/25/05, Rob Park <rbpark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 4/25/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Well, it''s a little easier to debug html/css problems if the source > > looks neat. I''d be interested in hearing a solution to this problem. > > If it really bothers you, save the outputted HTML and only run tidy on > the static .html file when you''re trying to debug it. Personally I > think it''s a lot of extra overhead for zero benefit. > > I just make sure that the .rhtml files are pretty clean, though the > output isn''t perfect as, eg, textalized stuff comes out pretty messy.I agree... I''ve done some tweaks and such to try to make my output a little cleaner looking, but never worried that much about actually making sure its nicely indented in the final product. Just use -%> where appropriate and you get most of the way there. If you''re just doing it to debug HTML/CSS you might want to check out the DOM Inspector in Firefox. I''ve found it quite useful for that purpose and it doesn''t matter what the HTML looks like. Cheers, bs.
Debugging HTML/CSS is exactly what I wanted to do. I had in mind only using the filter in the development environment where the overhead would not be so dramatic. In production the filter would be switched off. I have not found anything similar, so I will try to write it myself. The Ruby-Tidy interface does not look too hard, but I have not experience in writing filters that take output and modify it in some way... Any pointers? Nicky
For onthefly-debugging and validating markup generated by your Rails application (and everything else) i recommend the HTMLTidy Extension for Firefox: http://users.skynet.be/mgueury/mozilla/download.html It gives you a tiny information about errors and warnings in the statusbar. Click on it and there is an interface to Tidy where you can clean up the code and compare old and new markup as easy as possible. .bjoern Am 26.04.2005 um 07:40 schrieb Nickolay Kolev:> Debugging HTML/CSS is exactly what I wanted to do. I had in mind only > using the filter in the development environment where the overhead > would not be so dramatic. > > In production the filter would be switched off. > > I have not found anything similar, so I will try to write it myself. > The Ruby-Tidy interface does not look too hard, but I have not > experience in writing filters that take output and modify it in some > way... Any pointers? > > Nicky > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
On 4/26/05, Bjoern Wolf <bjoern-TFyySJyCJcUbwZ3undymew@public.gmane.org> wrote:> For onthefly-debugging and validating markup generated by your Rails > application (and everything else) i recommend the HTMLTidy Extension > for Firefox: http://users.skynet.be/mgueury/mozilla/download.html > > It gives you a tiny information about errors and warnings in the > statusbar. Click on it and there is an interface to Tidy where you can > clean up the code and compare old and new markup as easy as possible. > > .bjoern > > Am 26.04.2005 um 07:40 schrieb Nickolay Kolev: > > > Debugging HTML/CSS is exactly what I wanted to do. I had in mind only > > using the filter in the development environment where the overhead > > would not be so dramatic. > > > > In production the filter would be switched off. > > > > I have not found anything similar, so I will try to write it myself. > > The Ruby-Tidy interface does not look too hard, but I have not > > experience in writing filters that take output and modify it in some > > way... Any pointers? > > > > Nicky > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >My co-worker just showed me this cool app for Mac called Xyle: http://www.culturedcode.com/xyle/index.html It renders your webpage on the left, and on the right displays a nice tree navigation for the DOM, you can adjust css styles on the fly, etc. Looks very useful! Dave -- Dave Goodlad dgoodlad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org or dave-eHfbeeWWzZOw5LPnMra/2Q@public.gmane.org http://david.goodlad.ca/
David Goodlad wrote:> My co-worker just showed me this cool app for Mac called Xyle: > http://www.culturedcode.com/xyle/index.html It renders your webpage > on the left, and on the right displays a nice tree navigation for the > DOM, you can adjust css styles on the fly, etc. Looks very useful!That is really sweet -- thanks for the tip! jeremy
On 4/26/05, Jeremy Kemper <jeremy-w7CzD/W5Ocjk1uMJSBkQmQ@public.gmane.org> wrote:> David Goodlad wrote: > > My co-worker just showed me this cool app for Mac called Xyle: > > http://www.culturedcode.com/xyle/index.html It renders your webpage > > on the left, and on the right displays a nice tree navigation for the > > DOM, you can adjust css styles on the fly, etc. Looks very useful! > > That is really sweet -- thanks for the tip! > > jeremyIf you''re like me and unable to read German, or you''re without a Mac, Firefox''s DOM Inspector does the same thing. It allows you to click a node on the web page (or navigate to it on the tree) and see CSS rules that apply to it, as well as the computed style for the element. I used this a lot in my last major project. I just wish that IE had something similar, since it''s usually the one giving me problems. There''s a couple IE DOM Inspectors (iedocmon) but it doesn''t do CSS. -- rick http://techno-weenie.net
Rick Olson wrote:> On 4/26/05, Jeremy Kemper <jeremy-w7CzD/W5Ocjk1uMJSBkQmQ@public.gmane.org> wrote: > >>David Goodlad wrote: >> >>>My co-worker just showed me this cool app for Mac called Xyle: >>>http://www.culturedcode.com/xyle/index.html It renders your webpage >>>on the left, and on the right displays a nice tree navigation for the >>>DOM, you can adjust css styles on the fly, etc. Looks very useful! >> >>That is really sweet -- thanks for the tip! >> >>jeremy > > > If you''re like me and unable to read German, or you''re without a Mac, > Firefox''s DOM Inspector does the same thing. It allows you to click a > node on the web page (or navigate to it on the tree) and see CSS rules > that apply to it, as well as the computed style for the element. I > used this a lot in my last major project. I just wish that IE had > something similar, since it''s usually the one giving me problems. > There''s a couple IE DOM Inspectors (iedocmon) but it doesn''t do CSS.Can you edit the inspected CSS on the fly? That''s the cool part :) The app is localized for German and English. jeremy