John Straw said:

> Here's a site file I've written for the National Review Online
> (http://www.nationalreview.com/).  I guess it belongs in opinion.
> 
> The file could be better, I think, but I can't figure out how to get
> StoryToPrintableSub to work.
> 
> This site has stories with urls like
>   http://www.nationalreview.com/<author>/<author><date>.shtml
> A printable version of the same story is
>   http://www.nationalreview.com/<author>/<author>print<date>.html
>   
> Which seems like a job for StoryToPrintableSub.  I constructed the
> following substitution:

All that was missing was 2 things:

        - \1, \2 are deprecated nowadays, use $1, $2 etc. instead

        - it was missing the final closing ",".  The substitution
        format is
                
                s,<from>,<to>,

Here's the fixed site file -- which is what I have checked in.

  URL: http://www.nationalreview.com/
  Name: National Review Online

  Levels: 2

  ImageURL: /images/\D\.gif

  StoryURL: /\S+/\D+\d+\.shtml
  StoryURL: /\S+/\D+print\d+\.html
  StoryToPrintableSub: s,(/\S+/\D+)(\d+)\.sht,$1print$2.ht,


_______________________________________________
Sitescooper-talk mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/sitescooper-talk

Reply via email to