# This is a site layouts file. Layouts are used to provide default information
# on a given site's layout, providing StoryStart, StoryEnd, etc. parameters for
# a given URL pattern.
#
# One advantage of this is that (for example) if an article in Slashdot links to
# a Wired News article, the latter page can be scooped as well, without the
# slashdot.site file knowing about Wired News' page format.
#
# This file should always be kept in the sites directory!

# ---------------------------------------------------------------------------

LayoutURL: http://www.wired.com/news/.*
  # layout for Wired News pages. Wired seems to change this every week!!, and
  # it's really messy right now. :(
  #
  StoryHeadline: (?i)<FONT face="[^"]+" size="3" color=".000000"><B>(.*?)</B>
  StoryStart: (?i)-- STORY --
  StoryEnd: (?i)-- (END_OF_BODY|end content) --
  ContentsStart: -- begin generic desk --
  ContentsEnd: (?i)-- (end content|TRADES|FOOTER) --

  StoryURL: http://www.wired.com/news/.+/[\d,]+\.html\S*
  StoryURL: http://r.wired.com/r/\d+/http://www.wired.com/news/.+/[\d,]+\.html\S*

  # I hate StoryServer. This is just ludicrous
  StoryToPrintableSub: s!(http://www.wired.com/news)/\S+/(\d+),\d+,([\d,]+\.html\S*)$!$1/print/$2,1294,$3!

# ---------------------------------------------------------------------------

LayoutURL: http://news.cnet.com/news/.*
  StoryStart: <font size="+2">
  StoryEnd: <font face="Arial, Helvetica" size="-1">

  StoryURL: http://news.cnet.com/news/\S+.html.*
  StoryToPrintableSub: s!(http://news.cnet.com/news/[-\d]+.html)?.*$!$1!

# ---------------------------------------------------------------------------

LayoutURL: http://news.bbc.co.uk/.*
  ContentsStart: --NewsOnLineQLX--
  ContentsEnd: <FORM ACTION
  StoryStart: --NOL\S+Body--
  StoryEnd: <A HREF=[^>]+>\s*Front Page\s*</A>
  StoryURL: http://news.bbc.co.uk/low/english/.*newsid.*stm.*

# ---------------------------------------------------------------------------

LayoutURL: http://quote.yahoo.com/q\?.*
  Levels: 1
  StoryStart: Create New View
  ImageURL: http://chart.yahoo.com/c/.*\.gif
  StoryEnd: Quotes delayed 15 minutes for Nasdaq, 20 minutes otherwise.
  StoryHeadline: colspan=7><b>(.*?)</b>
  StoryCacheable: 0
  UseTableSmarts: 0
  StoryPostProcess: {
      s/\x8D//g;
      s/- More[^\n]*\n//g;
      s/\]//g;
      s/(Last Trade|Change|Prev Cls|Volume|Div Date|Day's Range|Bid|Ask|Open) *\n/\n$1 /g;
      s/(Avg Vol|Ex-Div|52-week Range|Earn\/Shr|P\/E|Mkt Cap|Div\/Shr|Yield) *\n/\n$1 /g;
      s/\n([ \t]*\n)+/\n\n/g;
  }

# ---------------------------------------------------------------------------

LayoutURL: http://www.wunderground.com/cgi-bin/findweather/getForecast\?.*
  StoryStart: Updated
  StoryEnd: <!-- blue credits bar -->
  UseTableSmarts: 0
  StoryCacheable: 0
  StoryPostProcess: {
      s/\n\n+/\n/g;
      s/Moon Phase//g;
      s/\x8D /\x8D/g;
      s/: /Updated: /;
      s/Add.*?cast\)//gs;
      s/\s+(Forecast as)/\n\x8D$1/g;
      s/\n(State Extended)/\n\x8D$1/g;
      s/\n(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Today|Tonight|Tomorrow)/\n\n\x8D$1/gs;
      s/\nTemperature *Probability of Precipitation\n//gs;
      s/Place/\n\n\x8DSummary\n/gs;
  }

# ---------------------------------------------------------------------------

# New York Times
# Site file for Sitescooper (http://jmason.org/software/sitescooper/)
# Written by: Kennis Koldewyn <kennis.koldewyn@wcom.com>
# hints from: Andy Rabagliati <andyr@wizzy.com>
# Last updated: 2000-05-18

LayoutURL: http://partners.nytimes.com/.*
  ContentsStart: <NYT_TEXT
  ContentsEnd: </NYT_TEXT
  StoryStart: <NYT_DATE
  StoryEnd: <NYT_FOOTER
  StoryURL: http://partners.nytimes.com/.*

  # Story pre-processing:
  StoryHTMLPreProcess: {
    # Remove lists of online links, inline tables, inline images, etc.:
    s/<NYT_INLINEBLURB.*?<\/?NYT_INLINEBLURB>//gs;
    s/<NYT_INLINEIMAGE.*?<\/?NYT_INLINEIMAGE>//gs;
    s/<NYT_INLINETABLE.*?<\/?NYT_INLINETABLE>//gs;
    s/<NYT_LINKS_ONSITE.*?<\/?NYT_LINKS_ONSITE>//gs;
    s/<NYT_LINKS_OFFSITE.*?<\/?NYT_LINKS_OFFSITE>//gs;

    # Remove other NYT-specific tags:
    s/<\/?NYT_.*?>//gm;

    # Remove break after headlines:
    s/<\/H(\d)>\s*<BR>/<\/H$1>/gim;
  }

# ---------------------------------------------------------------------------

