#!/usr/bin/perl
# Uses XML::RSS::SimpleGen to generate an RSS feed for
# http://www.slashdigg.com/lil2/index.php
#
# Copyright (C) 2007 Neil McGovern
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details, available at http://www.gnu.org/licenses/gpl.txt
#
#
      use strict;
      use XML::RSS::SimpleGen;
      my $url = q<http://www.slashdigg.com/lil2/index.php>;
	  my $baseurl = "http://www.slashdigg.com/lil2/index.php";
      rss_new( $url, "Slashdigg");
      rss_language( 'en' );
      rss_webmaster( 'neil@uk.com' );
      rss_history_file( 'slashdig.dat' );
      get_url( $url );
      while(
	   m{<span class="title" id="TITLE[0-9]+">(.*?)</span><span class="source"><a href="(.*?)">&#187; (.*?)</a></span><div class="excerpt" id="ICONT[0-9]+" >(.*?)<br/>}sg
      ) {
		 if ($3 !~ m/del\.icio\.us/) {
	         rss_item("$2", "$3: $1", $4);
		 }
      }
      die "No items in this content?! {{\n$_\n}}\nAborting"
       unless rss_item_count();
      print rss_as_string();
      exit;
