Sync to trunk.

This commit is contained in:
John Schember 2009-11-14 13:43:15 -05:00
commit d678f144a8
5 changed files with 43 additions and 4 deletions

View File

@ -35,7 +35,10 @@ class NYTimes(BasicNewsRecipe):
br.select_form(name='login') br.select_form(name='login')
br['USERID'] = self.username br['USERID'] = self.username
br['PASSWORD'] = self.password br['PASSWORD'] = self.password
br.submit() raw = br.submit().read()
if 'Sorry, we could not find the combination you entered. Please try again.' in raw:
raise Exception('Your username and password are incorrect')
#open('/t/log.html', 'wb').write(raw)
return br return br
def parse_index(self): def parse_index(self):

View File

@ -3,7 +3,7 @@ __license__ = 'GPL 3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
import os, re, sys, shutil import os, re, sys, shutil, pprint
from calibre.customize.conversion import OptionRecommendation, DummyReporter from calibre.customize.conversion import OptionRecommendation, DummyReporter
from calibre.customize.ui import input_profiles, output_profiles, \ from calibre.customize.ui import input_profiles, output_profiles, \
@ -649,6 +649,14 @@ OptionRecommendation(name='language',
self.read_user_metadata() self.read_user_metadata()
self.opts.no_inline_navbars = self.opts.output_profile.supports_mobi_indexing \ self.opts.no_inline_navbars = self.opts.output_profile.supports_mobi_indexing \
and self.output_fmt == 'mobi' and self.output_fmt == 'mobi'
if self.opts.verbose:
self.log.filter_level = self.log.DEBUG
if self.opts.verbose > 1:
self.log.debug('Resolved conversion options')
try:
self.log.debug(pprint.pformat(self.opts.__dict__))
except:
self.log.exception('Failed to get resolved conversion options')
def flush(self): def flush(self):
try: try:

View File

@ -42,7 +42,6 @@ class FB2Input(InputFormatPlugin):
from calibre.ebooks.metadata.meta import get_metadata from calibre.ebooks.metadata.meta import get_metadata
from calibre.ebooks.oeb.base import XLINK_NS from calibre.ebooks.oeb.base import XLINK_NS
NAMESPACES = {'f':FB2NS, 'l':XLINK_NS} NAMESPACES = {'f':FB2NS, 'l':XLINK_NS}
log.debug('Parsing XML...') log.debug('Parsing XML...')
parser = etree.XMLParser(recover=True, no_network=True) parser = etree.XMLParser(recover=True, no_network=True)
doc = etree.fromstring(stream.read()) doc = etree.fromstring(stream.read())

View File

@ -173,7 +173,6 @@ class QueueBulk(QProgressDialog):
for x in list(lrecs): for x in list(lrecs):
if x[0] == 'debug_pipeline': if x[0] == 'debug_pipeline':
lrecs.remove(x) lrecs.remove(x)
try: try:
dtitle = unicode(mi.title) dtitle = unicode(mi.title)
except: except:

View File

@ -406,6 +406,36 @@ This will result in an automatically generated two level Table of Contents that
Not all output formats support a multi level Table of Contents. You should first try with EPUB Output. If that Not all output formats support a multi level Table of Contents. You should first try with EPUB Output. If that
works, then try your format of choice. works, then try your format of choice.
How options are set/saved for Conversion
-------------------------------------------
There are two places where conversion options can be set in |app|. The first is in Preferences->Conversion. These
settings are the defaults for the conversion options. Whenever you try to convert a new book, the settings set here
will be used by default.
You can also change settings in the conversion dialog for each book conversion. When you convert a book, |app| remembers the
settings you used for that book, so that if you convert it again, the saved settings for the individual book will take
precedence over the defaults set in Preferences. You can restore the individual settings to defaults by using the Restore to defaults
button in the individual book conversion dialog.
When you Bulk Convert a set of books, settings are taken in the following order:
* From the defaults set in Preferences->Conversion
* From the saved conversion settings for each book being converted (if any)
* From the settings set in the Bulk conversion dialog
Note that the final settings for each book in a Bulk Conversion will be saved and re-used if the book is converted again. Since the
highest priority in Bulk Conversion is given to the settings in the Bulk Conversion dialog, these will override any book specific
settings. So you should only bulk convert books together that need similar settings. The exceptions are metadata and input format specific
settings. Since the Bulk Conversion dialog does not have settings for these two categories, they will be taken from book specific
settings (if any) or the defaults.
.. note::
You can see the actual settings used during any conversion by clicking the rotating hourglass
and then double clicking the individual conversion job. This will bring up a conversion log
that will contain the actual settings used, near the top.
Format specific tips Format specific tips
---------------------- ----------------------