mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-30 21:41:57 -04:00
version 0.4.45
This commit is contained in:
parent
546e6eae49
commit
26350d5953
@ -1,7 +1,7 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
''' E-book management software'''
|
||||
__version__ = "0.4.44"
|
||||
__version__ = "0.4.45"
|
||||
__docformat__ = "epytext"
|
||||
__author__ = "Kovid Goyal <kovid at kovidgoyal.net>"
|
||||
__appname__ = 'libprs500'
|
||||
@ -472,3 +472,10 @@ if not _settings.get('migrated from QSettings'):
|
||||
_settings.migrate(QSettings('KovidsBrain', 'libprs500'))
|
||||
_settings.set('migrated from QSettings', True)
|
||||
_settings.sync()
|
||||
|
||||
_spat = re.compile(r'^the\s+|^a\s+|^an\s+', re.IGNORECASE)
|
||||
def english_sort(x, y):
|
||||
'''
|
||||
Comapare two english phrases ignoring starting prepositions.
|
||||
'''
|
||||
return cmp(_spat.sub('', x), _spat.sub('', y))
|
||||
|
@ -13,7 +13,7 @@ from libprs500.ebooks.lrf.web.profiles import DefaultProfile
|
||||
|
||||
class WallStreetJournal(DefaultProfile):
|
||||
|
||||
title = 'Wall Street Journal'
|
||||
title = 'The Wall Street Journal'
|
||||
max_recursions = 2
|
||||
needs_subscription = True
|
||||
no_stylesheets = False
|
||||
|
@ -56,9 +56,6 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="selectionMode" >
|
||||
<enum>QAbstractItemView::MultiSelection</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -66,10 +66,6 @@ def build_images():
|
||||
os.utime(images, None)
|
||||
os.utime(images, None)
|
||||
print 'Size of images:', '%.2f MB'%(path(images+'c').size/(1024*1024.))
|
||||
os.unlink(f.name)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def build(forms):
|
||||
|
@ -17,7 +17,7 @@ from libprs500.ebooks.lrf.web import builtin_profiles
|
||||
from libprs500.ebooks.BeautifulSoup import BeautifulSoup
|
||||
from libprs500.path import path
|
||||
from libprs500.ptempfile import PersistentTemporaryDirectory
|
||||
from libprs500 import __appname__
|
||||
from libprs500 import __appname__, english_sort
|
||||
|
||||
basic_recipes = (BasicNewsRecipe, AutomaticNewsRecipe, CustomIndexRecipe, DefaultProfile, FullContentProfile)
|
||||
basic_recipe_names = (i.__name__ for i in basic_recipes)
|
||||
@ -57,6 +57,7 @@ def compile_recipe(src):
|
||||
temp = _tdir/('recipe%d.py'%time.time())
|
||||
f = open(temp, 'wb')
|
||||
src = 'from %s.web.feeds.news import BasicNewsRecipe, AutomaticNewsRecipe\n'%__appname__ + src
|
||||
src = 'from %s.ebooks.lrf.web.profiles import DefaultProfile, FullContentProfile\n'%__appname__ + src
|
||||
f.write(src)
|
||||
f.close()
|
||||
module = imp.find_module(temp.namebase, [temp.dirname()])
|
||||
@ -89,7 +90,7 @@ def get_builtin_recipe(title):
|
||||
return None, False
|
||||
|
||||
_titles = list(frozenset([r.title for r in recipes] + [p.title for p in builtin_profiles]))
|
||||
_titles.sort()
|
||||
_titles.sort(cmp=english_sort)
|
||||
titles = _titles
|
||||
|
||||
def migrate_automatic_profile_to_automatic_recipe(profile):
|
||||
|
Loading…
x
Reference in New Issue
Block a user