This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Webmaster forum > August 2005 > Critique Generator [was Re: Frontpage or Textpad]
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Critique Generator [was Re: Frontpage or Textpad]
|
|
| Toby Inkster 2005-08-26, 7:28 pm |
| mbstevens wrote:
> http://www.mbstevens.com/cgi/mkatt....tique_Generator
> (New v. 1.4)
I was playing with this a little while ago and thought it might be nice if
you could call the generator like this:
./critique.py http://example.org
The script would then "visit" the site and detect a few common mistakes
and problems :-
* lack of DOCTYPE;
* Transitional DOCTYPE;
* deprecated elements/attributes;
* nested tables;
* invalid (X)HTML; and
* invalid CSS,
and then start a critique based on what it automatically detected,
then allowing the critic add other criticisms with your shortcut letters.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
| |
| mbstevens 2005-08-26, 7:28 pm |
| Toby Inkster wrote:
> mbstevens wrote:
>
>
>
>
> I was playing with this a little while ago and thought it might be nice if
> you could call the generator like this:
>
> ./critique.py http://example.org
>
> The script would then "visit" the site and detect a few common mistakes
> and problems :-
>
> * lack of DOCTYPE;
> * Transitional DOCTYPE;
> * deprecated elements/attributes;
> * nested tables;
> * invalid (X)HTML; and
> * invalid CSS,
>
> and then start a critique based on what it automatically detected,
> then allowing the critic add other criticisms with your shortcut letters.
Interesting problem, Toby. The doctype and deprecated elements stuff
_should_ be easier than the validation. Might be able to co-opt the
validator's output or Tidy's output to get some of the validation
functionality. A regular expression or two over validator's output
might be enough to tell if a page is valid or not. Might have to switch
to Perl, too, which has more modules (that I know about) for this sort
of thing. (OK, OK, I'm just more comfortable with Perl.) Any
suggestions for massively easy methods of implementation and/or coding
contributions are welcome. This primate shall now allow it to ramble
about in the fields of his neural network, and see if any subsystems
salute it. ;)
| |
| John Bokma 2005-08-26, 7:28 pm |
| mbstevens <NOXwebmasterx@xmbstevensx.com> wrote:
> might be enough to tell if a page is valid or not. Might have to
> switch to Perl, too, which has more modules (that I know about) for
> this sort of thing. (OK, OK, I'm just more comfortable with Perl.)
I haven't seen the script, nor read up on what it exactly does, but the w3c
validator is written in PERL (it consists of several modules).
--
John PERL SEO tools: http://johnbokma.com/perl/
Experienced (web) developer: http://castleamber.com/
Get a SEO report of your site for just 100 USD:
http://johnbokma.com/websitedesign/seo-expert-help.html
| |
| Toby Inkster 2005-08-27, 4:17 am |
| mbstevens wrote:
> Interesting problem, Toby. The doctype and deprecated elements stuff
> _should_ be easier than the validation.
Here's an easy validation routine in Perl. Should be easy enough to
translate to Python:
sub validate
{
my ($url) = @_;
$_ = `GET 'http://www.htmlhelp.com/cgi-bin/validate.cgi?url=$url&warnings=no'`;
return 1 if (/Congratulations..no.errors/);
return 0;
}
It assumes you have /usr/bin/GET installed, tough it should only be a
couple of extra lines to use a proper HTTP module rather than calling an
external program.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
| |
| Matt Probert 2005-08-27, 4:18 am |
| On Fri, 26 Aug 2005 18:50:07 +0100, Toby Inkster
<usenet200508@tobyinkster.co.uk> wrote:
>The script would then "visit" the site and detect a few common mistakes
>and problems :-
>
> * lack of DOCTYPE;
> * Transitional DOCTYPE;
> * deprecated elements/attributes;
> * nested tables;
> * invalid (X)HTML; and
> * invalid CSS,
>
Mistakes and problems?
Beware of falling into the trap of thinking that W3C compliance is the
end-result, it's not. What you suggest is fine for the classroom, and
in academic circles. But in the business world, we don't care a damn
for W3C, only readership figures.
Matt
| |
| mbstevens 2005-08-27, 7:34 am |
| Matt Probert wrote:
> On Fri, 26 Aug 2005 18:50:07 +0100, Toby Inkster
> <usenet200508@tobyinkster.co.uk> wrote:
>
>
>
>
> Mistakes and problems?
>
> Beware of falling into the trap of thinking that W3C compliance is the
> end-result, it's not. What you suggest is fine for the classroom, and
> in academic circles. But in the business world, we don't care a damn
> for W3C, only readership figures.
>
> Matt
>
If that functionality gets put in, there should probably be a switch to
turn it on or off at the preference of the user, all right.
| |
| Toby Inkster 2005-08-27, 7:50 pm |
| Matt Probert wrote:
> Mistakes and problems?
> Beware of falling into the trap of thinking that W3C compliance is the
> end-result, it's not.
They *are* mistakes and problems. The degree of severity is a matter for
debate.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|