bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def setData(self, index, value, role): if role == Qt.EditRole: row, col = index.row(), index.column() column = self.column_map[col] if column not in self.editable_cols: return False val = int(value.toInt()[0]) if column == 'rating' else \ value.toDate() if column in ('timestamp', 'pubdate') else \ unicode(value.toStrin... | def setData(self, index, value, role): if role == Qt.EditRole: row, col = index.row(), index.column() column = self.column_map[col] if column not in self.editable_cols: return False val = int(value.toInt()[0]) if column == 'rating' else \ value.toDate() if column in ('timestamp', 'pubdate') else \ unicode(value.toStrin... | 451,300 |
def __init__(self, *args): QWebView.__init__(self, *args) self.debug_javascript = False self.shortcuts = Shortcuts(SHORTCUTS, 'shortcuts/viewer') self.self_closing_pat = re.compile(r'<([a-z]+)\s+([^>]+)/>', re.IGNORECASE) self.setSizePolicy(QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)) self._size_hint = Q... | def __init__(self, *args): QWebView.__init__(self, *args) self.debug_javascript = False self.shortcuts = Shortcuts(SHORTCUTS, 'shortcuts/viewer') self.self_closing_pat = re.compile(r'<([a-z1-6]+)\s+([^>]+)/>', re.IGNORECASE) self.setSizePolicy(QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)) self._size_hint ... | 451,301 |
def prints(*args, **kwargs): ''' Print unicode arguments safely by encoding them to preferred_encoding Has the same signature as the print function from Python 3, except for the additional keyword argument safe_encode, which if set to True will cause the function to use repr when encoding fails. ''' file = kwargs.get('... | def prints(*args, **kwargs): ''' Print unicode arguments safely by encoding them to preferred_encoding Has the same signature as the print function from Python 3, except for the additional keyword argument safe_encode, which if set to True will cause the function to use repr when encoding fails. ''' file = kwargs.get('... | 451,302 |
def sort(self, items, field, order): field = self.db.data.sanitize_sort_field_name(field) if field not in ('title', 'authors', 'rating', 'timestamp', 'tags', 'size', 'series'): raise cherrypy.HTTPError(400, '%s is not a valid sort field'%field) keyg = CSSortKeyGenerator([(field, order)], self.db.field_metadata) items.s... | def sort(self, items, field, order): field = self.db.data.sanitize_sort_field_name(field) if field not in self.db.field_metadata.field_keys(): raise cherrypy.HTTPError(400, '%s is not a valid sort field'%field) keyg = CSSortKeyGenerator([(field, order)], self.db.field_metadata) items.sort(key=keyg, reverse=not order) | 451,303 |
def accept(self): try: if self.formats_changed: self.sync_formats() title = unicode(self.title.text()) self.db.set_title(self.id, title, notify=False) au = unicode(self.authors.text()) if au: self.db.set_authors(self.id, string_to_authors(au), notify=False) aus = unicode(self.author_sort.text()) if aus: self.db.set_aut... | def accept(self): try: if self.formats_changed: self.sync_formats() title = unicode(self.title.text()) self.db.set_title(self.id, title, notify=False) au = unicode(self.authors.text()) if au: self.db.set_authors(self.id, string_to_authors(au), notify=False) aus = unicode(self.author_sort.text()) if aus: self.db.set_aut... | 451,304 |
def __init__(self, parent, items): QDialog.__init__(self, parent) Ui_DeleteMatchingFromDeviceDialog.__init__(self) self.setupUi(self) | def __init__(self, parent, items): QDialog.__init__(self, parent) Ui_DeleteMatchingFromDeviceDialog.__init__(self) self.setupUi(self) | 451,305 |
def __init__(self, parent, items): QDialog.__init__(self, parent) Ui_DeleteMatchingFromDeviceDialog.__init__(self) self.setupUi(self) | def __init__(self, parent, items): QDialog.__init__(self, parent) Ui_DeleteMatchingFromDeviceDialog.__init__(self) self.setupUi(self) | 451,306 |
def __init__(self, parent, items): QDialog.__init__(self, parent) Ui_DeleteMatchingFromDeviceDialog.__init__(self) self.setupUi(self) | def __init__(self, parent, items): QDialog.__init__(self, parent) Ui_DeleteMatchingFromDeviceDialog.__init__(self) self.setupUi(self) | 451,307 |
def setText(self, text): idx = self.findText(text, Qt.MatchFixedString) if idx == -1: self.insertItem(0, text) idx = 0 self.setCurrentIndex(idx) | def setText(self, text): idx = self.findText(text, Qt.MatchFixedString|Qt.MatchCaseSensitive) if idx == -1: self.insertItem(0, text) idx = 0 self.setCurrentIndex(idx) | 451,308 |
def rasterize_svg(self, elem, width=0, height=0, format='PNG'): data = QByteArray(xml2str(elem, with_tail=False)) svg = QSvgRenderer(data) size = svg.defaultSize() view_box = elem.get('viewBox', elem.get('viewbox', None)) if size.width() == 100 and size.height() == 100 \ and view_box is not None: box = [float(x) for x ... | def rasterize_svg(self, elem, width=0, height=0, format='PNG'): data = QByteArray(xml2str(elem, with_tail=False)) svg = QSvgRenderer(data) size = svg.defaultSize() if size.width() == 100 and size.height() == 100 and sizes: size.setWidth(sizes[0]) size.setHeight(sizes[1]) if width or height: size.scale(width, height, Qt... | 451,309 |
def rasterize_svg(self, elem, width=0, height=0, format='PNG'): data = QByteArray(xml2str(elem, with_tail=False)) svg = QSvgRenderer(data) size = svg.defaultSize() view_box = elem.get('viewBox', elem.get('viewbox', None)) if size.width() == 100 and size.height() == 100 \ and view_box is not None: box = [float(x) for x ... | def rasterize_svg(self, elem, width=0, height=0, format='PNG'): data = QByteArray(xml2str(elem, with_tail=False)) svg = QSvgRenderer(data) size = svg.defaultSize() view_box = elem.get('viewBox', elem.get('viewbox', None)) if size.width() == 100 and size.height() == 100 \ and view_box is not None: box = [float(x) for x ... | 451,310 |
def remove(self, item): """Removes :param:`item` from the manifest.""" if item in self.ids: item = self.ids[item] del self.ids[item.id] del self.hrefs[item.href] self.items.remove(item) if item in self.oeb.spine: self.oeb.spine.remove(item) | def remove(self, item): """Removes :param:`item` from the manifest.""" if item in self.ids: item = self.ids[item] del self.ids[item.id] if item.href in self.hrefs: del self.hrefs[item.href] self.items.remove(item) if item in self.oeb.spine: self.oeb.spine.remove(item) | 451,311 |
def initialize(self, _search_box, colorize=False, help_text=_('Search')): self.search_box = _search_box self.line_edit.setPlaceholderText(help_text) self.colorize = colorize self.clear() | def initialize(self, _search_box, colorize=False, help_text=_('Search')): self.search_box = _search_box try: self.line_edit.setPlaceholderText(help_text) except: pass self.colorize = colorize self.clear() | 451,312 |
def widget_factory(type, col): if bulk: w = bulk_widgets[type](db, col, parent) else: w = widgets[type](db, col, parent) w.initialize(book_id) return w | def widget_factory(type, col): if bulk: w = bulk_widgets[type](db, col, parent) else: w = widgets[type](db, col, parent) w.initialize(book_id) return w | 451,313 |
def __init__(self, username, password, isbn, timeout, title, author): self.username = username.strip() if username else username self.password = password.strip() if password else password self.timeout = timeout self.isbn = isbn self.title = title self.needs_isbn = False self.author = author QThread.__init__(self) self.... | def __init__(self, username, password, isbn, timeout, title, author): self.username = username.strip() if username else username self.password = password.strip() if password else password self.timeout = timeout self.isbn = isbn self.title = title self.needs_isbn = False self.author = author QThread.__init__(self) self.... | 451,314 |
def fetch_cover(self): isbn = re.sub(r'[^0-9a-zA-Z]', '', unicode(self.isbn.text())).strip() self.fetch_cover_button.setEnabled(False) self.setCursor(Qt.WaitCursor) title, author = map(unicode, (self.title.text(), self.authors.text())) self.cover_fetcher = CoverFetcher(None, None, isbn, self.timeout, title, author) s... | def fetch_cover(self): isbn = re.sub(r'[^0-9a-zA-Z]', '', unicode(self.isbn.text())).strip() self.fetch_cover_button.setEnabled(False) self.setCursor(Qt.WaitCursor) title, author = map(unicode, (self.title.text(), self.authors.text())) self.cover_fetcher = CoverFetcher(None, None, isbn, self.timeout, title, author) s... | 451,315 |
def hangcheck(self): if not self.cover_fetcher.isFinished() and \ time.time()-self.cf_start_time < self.COVER_FETCH_TIMEOUT: return | def hangcheck(self): if self.cover_fetcher.is_alive() and \ time.time()-self.cf_start_time < self.COVER_FETCH_TIMEOUT: return | 451,316 |
def hangcheck(self): if not self.cover_fetcher.isFinished() and \ time.time()-self.cf_start_time < self.COVER_FETCH_TIMEOUT: return | def hangcheck(self): if not self.cover_fetcher.isFinished() and \ time.time()-self.cf_start_time < self.COVER_FETCH_TIMEOUT: return | 451,317 |
def __init__(self, library_path, row_factory=False): if not os.path.exists(library_path): os.makedirs(library_path) self.listeners = set([]) self.library_path = os.path.abspath(library_path) self.row_factory = row_factory self.dbpath = os.path.join(library_path, 'metadata.db') self.dbpath = os.environ.get('CALIBRE_OVER... | def __init__(self, library_path, row_factory=False): if not os.path.exists(library_path): os.makedirs(library_path) self.listeners = set([]) self.library_path = os.path.abspath(library_path) self.row_factory = row_factory self.dbpath = os.path.join(library_path, 'metadata.db') self.dbpath = os.environ.get('CALIBRE_OVER... | 451,318 |
def get_metadata(stream, extract_cover=True): """ Return metadata as a L{MetaInfo} object """ mi = MetaInformation(_('Unknown'), [_('Unknown')]) stream.seek(0) pml = '' if stream.name.endswith('.pmlz'): with TemporaryDirectory('_unpmlz') as tdir: zf = ZipFile(stream) zf.extractall(tdir) pmls = glob.glob(os.path.join(... | def get_metadata(stream, extract_cover=True): """ Return metadata as a L{MetaInfo} object """ mi = MetaInformation(_('Unknown'), [_('Unknown')]) stream.seek(0) pml = '' if stream.name.endswith('.pmlz'): with TemporaryDirectory('_unpmlz') as tdir: zf = ZipFile(stream) zf.extractall(tdir) pmls = glob.glob(os.path.join(... | 451,319 |
def get_metadata(stream, extract_cover=True): """ Return metadata as a L{MetaInfo} object """ mi = MetaInformation(_('Unknown'), [_('Unknown')]) stream.seek(0) pml = '' if stream.name.endswith('.pmlz'): with TemporaryDirectory('_unpmlz') as tdir: zf = ZipFile(stream) zf.extractall(tdir) pmls = glob.glob(os.path.join(... | def get_metadata(stream, extract_cover=True): """ Return metadata as a L{MetaInfo} object """ mi = MetaInformation(_('Unknown'), [_('Unknown')]) stream.seek(0) pml = '' if stream.name.endswith('.pmlz'): with TemporaryDirectory('_unpmlz') as tdir: zf = ZipFile(stream) zf.extractall(tdir) pmls = glob.glob(os.path.join(... | 451,320 |
def get_metadata(stream, extract_cover=True): """ Return metadata as a L{MetaInfo} object """ mi = MetaInformation(_('Unknown'), [_('Unknown')]) stream.seek(0) pml = '' if stream.name.endswith('.pmlz'): with TemporaryDirectory('_unpmlz') as tdir: zf = ZipFile(stream) zf.extractall(tdir) pmls = glob.glob(os.path.join(... | def get_metadata(stream, extract_cover=True): """ Return metadata as a L{MetaInfo} object """ mi = MetaInformation(_('Unknown'), [_('Unknown')]) stream.seek(0) pml = '' if stream.name.endswith('.pmlz'): with TemporaryDirectory('_unpmlz') as tdir: zf = ZipFile(stream) zf.extractall(tdir) pmls = glob.glob(os.path.join(... | 451,321 |
def get_metadata(stream, extract_cover=True): """ Return metadata as a L{MetaInfo} object """ mi = MetaInformation(_('Unknown'), [_('Unknown')]) stream.seek(0) pml = '' if stream.name.endswith('.pmlz'): with TemporaryDirectory('_unpmlz') as tdir: zf = ZipFile(stream) zf.extractall(tdir) pmls = glob.glob(os.path.join(... | def get_metadata(stream, extract_cover=True): """ Return metadata as a L{MetaInfo} object """ mi = MetaInformation(_('Unknown'), [_('Unknown')]) stream.seek(0) pml = '' if stream.name.endswith('.pmlz'): with TemporaryDirectory('_unpmlz') as tdir: zf = ZipFile(stream) zf.extractall(tdir) pmls = glob.glob(os.path.join(... | 451,322 |
def get_metadata(stream, extract_cover=True): """ Return metadata as a L{MetaInfo} object """ mi = MetaInformation(_('Unknown'), [_('Unknown')]) stream.seek(0) pml = '' if stream.name.endswith('.pmlz'): with TemporaryDirectory('_unpmlz') as tdir: zf = ZipFile(stream) zf.extractall(tdir) pmls = glob.glob(os.path.join(... | def get_metadata(stream, extract_cover=True): """ Return metadata as a L{MetaInfo} object """ mi = MetaInformation(_('Unknown'), [_('Unknown')]) stream.seek(0) pml = '' if stream.name.endswith('.pmlz'): with TemporaryDirectory('_unpmlz') as tdir: zf = ZipFile(stream) zf.extractall(tdir) pmls = glob.glob(os.path.join(... | 451,323 |
def run(self, path_to_output, opts, db, notification=DummyReporter()): from calibre.utils.logging import Log | def run(self, path_to_output, opts, db, notification=DummyReporter()): from calibre.utils.logging import Log | 451,324 |
def numberTranslate(self): hundredsNumber = 0 thousandsNumber = 0 hundredsString = "" thousandsString = "" resultString = "" | def numberTranslate(self): hundredsNumber = 0 thousandsNumber = 0 hundredsString = "" thousandsString = "" resultString = "" | 451,325 |
def numberTranslate(self): hundredsNumber = 0 thousandsNumber = 0 hundredsString = "" thousandsString = "" resultString = "" | def numberTranslate(self): hundredsNumber = 0 thousandsNumber = 0 hundredsString = "" thousandsString = "" resultString = "" | 451,326 |
def numberTranslate(self): hundredsNumber = 0 thousandsNumber = 0 hundredsString = "" thousandsString = "" resultString = "" | def numberTranslate(self): hundredsNumber = 0 thousandsNumber = 0 hundredsString = "" thousandsString = "" resultString = "" | 451,327 |
def numberTranslate(self): hundredsNumber = 0 thousandsNumber = 0 hundredsString = "" thousandsString = "" resultString = "" | def numberTranslate(self): hundredsNumber = 0 thousandsNumber = 0 hundredsString = "" thousandsString = "" resultString = "" | 451,328 |
def numberTranslate(self): hundredsNumber = 0 thousandsNumber = 0 hundredsString = "" thousandsString = "" resultString = "" | defnumberTranslate(self):hundredsNumber=0thousandsNumber=0hundredsString=""thousandsString=""resultString="" | 451,329 |
def __init__(self, db, opts, plugin, notification=DummyReporter(), stylesheet="content/stylesheet.css"): self.__opts = opts self.__authors = None self.__basename = opts.basename self.__booksByAuthor = None self.__booksByTitle = None self.__catalogPath = PersistentTemporaryDirectory("_epub_mobi_catalog", prefix='') self... | def __init__(self, db, opts, plugin, notification=DummyReporter(), stylesheet="content/stylesheet.css"): self.__opts = opts self.__authors = None self.__basename = opts.basename self.__booksByAuthor = None self.__booksByTitle = None self.__catalogPath = PersistentTemporaryDirectory("_epub_mobi_catalog", prefix='') self... | 451,330 |
def __init__(self, db, opts, plugin, notification=DummyReporter(), stylesheet="content/stylesheet.css"): self.__opts = opts self.__authors = None self.__basename = opts.basename self.__booksByAuthor = None self.__booksByTitle = None self.__catalogPath = PersistentTemporaryDirectory("_epub_mobi_catalog", prefix='') self... | def if self.verbose: print "CatalogBuilder(): Generating %s for %s" % (self.opts.fmt, self.opts.output_profile) __init__(self, if self.verbose: print "CatalogBuilder(): Generating %s for %s" % (self.opts.fmt, self.opts.output_profile) db, if self.verbose: print "CatalogBuilder(): Generating %s for %s" % (self.opts.fm... | 451,331 |
def databaseSnapshot(self): def fget(self): return self.__databaseSnapshot def fset(self, val): self.__databaseSnapshot = val return property(fget=fget, fset=fset) | def databaseSnapshot(self): def fget(self): return self.__databaseSnapshot def fset(self, val): self.__databaseSnapshot = val return property(fget=fget, fset=fset) | 451,332 |
def generateForMobigen(self): def fget(self): return self.__generateForMobigen def fset(self, val): self.__generateForMobigen = val return property(fget=fget, fset=fset) | def generateForKindle(self): def fget(self): return self.__generateForKindle def fset(self, val): self.__generateForMobigen = val return property(fget=fget, fset=fset) | 451,333 |
def fset(self, val): self.__generateForMobigen = val | def fset(self, val): self.__generateForMobigen = val | 451,334 |
def buildSources(self): if getattr(self.reporter, 'cancel_requested', False): return 1 if not self.booksByTitle: self.fetchBooksByTitle() | def buildSources(self): if getattr(self.reporter, 'cancel_requested', False): return 1 if not self.booksByTitle: self.fetchBooksByTitle() | 451,335 |
def buildSources(self): if getattr(self.reporter, 'cancel_requested', False): return 1 if not self.booksByTitle: self.fetchBooksByTitle() | def buildSources(self): if getattr(self.reporter, 'cancel_requested', False): return 1 if not self.booksByTitle: self.fetchBooksByTitle() | 451,336 |
def fetchBooksByAuthor(self): # Generate a list of titles sorted by author from the database | def fetchBooksByAuthor(self): # Generate a list of titles sorted by author from the database | 451,337 |
def fetchBooksByAuthor(self): # Generate a list of titles sorted by author from the database | def fetchBooksByAuthor(self): # Generate a list of titles sorted by author from the database | 451,338 |
def fetchBooksByAuthor(self): # Generate a list of titles sorted by author from the database | def fetchBooksByAuthor(self): # Generate a list of titles sorted by author from the database | 451,339 |
def fetchBooksByAuthor(self): # Generate a list of titles sorted by author from the database | def fetchBooksByAuthor(self): # Generate a list of titles sorted by author from the database | 451,340 |
def fetchBooksByAuthor(self): # Generate a list of titles sorted by author from the database | def fetchBooksByAuthor(self): # Generate a list of titles sorted by author from the database | 451,341 |
def fetchBooksByAuthor(self): # Generate a list of titles sorted by author from the database | def fetchBooksByAuthor(self): # Generate a list of titles sorted by author from the database | 451,342 |
def generateHTMLDescriptions(self): # Write each title to a separate HTML file in contentdir if self.verbose: print self.updateProgressFullStep("generateHTMLDescriptions()") | def generateHTMLDescriptions(self): # Write each title to a separate HTML file in contentdir if self.verbose: print self.updateProgressFullStep("generateHTMLDescriptions()") | 451,343 |
def generateOPF(self): | def generateOPF(self): | 451,344 |
def generateNCXDescriptions(self, tocTitle): | def generateNCXDescriptions(self, tocTitle): | 451,345 |
def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | 451,346 |
def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | defgenerateNCXByTitle(self,tocTitle,single_article_per_section=True): | 451,347 |
def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | 451,348 |
def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | 451,349 |
def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | 451,350 |
def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | 451,351 |
def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | defgenerateNCXByTitle(self,tocTitle,single_article_per_section=True): | 451,352 |
def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | 451,353 |
def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | 451,354 |
def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | 451,355 |
def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | def generateNCXByTitle(self, tocTitle, single_article_per_section=True): | 451,356 |
def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | 451,357 |
def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | 451,358 |
def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | defgenerateNCXByAuthor(self,tocTitle,single_article_per_section=True): | 451,359 |
def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | 451,360 |
def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | 451,361 |
def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | 451,362 |
def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | 451,363 |
def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | defgenerateNCXByAuthor(self,tocTitle,single_article_per_section=True): | 451,364 |
def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | 451,365 |
def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | 451,366 |
def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | 451,367 |
def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | def generateNCXByAuthor(self, tocTitle, single_article_per_section=True): | 451,368 |
def generateNCXByTags(self, tocTitle): # Create an NCX section for 'By Genre' # Add each genre as an article # 'tag', 'file', 'authors' | def generateNCXByTags(self, tocTitle): # Create an NCX section for 'By Genre' # Add each genre as an article # 'tag', 'file', 'authors' | 451,369 |
def writeDatabaseSnapshot(self): # Pickle the current databaseSnapshot pickleFile = open(os.path.join(self.fetchLibraryPath(),self.__dbs_fname),'w') pickle.dump(self.databaseSnapshot,pickleFile) pickleFile.close() | def writeDatabaseSnapshot(self): # Pickle the current databaseSnapshot pickleFile = open(os.path.join(self.fetchLibraryPath(),self.__dbs_fname),'w') pickle.dump(self.databaseSnapshot,pickleFile) pickleFile.close() | 451,370 |
def createDirectoryStructure(self): catalogPath = self.catalogPath self.cleanUp() | def createDirectoryStructure(self): catalogPath = self.catalogPath self.cleanUp() | 451,371 |
def run(self, path_to_output, opts, db, notification=DummyReporter()): from calibre.utils.logging import Log | def run(self, path_to_output, opts, db, notification=DummyReporter()): from calibre.utils.logging import Log | 451,372 |
def run(self, path_to_output, opts, db, notification=DummyReporter()): from calibre.utils.logging import Log | def run(self, path_to_output, opts, db, notification=DummyReporter()): from calibre.utils.logging import Log | 451,373 |
def run(self, path_to_output, opts, db, notification=DummyReporter()): from calibre.utils.logging import Log | def run(self, path_to_output, opts, db, notification=DummyReporter()): from calibre.utils.logging import Log | 451,374 |
def tags_to_string(cls, tags): return u'%s <br/><span style="color: white">%s</span>' % (', '.join(tags), 'ttt '.join(tags)+'ttt ') | def tags_to_string(cls, tags): return u'%s <br/><span style="color: white">%s</span>' % (', '.join(tags), 'ttt '.join(tags)+'ttt ') | 451,375 |
def _update_epub_metadata(self, fpath, metadata): ''' ''' self.log.info(" ITUNES._update_epub_metadata()") | def _update_epub_metadata(self, fpath, metadata): ''' ''' self.log.info(" ITUNES._update_epub_metadata()") | 451,376 |
def _update_epub_metadata(self, fpath, metadata): ''' ''' self.log.info(" ITUNES._update_epub_metadata()") | def _update_epub_metadata(self, fpath, metadata): ''' ''' self.log.info(" ITUNES._update_epub_metadata()") | 451,377 |
def __init__(self, args, db, ids, callback): Thread.__init__(self) self.args = args self.db = db self.ids = ids self.error = None self.callback = callback | def __init__(self, args, db, ids, cc_widgets, callback): Thread.__init__(self) self.args = args self.db = db self.ids = ids self.error = None self.callback = callback | 451,378 |
def doit(self): remove, add, au, aus, do_aus, rating, pub, do_series, \ do_autonumber, do_remove_format, remove_format, do_swap_ta, \ do_remove_conv, do_auto_author, series = self.args | def doit(self): remove, add, au, aus, do_aus, rating, pub, do_series, \ do_autonumber, do_remove_format, remove_format, do_swap_ta, \ do_remove_conv, do_auto_author, series = self.args | 451,379 |
def accept(self): if len(self.ids) < 1: return QDialog.accept(self) | def accept(self): if len(self.ids) < 1: return QDialog.accept(self) | 451,380 |
def upload_books(self, files, names, on_card=None, end_session=True, metadata=None): ''' Upload a list of books to the device. If a file already exists on the device, it should be replaced. This method should raise a L{FreeSpaceError} if there is not enough free space on the device. The text of the FreeSpaceError must ... | def upload_books(self, files, names, on_card=None, end_session=True, metadata=None): ''' Upload a list of books to the device. If a file already exists on the device, it should be replaced. This method should raise a L{FreeSpaceError} if there is not enough free space on the device. The text of the FreeSpaceError must ... | 451,381 |
def upload_books(self, files, names, on_card=None, end_session=True, metadata=None): ''' Upload a list of books to the device. If a file already exists on the device, it should be replaced. This method should raise a L{FreeSpaceError} if there is not enough free space on the device. The text of the FreeSpaceError must ... | def upload_books(self, files, names, on_card=None, end_session=True, metadata=None): ''' Upload a list of books to the device. If a file already exists on the device, it should be replaced. This method should raise a L{FreeSpaceError} if there is not enough free space on the device. The text of the FreeSpaceError must ... | 451,382 |
def eject(self): ''' Un-mount / eject the device from the OS. This does not check if there are pending GUI jobs that need to communicate with the device. ''' if DEBUG: self.log.info("ITUNES:eject(): ejecting '%s'" % self.sources['iPod']) if isosx: self.iTunes.eject(self.sources['iPod']) elif iswindows: try: pythoncom.C... | def eject(self): ''' Un-mount / eject the device from the OS. This does not check if there are pending GUI jobs that need to communicate with the device. ''' if DEBUG: self.log.info("ITUNES:eject(): ejecting '%s'" % self.sources['iPod']) if isosx: self.iTunes.eject(self.sources['iPod']) elif iswindows: try: pythoncom.C... | 451,383 |
def sync_booklists(self, booklists, end_session=True): ''' Update metadata on device. @param booklists: A tuple containing the result of calls to (L{books}(oncard=None), L{books}(oncard='carda'), L{books}(oncard='cardb')). ''' if DEBUG: self.log.info("ITUNES:sync_booklists():") if self.update_needed: if DEBUG: self.log... | def sync_booklists(self, booklists, end_session=True): ''' Update metadata on device. @param booklists: A tuple containing the result of calls to (L{books}(oncard=None), L{books}(oncard='carda'), L{books}(oncard='cardb')). ''' if DEBUG: self.log.info("ITUNES:sync_booklists():") if self.update_needed: if DEBUG: self.log... | 451,384 |
def upload_books(self, files, names, on_card=None, end_session=True, metadata=None): ''' Upload a list of books to the device. If a file already exists on the device, it should be replaced. This method should raise a L{FreeSpaceError} if there is not enough free space on the device. The text of the FreeSpaceError must ... | def upload_books(self, files, names, on_card=None, end_session=True, metadata=None): ''' Upload a list of books to the device. If a file already exists on the device, it should be replaced. This method should raise a L{FreeSpaceError} if there is not enough free space on the device. The text of the FreeSpaceError must ... | 451,385 |
def upload_books(self, files, names, on_card=None, end_session=True, metadata=None): ''' Upload a list of books to the device. If a file already exists on the device, it should be replaced. This method should raise a L{FreeSpaceError} if there is not enough free space on the device. The text of the FreeSpaceError must ... | def upload_books(self, files, names, on_card=None, end_session=True, metadata=None): ''' Upload a list of books to the device. If a file already exists on the device, it should be replaced. This method should raise a L{FreeSpaceError} if there is not enough free space on the device. The text of the FreeSpaceError must ... | 451,386 |
def upload_books(self, files, names, on_card=None, end_session=True, metadata=None): ''' Upload a list of books to the device. If a file already exists on the device, it should be replaced. This method should raise a L{FreeSpaceError} if there is not enough free space on the device. The text of the FreeSpaceError must ... | def upload_books(self, files, names, on_card=None, end_session=True, metadata=None): ''' Upload a list of books to the device. If a file already exists on the device, it should be replaced. This method should raise a L{FreeSpaceError} if there is not enough free space on the device. The text of the FreeSpaceError must ... | 451,387 |
def upload_books(self, files, names, on_card=None, end_session=True, metadata=None): ''' Upload a list of books to the device. If a file already exists on the device, it should be replaced. This method should raise a L{FreeSpaceError} if there is not enough free space on the device. The text of the FreeSpaceError must ... | def upload_books(self, files, names, on_card=None, end_session=True, metadata=None): ''' Upload a list of books to the device. If a file already exists on the device, it should be replaced. This method should raise a L{FreeSpaceError} if there is not enough free space on the device. The text of the FreeSpaceError must ... | 451,388 |
def _find_device_book(self, cached_book): ''' Windows-only method to get a handle to a device book in the current pythoncom session ''' SearchField = ['All','Visible','Artists','Titles','Composers','SongNames'] if iswindows: dev_books = self.iTunes.sources.ItemByName(self.sources['iPod']).Playlists.ItemByName('Books') ... | def _find_device_book(self, cached_book): ''' Windows-only method to get a handle to a device book in the current pythoncom session ''' SearchField = ['All','Visible','Artists','Titles','Composers','SongNames'] if iswindows: dev_books = self.iTunes.sources.ItemByName(self.sources['iPod']).Playlists.ItemByName('Books') ... | 451,389 |
def _find_library_book(self, cached_book): ''' Windows-only method to get a handle to a library book in the current pythoncom session ''' SearchField = ['All','Visible','Artists','Titles','Composers','SongNames'] if iswindows: if DEBUG: self.log.info("ITUNES._find_library_book()") self.log.info(" looking for '%s' by %s... | def _find_library_book(self, cached_book): ''' Windows-only method to get a handle to a library book in the current pythoncom session ''' SearchField = ['All','Visible','Artists','Titles','Composers','SongNames'] if iswindows: if DEBUG: self.log.info("ITUNES._find_library_book()") self.log.info(" looking for '%s' by %s... | 451,390 |
def _generate_thumbnail(self, book_path, book): ''' Convert iTunes artwork to thumbnail Cache generated thumbnails cache_dir = os.path.join(config_dir, 'caches', 'itunes') ''' | def _generate_thumbnail(self, book_path, book): ''' Convert iTunes artwork to thumbnail Cache generated thumbnails cache_dir = os.path.join(config_dir, 'caches', 'itunes') ''' | 451,391 |
def _generate_thumbnail(self, book_path, book): ''' Convert iTunes artwork to thumbnail Cache generated thumbnails cache_dir = os.path.join(config_dir, 'caches', 'itunes') ''' | def _generate_thumbnail(self, book_path, book): ''' Convert iTunes artwork to thumbnail Cache generated thumbnails cache_dir = os.path.join(config_dir, 'caches', 'itunes') ''' | 451,392 |
def _get_device_book_size(self, title, author): ''' Fetch the size of a book stored on the device | def _get_device_book_size(self, title, author): ''' Fetch the size of a book stored on the device | 451,393 |
def _get_device_books(self): ''' Assumes pythoncom wrapper ''' if isosx: if 'iPod' in self.sources: connected_device = self.sources['iPod'] if 'Books' in self.iTunes.sources[connected_device].playlists.name(): return self.iTunes.sources[connected_device].playlists['Books'].file_tracks() return [] | def _get_device_books(self): ''' Assumes pythoncom wrapper for Windows ''' if DEBUG: self.log.info("\nITUNES._get_device_books()") device_books = [] if isosx: if 'iPod' in self.sources: connected_device = self.sources['iPod'] if 'Books' in self.iTunes.sources[connected_device].playlists.name(): return self.iTunes.sour... | 451,394 |
def _get_device_books(self): ''' Assumes pythoncom wrapper ''' if isosx: if 'iPod' in self.sources: connected_device = self.sources['iPod'] if 'Books' in self.iTunes.sources[connected_device].playlists.name(): return self.iTunes.sources[connected_device].playlists['Books'].file_tracks() return [] | def _get_device_books(self): ''' Assumes pythoncom wrapper ''' if isosx: if 'iPod' in self.sources: connected_device = self.sources['iPod'] if 'Books' in self.iTunes.sources[connected_device].playlists.name(): return self.iTunes.sources[connected_device].playlists['Books'].file_tracks() return [] | 451,395 |
def _get_device_books(self): ''' Assumes pythoncom wrapper ''' if isosx: if 'iPod' in self.sources: connected_device = self.sources['iPod'] if 'Books' in self.iTunes.sources[connected_device].playlists.name(): return self.iTunes.sources[connected_device].playlists['Books'].file_tracks() return [] | def _get_device_books(self): ''' Assumes pythoncom wrapper ''' if isosx: if 'iPod' in self.sources: connected_device = self.sources['iPod'] if 'Books' in self.iTunes.sources[connected_device].playlists.name(): return self.iTunes.sources[connected_device].playlists['Books'].file_tracks() return [] | 451,396 |
def _get_library_books(self): ''' Populate a dict of paths from iTunes Library|Books ''' library_books = {} | def _get_library_books(self): ''' Populate a dict of paths from iTunes Library|Books ''' library_books = {} | 451,397 |
def _get_library_books(self): ''' Populate a dict of paths from iTunes Library|Books ''' library_books = {} | def _get_library_books(self): ''' Populate a dict of paths from iTunes Library|Books ''' library_books = {} | 451,398 |
def _get_library_books(self): ''' Populate a dict of paths from iTunes Library|Books ''' library_books = {} | def _get_library_books(self): ''' Populate a dict of paths from iTunes Library|Books ''' library_books = {} | 451,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.