Forum Moderators: phranque

Message Too Old, No Replies

looking for an app that can help reformat/clean/tidy/manipulate HTML

crappy code is making my life crappy

         

pixeltierra

5:41 am on Nov 14, 2006 (gmt 0)

10+ Year Member



I've been re-doing sites a lot lately, and re-formatting crappy HTML code is taking up too much of my time.

Can anyone recommend an app (preferably free/open source) that is very configurable that will let me do some of the following:

-choose which tags to get rid of
-choose which attributes to get rid of
-choose which symbols / regex patterns to get rid of or find/replace
-control or force good indentations for nested tags
-force single lines where there line breaks between tags

bill

9:06 am on Nov 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Have you tried HTML Tidy? That's got a lot of control options and is certainly free.

pixeltierra

4:08 pm on Nov 14, 2006 (gmt 0)

10+ Year Member



I had tried HTML Tidy, but it was pretty unintuitive. I just re-installed it and I've spent the last hour reading what the options mean online.

It can get some of the job done I guess but I was wanting something more along the lines of ReNamer which is a wonderful free app for renaming lots of files at once and can take user input etc.

If I were the me of a year ago I would write my own app, but I've been spending too much time re-inventing wheels. So I've promised myself to look harder for wheels that are already out there.

Still open to suggestions...

pixeltierra

6:49 am on Nov 15, 2006 (gmt 0)

10+ Year Member



Surely someone must know of something...

ronin

9:24 pm on Nov 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You might try NoteTab.

The free version has a very powerful global search and replace and will also handle regular expressions.

Familyman501

5:00 pm on Nov 16, 2006 (gmt 0)

10+ Year Member



Is this ugly programming?
If you can plan the page and begin from scratch you'll have a cleaner resulting page.
Use the same page style(s) throughout your site.
Use CSS.

However, you may make a few mistakes that need linting.
I use the following apps for theses functions:

CSE HTML Validator to:
-choose which tags to get rid of

NoteTab to:
- find/replace
-control or force good indentations for nested tags
-force single lines where there line breaks between tags

I use CSS for
-control all the attributes

Note:
-control or force good indentations for nested tags
I don't know about this one.

greenleaves

5:32 pm on Nov 16, 2006 (gmt 0)

10+ Year Member



I would like to second what Familyman501.

I once had to optimize a site with a mess for code. I started to work on it, and a few minutes/hours into it, I just gave up and re-did the site with my own coding.

It took around the same or less than it would have taken me to clean it up. But the true up side is that the code was built from the ground up with SEs and Accesability in mind; clean logical code. I am glad I did it that way, it took less and I did more.