[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: No url.list? Error.

From: Adam Stanley
Subject: RE: No url.list? Error.
Date: Sat, 22 Apr 2006 13:09:46 -0500

> Adam Stanley wrote:
>>>> Also, I could have sworn that I mentioned (AGES AGO) that I hacked
>>>> webdiff to support an option of "diffonly" that outputs only what's
>>>> different.  It doesn't seem that this hack made it into the
>>>> codestream. Any thoughts on moving it in?
>>> Some patches do end up on the floor, sometimes because I
>>> didn't like the
>>> patch and sometimes because it didn't apply. If you have such a
>>> patch for an updated version of WebSec (1.9 will do), please send
>>> it for consideration.
>> I will do.  I'm not a patch master but I'll come up with something
>> and send it to you.  In my fork of 1.3.4 right now I have a new diff
>> keyword of diffonly.  I don't think that websec does anything other
>> than pass it onto webdiff which does all the work.  Some of the code
>> is commented.  Would you look at it off the 1.3.4 code stream or
>> should I convert it to 1.9 first? 
> If the websec patch is trivial I'd take it as is, but please
> do provide
> the webdiff patch against 1.9 my time is limited as is so I'm only
> integrating patches in websec and not doing any original development.

Here's my psudeo patch code... Let me know if you need more.

In WebSec just allow a option called "Diffonly" which is set to true or
false. And pass that as true or false to WebDiff.   Also, hicolor is set to
"none".  Url.list example:

URL = http://yrnews.com
Name = Genoa City News
Prefix = yrnews
Diff = webdiff
Diffonly = true
Hicolor = white

In WebDiff before you call PerformDiff(); set a header (like TrackEngine)

if ($diffonly eq "true") {
    open(OUTPAGE, "> $outpage") or die "Cannot open $outpage: $!\n";
    print OUTPAGE "<html><body bgcolor=white><title>$title</title>\n";
    print OUTPAGE "<base href=$url>\n";
    print OUTPAGE "<table width=\"100%\"><tr><td bgcolor=\"#CCCCCC\"><div
align=\"center\"><a href=\"$url\"><b><font size=\"3\" face=\"Verdana, Arial,

In PerformDiff() when the token has been identified and set, the follow
block is also used:

if ($diffonly eq "true") {
    $token =~ s:address@hidden@address@hidden@&nbsp;~~~~:&nbsp;:sig;
    $token =~ s:~~~~(/*.*?)address@hidden@address@hidden@:<$1>:sig;
    print OUTPAGE $token . "<br>\n";

After PerformDiff() when you write the page, the follow block is used:

if ($diffonly eq "false") { open(OUTPAGE, "> $outpage") or die "Cannot open
$outpage: $!\n"; }
if ($diffonly eq "false") { foreach (@newtokens) { print OUTPAGE "$_\n"; } }
if ($diffonly eq "true") { print OUTPAGE "\n<hr></html>"; }
open(OUTPAGE, "> $outpage") or die "Cannot open $outpage: $!\n";

Now... Mind you there's probably more to this, but I did the hack years ago
and I really can't remember what exactly I've done and why. I'll assume that
this makes more sense to you than me.  If you still need me to make (and
test) these changes with 1.9 I can try, but I'm not sure when.  I'm assuming
that you can do it faster than I can.



Adam Stanley

reply via email to

[Prev in Thread] Current Thread [Next in Thread]