Re: checklink: ideas for next version

On Fri, Dec 19, 2008 at 7:35 AM, olivier Thereaux <ot@w3.org> wrote:

> Hi Brett,
>
> On 16-Dec-08, at 12:51 PM, Brett Bieber wrote:
>
>> * keep most of the current checklink architecture, including the ability
>>> to use as standalone, commandline tool
>>> * during link checking process, use DOM scripting to populate a table
>>> listing the links that are being checked, and the results, in real time.
>>> * keep the summary output in "plain" HTML, accessible and all.
>>> * the real time display of links being checked should help fight the
>>> perceived slowness (stuff happens on the page)
>>> [...]
>>> Sounds easy enough. Worth a try? Anyone interested in working on this
>>> with me?
>>>
>>
>> Excellent. Yes... I'd be willing to help on this.
>>
>
> Wonderful! I recall you still have CVS access to the code repository,
> right?
> http://dev.w3.org/cvsweb/perl/modules/W3C/LinkChecker/
>

Hmm... I'm not sure if I have access. Guess I could try.


> The code already embeds some javascript – an experiment I did a while ago –
> but we could certainly get it out to its own file if it gets too big.
> http://qa-dev.w3.org/wlc/checklink


Let's go for a separate file.


> Would you be more interested in looking first into the perl side, or the js
> side?
>

The js side at first.. I can try some perl if you're desperate. :-)

Responding to previous email, some api thoughts:

How to do that:
>
> * code a js function to create an HTML id based on two URIs (the URI of the
> document checked and the URI of the link checked). That will be useful to
> identify table rows in the DOM
>

Sounds like a simple hash function. There are several md5 solutions out
there in js.. the only problem is that the ID needs to be prefixed with some
letters to ensure a valid id attribute. Something like... ?
getLinkID(docuri, linkuri)
{
    return 'l'+md5(docuri+linkuri);
}


> * add a js function to add a row to the DOM with a given ID
>

appendRow(table, rowid)

* add a js function to display the link in a given table cell. This function
> will be called via a <script> output while a document is being parsed and
> links-to-be-checked are discovered
>
>
* add a js function to display the result in a table cell. This function
> will be called via a <script> output in real time as links get checked. The
> function will also apply styles on the fly to the table row or cell
>

displayResult(message, cell)
displayLink(link, cell)

The last two are basically the same function?
displayMessage(message, cellid);

I haven't had time to code anything working, but I did manage to get a
checkout of the perl lib and I'll get it running from cvs here shortly so I
can actually get something done.

-- 
Brett Bieber

Received on Friday, 19 December 2008 15:34:15 UTC