diff --git a/src/libprs500/web/feeds/recipes/__init__.py b/src/libprs500/web/feeds/recipes/__init__.py index 01b1873c60..6529b56035 100644 --- a/src/libprs500/web/feeds/recipes/__init__.py +++ b/src/libprs500/web/feeds/recipes/__init__.py @@ -17,7 +17,8 @@ ''' Builtin recipes. ''' -recipes = ['newsweek', 'atlantic', 'economist', 'dilbert', 'portfolio', 'nytimes'] +recipes = ['newsweek', 'atlantic', 'economist', 'dilbert', 'portfolio', + 'nytimes', 'usatoday'] import re from libprs500.web.feeds.news import BasicNewsRecipe, CustomIndexRecipe diff --git a/src/libprs500/web/feeds/recipes/usatoday.py b/src/libprs500/web/feeds/recipes/usatoday.py new file mode 100644 index 0000000000..196db8845c --- /dev/null +++ b/src/libprs500/web/feeds/recipes/usatoday.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python + +## Copyright (C) 2008 Kovid Goyal kovid@kovidgoyal.net +## 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 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., +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +''' +usatoday.com +''' + +from libprs500.web.feeds.news import BasicNewsRecipe +import re + +class USAToday(BasicNewsRecipe): + + title = 'USA Today' + timefmt = ' [%d %b %Y]' + max_articles_per_feed = 20 + no_stylesheets = True + extra_css = ''' + .inside-head { font: x-large bold } + .inside-head2 { font: x-large bold } + .inside-head3 { font: x-large bold } + .byLine { font: large } + ''' + html2lrf_options = ['--ignore-tables'] + + preprocess_regexps = [ + (re.compile(r'