#!/usr/bin/perl # # themedepot2rss - Converts recent themes page from www.themedepot.org to an RSS feed. # # For usage with http://www.themedepot.org/recentthemes.php4 # # Copyright (c) 2004 Christophe Meyer # # 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, or # (at your option) any later version. # # 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 Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. use strict; my $html=''; while(<>){$html.=$_;} print < Theme Depot - Recent Themes http://www.themedepot.org/recentthemes.php4 Theme Depot - Recent Themes en EOXML ; print < EOSEQ ; while ($html=~m/.*?/smg) { my $seq = 'http://www.themedepot.org'.$1; print < EOSEQ ; } print < EOSEQ ; while ($html=~m/.*?.*?height=16>(.*?)<\/a><\/b>
(.*?)<\/a>
/smg) { my $link = 'http://www.themedepot.org'.$1; my $image = 'http://www.themedepot.org'.$2; my $area = $5; my $title = $3.' ('.$area.')'; my $arealink = $4; my $subject = '
'.$area.''; my $description = '

'.$title.' ('.$subject.')

'; print < $title $link EOITEM ; } print < EOXML ;