mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
094d82b92a
commit
e83f2dc338
@ -41,7 +41,7 @@
|
||||
|
||||
- title: "Allow search and replace on comments custom columns."
|
||||
|
||||
- title: "Add a new action 'Quick View' to show the books in your library by the author(s) of the currently selected book, in a separate window. You can add it to your toolbar or right click menu by going to Preferences->Toolbars."
|
||||
- title: "Add a new action 'Quick View' to show the books in your library by the author/tags/series/etc. of the currently selected book, in a separate window. You can add it to your toolbar or right click menu by going to Preferences->Toolbars."
|
||||
|
||||
- title: "Get Books: Add libri.de as a book source. Fix a bug that caused some books downloads to fail. Fixes to the Legimi and beam-ebooks.de stores"
|
||||
tickets: [799367]
|
||||
|
@ -59,6 +59,8 @@ class CompositeProgressReporter(object):
|
||||
(self.global_max - self.global_min)
|
||||
self.global_reporter(global_frac, msg)
|
||||
|
||||
ARCHIVE_FMTS = ('zip', 'rar', 'oebzip')
|
||||
|
||||
class Plumber(object):
|
||||
'''
|
||||
The `Plumber` manages the conversion pipeline. An UI should call the methods
|
||||
@ -594,7 +596,7 @@ OptionRecommendation(name='sr3_replace',
|
||||
raise ValueError('Input file must have an extension')
|
||||
input_fmt = input_fmt[1:].lower()
|
||||
self.archive_input_tdir = None
|
||||
if input_fmt in ('zip', 'rar', 'oebzip'):
|
||||
if input_fmt in ARCHIVE_FMTS:
|
||||
self.log('Processing archive...')
|
||||
tdir = PersistentTemporaryDirectory('_plumber_archive')
|
||||
self.input, input_fmt = self.unarchive(self.input, tdir)
|
||||
|
@ -11,8 +11,8 @@ import sys, cPickle, shutil, importlib
|
||||
from PyQt4.Qt import QString, SIGNAL, QAbstractListModel, Qt, QVariant, QFont
|
||||
|
||||
from calibre.gui2 import ResizableDialog, NONE
|
||||
from calibre.ebooks.conversion.config import GuiRecommendations, save_specifics, \
|
||||
load_specifics
|
||||
from calibre.ebooks.conversion.config import (GuiRecommendations, save_specifics,
|
||||
load_specifics)
|
||||
from calibre.gui2.convert.single_ui import Ui_Dialog
|
||||
from calibre.gui2.convert.metadata import MetadataWidget
|
||||
from calibre.gui2.convert.look_and_feel import LookAndFeelWidget
|
||||
@ -24,7 +24,8 @@ from calibre.gui2.convert.toc import TOCWidget
|
||||
from calibre.gui2.convert.debug import DebugWidget
|
||||
|
||||
|
||||
from calibre.ebooks.conversion.plumber import Plumber, supported_input_formats
|
||||
from calibre.ebooks.conversion.plumber import (Plumber,
|
||||
supported_input_formats, ARCHIVE_FMTS)
|
||||
from calibre.ebooks.conversion.config import delete_specifics
|
||||
from calibre.customize.ui import available_output_formats
|
||||
from calibre.customize.conversion import OptionRecommendation
|
||||
@ -159,7 +160,7 @@ class Config(ResizableDialog, Ui_Dialog):
|
||||
log = Log()
|
||||
log.outputs = []
|
||||
input_file = 'dummy.'+input_format
|
||||
if input_format in ('zip', 'rar', 'oebzip'):
|
||||
if input_format in ARCHIVE_FMTS:
|
||||
input_file = 'dummy.html'
|
||||
self.plumber = Plumber(input_file, output_path, log)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user