I agree it's not because of the angle brackets.
Even though regexps use them for start and end of word, you don't need to
escape them in the StoryPostProcess (in fact if you do escape them they
probably won't work). That newscientist site I posted a few weeks ago has a
StoryPostProcess like this:

        StoryPostProcess: {
                s/^.*leftmarg.*$//gm;
                s/^.*newscrosshead.*Related Stories.*$//gm;
                s/^.*newscrosshead.*Weblinks.*$//gm;
                s/^.*<\/div>.*$//gm;
                s/(<img.*width)="[0-9]*(".*)/$1="640$2/igm; #remove for no
images or just thumnails
        }

See the second last substitution: the only thing escaped is the forward
slash (and I probably should have avoided that by using a different
character for the s operator).

Jack is right about the post process working on the text not the html: To
get this script right I had to use -keep-tmps and code the substitution to
work on what I saw in the text files in the tmp directory.
This requires a lot of rerunning the script and rechecking the tmp directory
but it works in the end.


Perfect Debugging Options anyone?
=================================
Personally I'd like discover just the right combination of command line
options for debugging site files. One I thing I have never succeeded in
doing is using the caching options to avoid having to refetch the pages from
the internet each time I want to test a site. I've tried all combinations of
-fromcache -keep-tmps -refresh -fullrefresh, but whenever I try to get the
html from the cache with -fromcache it fails to find new stories. 
Any clues on this?


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Justin Mason
> Sent: Saturday, October 25, 2003 8:59 PM
> To: Jack Twilley
> Cc: Justin Mason; [EMAIL PROTECTED]
> Subject: Re: [scoop] StoryPostProcess blues 
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> Jack Twilley writes:
> >Could be.  This is what I'm trying now, though, and it works:
> >
> >  StoryPostProcess: {
> >    s/...advertisement//gm;
> >  }
> >
> >I've almost gotten this file exactly the way I want it -- when I do,
> >I'll post the whole thing to the list.
> 
> Sounds like the StoryPostProcess is acting on the *text* rendering.
> *PreProcess will act on the HTML regardless of output format
> chosen.
> 
> - --j.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.2 (GNU/Linux)
> Comment: Exmh CVS
> 
> iD8DBQE/mtXuQTcbUG5Y7woRAu/SAJ93ToDbo6ZJtkanyCbocMJoWGJppgCfb9VR
> 8DIhFmUEogwiIMhpaKW25Rg=
> =AAlr
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> Sitescooper-talk mailing list
> [EMAIL PROTECTED]
> http://sitescooper.org/mailman/listinfo/sitescooper-talk
> 

_______________________________________________
Sitescooper-talk mailing list
[EMAIL PROTECTED]
http://sitescooper.org/mailman/listinfo/sitescooper-talk

Reply via email to