|
Posted by dorayme on 02/17/07 00:27
In article <slrnetcd56.5lj.spamspam@bowser.marioworld>,
Ben C <spamspam@spam.eggs> wrote:
> On 2007-02-16, dorayme <doraymeRidThis@optusnet.com.au> wrote:
> > In article
> ><1171622169.646616.165350@k78g2000cwa.googlegroups.com>,
> > "Andy Dingley" <dingbat@codesmiths.com> wrote:
> >
> >> On 16 Feb, 03:09, dorayme <doraymeRidT...@optusnet.com.au> wrote:
> >>
> >> > This is very easy technically. This is what I do: search for
> >> > instances of ids and classes in the html files by using Search
> >> > and Replace functions that come with any decent text editor.
> >>
> >> That sounds like hard work!
> >
> > Oh well, perhaps there are things I am missing. But I suspect -
> > perhaps unfairly - that there is a Force of Unnecessary
> > Complexity secretly acting on earthlings.
> >
> > I have done these things without much work at all, see my
> > previous reply.
> >
> > Perhaps I need to explain more? The OP had a problem we all
> > confront. Simple enough in most cases no matter how big the site.
> >
> > Suppose you want to know if a #navMonday css ....
.....
>
> The only detraction with your way of doing it is that don't you have to
> manually do the search and replace for each class or id that you're
> concerned with? Ideally one would like to get the complete list of dead
> classes and ids in one go, and then maybe also delete them in one go.
> It's quite interesting to see what different people's approaches are to
> this.
>
> Of course it depends how many there are to deal with. If it's a huge
> site with thousands of them, or if I found myself making a habit of it,
> I'd write a Python program. If there were about 20 or 30, I'd mess about
> with grep and the editor in unnecessarily complex ways, get it all wrong
> several times, take longer but have more fun; if there were only about 4
> I'd do simple search and replacing.
You can do concatenated searches (take a while now to compose it)
and then at the press of a button (almost instant results on a
fast machine) in a S & R function (yes, thousands of instances
all at once in one go, gone like magic). Using nothing but a
built in S & R like in the free TextWrangler or shareware BBEdit.
The real fact of the matter is if it was your own built site, you
simply would know that most of the classes are being used. You
cast your eye on the ones you are not sure of and search for
them.
Trying to get turn key solutions to things is often just plain
unrealistic in terms of time and effort (counter-intuitively).
I admit this: if you get landed with someone else's site, very
big and very complex and you have few bearings, maybe something
very special to automate the thing would be very nice, almost
necessary...
--
dorayme
Navigation:
[Reply to this message]
|