15
15
'demorgen_be', 'de_standaard', 'ap', 'barrons', 'chr_mon', 'cnn', 'faznet',
16
16
'jpost', 'jutarnji', 'nasa', 'reuters', 'spiegelde', 'wash_post', 'zeitde',
17
17
'blic', 'novosti', 'danas', 'vreme', 'times_online', 'the_scotsman',
18
'nytimes_sub', 'security_watch', 'cyberpresse', 'st_petersburg_times',
18
'nytimes_sub', 'nytimes', 'security_watch', 'cyberpresse', 'st_petersburg_times',
19
19
'clarin', 'financial_times', 'heise', 'le_monde', 'harpers', 'science_aas',
20
20
'science_news', 'the_nation', 'lrb', 'harpers_full', 'liberation',
21
21
'linux_magazine', 'telegraph_uk', 'utne', 'sciencedaily', 'forbes',
44
44
'stackoverflow', 'telepolis_artikel', 'zaobao', 'usnews',
45
45
'straitstimes', 'index_hu', 'pcworld_hu', 'hrt', 'rts',
46
46
'h1', 'h2', 'h3', 'phd_comics', 'woz_die', 'elektrolese',
47
'climate_progress', 'carta',
47
'climate_progress', 'carta', 'slashdot', 'publico',
48
'the_budget_fashionista', 'elperiodico_catalan',
49
'elperiodico_spanish', 'expansion_spanish', 'lavanguardia',
50
'marca', 'kellog_faculty', 'kellog_insight', 'noaa',
51
'theeconomictimes_india', '7dias', 'buenosaireseconomico',
52
'diagonales', 'miradasalsur', 'newsweek_argentina', 'veintitres',
53
'gva_be', 'hln', 'tijd', 'degentenaar', 'inquirer_net', 'uncrate',
54
'fastcompany', 'accountancyage', 'laprensa_hn', 'latribuna',
55
'eltiempo_hn', 'slate',
50
59
import re, imp, inspect, time, os
51
60
from calibre.web.feeds.news import BasicNewsRecipe, CustomIndexRecipe, AutomaticNewsRecipe
52
from calibre.ebooks.lrf.web.profiles import DefaultProfile, FullContentProfile
53
61
from calibre.ebooks.BeautifulSoup import BeautifulSoup
54
62
from calibre.path import path
55
63
from calibre.ptempfile import PersistentTemporaryDirectory
56
64
from calibre import __appname__, english_sort
58
basic_recipes = (BasicNewsRecipe, AutomaticNewsRecipe, CustomIndexRecipe, DefaultProfile, FullContentProfile)
66
basic_recipes = (BasicNewsRecipe, AutomaticNewsRecipe, CustomIndexRecipe)
59
67
basic_recipe_names = (i.__name__ for i in basic_recipes)
100
108
src = re.sub(r'from __future__.*', '', src)
101
109
f = open(temp, 'wb')
102
110
src = 'from %s.web.feeds.news import BasicNewsRecipe, AutomaticNewsRecipe\n'%__appname__ + src
103
src = 'from %s.ebooks.lrf.web.profiles import DefaultProfile, FullContentProfile\n'%__appname__ + src
104
111
src = '# coding: utf-8\n' + src
105
112
src = 'from __future__ import with_statement\n' + src
111
118
module = imp.load_module(temp.namebase, *module)
112
119
classes = inspect.getmembers(module,
113
120
lambda x : inspect.isclass(x) and \
114
issubclass(x, (DefaultProfile, BasicNewsRecipe)) and \
121
issubclass(x, (BasicNewsRecipe,)) and \
115
122
x not in basic_recipes)