mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #7376 (E-Book Catalog Option Request: Wish List Books)
This commit is contained in:
commit
335090a584
@ -81,6 +81,14 @@ p.unread_book {
|
|||||||
text-indent:-2em;
|
text-indent:-2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.missing_book {
|
||||||
|
text-align:left;
|
||||||
|
margin-top:0px;
|
||||||
|
margin-bottom:0px;
|
||||||
|
margin-left:2em;
|
||||||
|
text-indent:-2em;
|
||||||
|
}
|
||||||
|
|
||||||
p.date_read {
|
p.date_read {
|
||||||
text-align:left;
|
text-align:left;
|
||||||
margin-top:0px;
|
margin-top:0px;
|
||||||
|
@ -250,8 +250,11 @@ class OutputProfile(Plugin):
|
|||||||
#: If True, the date is appended to the title of downloaded news
|
#: If True, the date is appended to the title of downloaded news
|
||||||
periodical_date_in_title = True
|
periodical_date_in_title = True
|
||||||
|
|
||||||
#: The character used to represent a star in ratings
|
#: Characters used in jackets and catalogs
|
||||||
|
missing_char = u'x'
|
||||||
ratings_char = u'*'
|
ratings_char = u'*'
|
||||||
|
empty_ratings_char = u' '
|
||||||
|
read_char = u'+'
|
||||||
|
|
||||||
#: Unsupported unicode characters to be replaced during preprocessing
|
#: Unsupported unicode characters to be replaced during preprocessing
|
||||||
unsupported_unicode_chars = []
|
unsupported_unicode_chars = []
|
||||||
@ -287,7 +290,12 @@ class iPadOutput(OutputProfile):
|
|||||||
'macros': {'border-width': '{length}|medium|thick|thin'}
|
'macros': {'border-width': '{length}|medium|thick|thin'}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
ratings_char = u'\u2605'
|
|
||||||
|
missing_char = u'\u2715\u200a' # stylized 'x' plus hair space
|
||||||
|
ratings_char = u'\u2605' # filled star
|
||||||
|
empty_ratings_char = u'\u2606' # hollow star
|
||||||
|
read_char = u'\u2713' # check mark
|
||||||
|
|
||||||
touchscreen = True
|
touchscreen = True
|
||||||
# touchscreen_news_css {{{
|
# touchscreen_news_css {{{
|
||||||
touchscreen_news_css = u'''
|
touchscreen_news_css = u'''
|
||||||
@ -498,7 +506,6 @@ class SonyReaderLandscapeOutput(SonyReaderOutput):
|
|||||||
screen_size = (784, 1012)
|
screen_size = (784, 1012)
|
||||||
comic_screen_size = (784, 1012)
|
comic_screen_size = (784, 1012)
|
||||||
|
|
||||||
|
|
||||||
class MSReaderOutput(OutputProfile):
|
class MSReaderOutput(OutputProfile):
|
||||||
|
|
||||||
name = 'Microsoft Reader'
|
name = 'Microsoft Reader'
|
||||||
@ -582,7 +589,12 @@ class KindleOutput(OutputProfile):
|
|||||||
fsizes = [12, 12, 14, 16, 18, 20, 22, 24]
|
fsizes = [12, 12, 14, 16, 18, 20, 22, 24]
|
||||||
supports_mobi_indexing = True
|
supports_mobi_indexing = True
|
||||||
periodical_date_in_title = False
|
periodical_date_in_title = False
|
||||||
|
|
||||||
|
missing_char = u'x\u2009'
|
||||||
|
empty_ratings_char = u'\u2606'
|
||||||
ratings_char = u'\u2605'
|
ratings_char = u'\u2605'
|
||||||
|
read_char = u'\u2713'
|
||||||
|
|
||||||
mobi_ems_per_blockquote = 2.0
|
mobi_ems_per_blockquote = 2.0
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -603,6 +615,8 @@ class KindleDXOutput(OutputProfile):
|
|||||||
#comic_screen_size = (741, 1022)
|
#comic_screen_size = (741, 1022)
|
||||||
supports_mobi_indexing = True
|
supports_mobi_indexing = True
|
||||||
periodical_date_in_title = False
|
periodical_date_in_title = False
|
||||||
|
ratings_char = u'\u2605'
|
||||||
|
read_char = u'\2713'
|
||||||
mobi_ems_per_blockquote = 2.0
|
mobi_ems_per_blockquote = 2.0
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -299,7 +299,7 @@ def generate_catalog(parent, dbspec, ids, device_manager):
|
|||||||
]
|
]
|
||||||
out.close()
|
out.close()
|
||||||
|
|
||||||
# This returns to gui2.ui:generate_catalog()
|
# This returns to gui2.actions.catalog:generate_catalog()
|
||||||
# Which then calls gui2.convert.gui_conversion:gui_catalog() with the args inline
|
# Which then calls gui2.convert.gui_conversion:gui_catalog() with the args inline
|
||||||
return 'gui_catalog', args, _('Generate catalog'), out.name, d.catalog_sync, \
|
return 'gui_catalog', args, _('Generate catalog'), out.name, d.catalog_sync, \
|
||||||
d.catalog_title
|
d.catalog_title
|
||||||
|
@ -827,6 +827,9 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
'[<source>] : Source of content (e.g., Amazon, Project Gutenberg). Do not create genre
|
'[<source>] : Source of content (e.g., Amazon, Project Gutenberg). Do not create genre
|
||||||
|
|
||||||
- Program flow
|
- Program flow
|
||||||
|
gui2.actions.catalog:generate_catalog()
|
||||||
|
gui2.tools:generate_catalog() or library.cli:command_catalog()
|
||||||
|
called from gui2.convert.gui_conversion:gui_catalog()
|
||||||
catalog = Catalog(notification=Reporter())
|
catalog = Catalog(notification=Reporter())
|
||||||
catalog.createDirectoryStructure()
|
catalog.createDirectoryStructure()
|
||||||
catalog.copyResources()
|
catalog.copyResources()
|
||||||
@ -878,6 +881,7 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
self.__htmlFileList = []
|
self.__htmlFileList = []
|
||||||
self.__markerTags = self.getMarkerTags()
|
self.__markerTags = self.getMarkerTags()
|
||||||
self.__ncxSoup = None
|
self.__ncxSoup = None
|
||||||
|
self.__output_profile = None
|
||||||
self.__playOrder = 1
|
self.__playOrder = 1
|
||||||
self.__plugin = plugin
|
self.__plugin = plugin
|
||||||
self.__progressInt = 0.0
|
self.__progressInt = 0.0
|
||||||
@ -892,6 +896,12 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
self.__useSeriesPrefixInTitlesSection = False
|
self.__useSeriesPrefixInTitlesSection = False
|
||||||
self.__verbose = opts.verbose
|
self.__verbose = opts.verbose
|
||||||
|
|
||||||
|
from calibre.customize.ui import output_profiles
|
||||||
|
for profile in output_profiles():
|
||||||
|
if profile.short_name == self.opts.output_profile:
|
||||||
|
self.__output_profile = profile
|
||||||
|
break
|
||||||
|
|
||||||
# Tweak build steps based on optional sections: 1 call for HTML, 1 for NCX
|
# Tweak build steps based on optional sections: 1 call for HTML, 1 for NCX
|
||||||
if self.opts.generate_titles:
|
if self.opts.generate_titles:
|
||||||
self.__totalSteps += 2
|
self.__totalSteps += 2
|
||||||
@ -1163,10 +1173,14 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
return property(fget=fget, fset=fset)
|
return property(fget=fget, fset=fset)
|
||||||
|
|
||||||
@dynamic_property
|
@dynamic_property
|
||||||
|
def MISSING_SYMBOL(self):
|
||||||
|
def fget(self):
|
||||||
|
return self.__output_profile.missing_char
|
||||||
|
return property(fget=fget)
|
||||||
|
@dynamic_property
|
||||||
def NOT_READ_SYMBOL(self):
|
def NOT_READ_SYMBOL(self):
|
||||||
def fget(self):
|
def fget(self):
|
||||||
return '<span style="color:white">✓</span>' if self.generateForKindle else \
|
return '<span style="color:white">%s</span>' % self.__output_profile.read_char
|
||||||
'<span style="color:white">%s</span>' % self.opts.read_tag
|
|
||||||
return property(fget=fget)
|
return property(fget=fget)
|
||||||
@dynamic_property
|
@dynamic_property
|
||||||
def READING_SYMBOL(self):
|
def READING_SYMBOL(self):
|
||||||
@ -1177,18 +1191,17 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
@dynamic_property
|
@dynamic_property
|
||||||
def READ_SYMBOL(self):
|
def READ_SYMBOL(self):
|
||||||
def fget(self):
|
def fget(self):
|
||||||
return '<span style="color:black">✓</span>' if self.generateForKindle else \
|
return self.__output_profile.read_char
|
||||||
'<span style="color:black">%s</span>' % self.opts.read_tag
|
|
||||||
return property(fget=fget)
|
return property(fget=fget)
|
||||||
@dynamic_property
|
@dynamic_property
|
||||||
def FULL_RATING_SYMBOL(self):
|
def FULL_RATING_SYMBOL(self):
|
||||||
def fget(self):
|
def fget(self):
|
||||||
return "★" if self.generateForKindle else "*"
|
return self.__output_profile.ratings_char
|
||||||
return property(fget=fget)
|
return property(fget=fget)
|
||||||
@dynamic_property
|
@dynamic_property
|
||||||
def EMPTY_RATING_SYMBOL(self):
|
def EMPTY_RATING_SYMBOL(self):
|
||||||
def fget(self):
|
def fget(self):
|
||||||
return "☆" if self.generateForKindle else ' '
|
return self.__output_profile.empty_ratings_char
|
||||||
return property(fget=fget)
|
return property(fget=fget)
|
||||||
@dynamic_property
|
@dynamic_property
|
||||||
def READ_PROGRESS_SYMBOL(self):
|
def READ_PROGRESS_SYMBOL(self):
|
||||||
@ -1621,13 +1634,16 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
self.generateAuthorAnchor(title['author']))
|
self.generateAuthorAnchor(title['author']))
|
||||||
aTag.insert(0, title['author'])
|
aTag.insert(0, title['author'])
|
||||||
|
|
||||||
# Prefix author with read/reading/none symbol
|
# Prefix author with read|reading|none symbol or missing symbol
|
||||||
if title['read']:
|
if 'formats' in title and title['formats']:
|
||||||
authorTag.insert(0, NavigableString(self.READ_SYMBOL + "by "))
|
if title['read']:
|
||||||
elif self.opts.connected_kindle and title['id'] in self.bookmarked_books:
|
authorTag.insert(0, NavigableString(self.READ_SYMBOL + " by "))
|
||||||
authorTag.insert(0, NavigableString(self.READING_SYMBOL + " by "))
|
elif self.opts.connected_kindle and title['id'] in self.bookmarked_books:
|
||||||
|
authorTag.insert(0, NavigableString(self.READING_SYMBOL + " by "))
|
||||||
|
else:
|
||||||
|
authorTag.insert(0, NavigableString(self.NOT_READ_SYMBOL + " by "))
|
||||||
else:
|
else:
|
||||||
authorTag.insert(0, NavigableString(self.NOT_READ_SYMBOL + "by "))
|
authorTag.insert(0, NavigableString(self.MISSING_SYMBOL + " by "))
|
||||||
authorTag.insert(1, aTag)
|
authorTag.insert(1, aTag)
|
||||||
|
|
||||||
'''
|
'''
|
||||||
@ -1661,7 +1677,7 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
fontTag['style'] = 'color:white;font-size:large'
|
fontTag['style'] = 'color:white;font-size:large'
|
||||||
if self.opts.fmt == 'epub':
|
if self.opts.fmt == 'epub':
|
||||||
fontTag['style'] += ';opacity: 0.0'
|
fontTag['style'] += ';opacity: 0.0'
|
||||||
fontTag.insert(0, NavigableString("by "))
|
fontTag.insert(0, NavigableString(" by "))
|
||||||
tagsTag.insert(ttc, fontTag)
|
tagsTag.insert(ttc, fontTag)
|
||||||
ttc += 1
|
ttc += 1
|
||||||
|
|
||||||
@ -1814,21 +1830,27 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
pBookTag = Tag(soup, "p")
|
pBookTag = Tag(soup, "p")
|
||||||
ptc = 0
|
ptc = 0
|
||||||
|
|
||||||
# book with read/reading/unread symbol
|
# book with read|reading|unread symbol or missing symbol
|
||||||
if book['read']:
|
if 'formats' in book and book['formats']:
|
||||||
# check mark
|
if book['read']:
|
||||||
pBookTag.insert(ptc,NavigableString(self.READ_SYMBOL))
|
# check mark
|
||||||
pBookTag['class'] = "read_book"
|
pBookTag.insert(ptc,NavigableString(self.READ_SYMBOL))
|
||||||
ptc += 1
|
pBookTag['class'] = "read_book"
|
||||||
elif book['id'] in self.bookmarked_books:
|
ptc += 1
|
||||||
pBookTag.insert(ptc,NavigableString(self.READING_SYMBOL))
|
elif book['id'] in self.bookmarked_books:
|
||||||
pBookTag['class'] = "read_book"
|
pBookTag.insert(ptc,NavigableString(self.READING_SYMBOL))
|
||||||
ptc += 1
|
pBookTag['class'] = "read_book"
|
||||||
|
ptc += 1
|
||||||
|
else:
|
||||||
|
# hidden check mark
|
||||||
|
pBookTag['class'] = "unread_book"
|
||||||
|
pBookTag.insert(ptc,NavigableString(self.NOT_READ_SYMBOL))
|
||||||
|
ptc += 1
|
||||||
else:
|
else:
|
||||||
# hidden check mark
|
# missing formats
|
||||||
pBookTag['class'] = "unread_book"
|
pBookTag['class'] = "missing_book"
|
||||||
pBookTag.insert(ptc,NavigableString(self.NOT_READ_SYMBOL))
|
pBookTag.insert(ptc,NavigableString(self.MISSING_SYMBOL))
|
||||||
ptc += 1
|
ptc += 1
|
||||||
|
|
||||||
# Link to book
|
# Link to book
|
||||||
aTag = Tag(soup, "a")
|
aTag = Tag(soup, "a")
|
||||||
@ -1983,20 +2005,26 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
pBookTag = Tag(soup, "p")
|
pBookTag = Tag(soup, "p")
|
||||||
ptc = 0
|
ptc = 0
|
||||||
|
|
||||||
# book with read/reading/unread symbol
|
# book with read|reading|unread symbol or missing symbol
|
||||||
if book['read']:
|
if 'formats' in book and book['formats']:
|
||||||
# check mark
|
if book['read']:
|
||||||
pBookTag.insert(ptc,NavigableString(self.READ_SYMBOL))
|
# check mark
|
||||||
pBookTag['class'] = "read_book"
|
pBookTag.insert(ptc,NavigableString(self.READ_SYMBOL))
|
||||||
ptc += 1
|
pBookTag['class'] = "read_book"
|
||||||
elif book['id'] in self.bookmarked_books:
|
ptc += 1
|
||||||
pBookTag.insert(ptc,NavigableString(self.READING_SYMBOL))
|
elif book['id'] in self.bookmarked_books:
|
||||||
pBookTag['class'] = "read_book"
|
pBookTag.insert(ptc,NavigableString(self.READING_SYMBOL))
|
||||||
ptc += 1
|
pBookTag['class'] = "read_book"
|
||||||
|
ptc += 1
|
||||||
|
else:
|
||||||
|
# hidden check mark
|
||||||
|
pBookTag['class'] = "unread_book"
|
||||||
|
pBookTag.insert(ptc,NavigableString(self.NOT_READ_SYMBOL))
|
||||||
|
ptc += 1
|
||||||
else:
|
else:
|
||||||
# hidden check mark
|
# missing book
|
||||||
pBookTag['class'] = "unread_book"
|
pBookTag['class'] = "missing_book"
|
||||||
pBookTag.insert(ptc,NavigableString(self.NOT_READ_SYMBOL))
|
pBookTag.insert(ptc,NavigableString(self.MISSING_SYMBOL))
|
||||||
ptc += 1
|
ptc += 1
|
||||||
|
|
||||||
aTag = Tag(soup, "a")
|
aTag = Tag(soup, "a")
|
||||||
@ -2111,20 +2139,26 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
pBookTag = Tag(soup, "p")
|
pBookTag = Tag(soup, "p")
|
||||||
ptc = 0
|
ptc = 0
|
||||||
|
|
||||||
# book with read/reading/unread symbol
|
# book with read|reading|unread symbol or missing symbol
|
||||||
if new_entry['read']:
|
if 'formats' in new_entry and new_entry['formats']:
|
||||||
# check mark
|
if new_entry['read']:
|
||||||
pBookTag.insert(ptc,NavigableString(self.READ_SYMBOL))
|
# check mark
|
||||||
pBookTag['class'] = "read_book"
|
pBookTag.insert(ptc,NavigableString(self.READ_SYMBOL))
|
||||||
ptc += 1
|
pBookTag['class'] = "read_book"
|
||||||
elif new_entry['id'] in self.bookmarked_books:
|
ptc += 1
|
||||||
pBookTag.insert(ptc,NavigableString(self.READING_SYMBOL))
|
elif new_entry['id'] in self.bookmarked_books:
|
||||||
pBookTag['class'] = "read_book"
|
pBookTag.insert(ptc,NavigableString(self.READING_SYMBOL))
|
||||||
ptc += 1
|
pBookTag['class'] = "read_book"
|
||||||
|
ptc += 1
|
||||||
|
else:
|
||||||
|
# hidden check mark
|
||||||
|
pBookTag['class'] = "unread_book"
|
||||||
|
pBookTag.insert(ptc,NavigableString(self.NOT_READ_SYMBOL))
|
||||||
|
ptc += 1
|
||||||
else:
|
else:
|
||||||
# hidden check mark
|
# missing book
|
||||||
pBookTag['class'] = "unread_book"
|
pBookTag['class'] = "missing_book"
|
||||||
pBookTag.insert(ptc,NavigableString(self.NOT_READ_SYMBOL))
|
pBookTag.insert(ptc,NavigableString(self.MISSING_SYMBOL))
|
||||||
ptc += 1
|
ptc += 1
|
||||||
|
|
||||||
aTag = Tag(soup, "a")
|
aTag = Tag(soup, "a")
|
||||||
@ -2157,20 +2191,26 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
pBookTag = Tag(soup, "p")
|
pBookTag = Tag(soup, "p")
|
||||||
ptc = 0
|
ptc = 0
|
||||||
|
|
||||||
# book with read/reading/unread symbol
|
# book with read|reading|unread symbol or missing symbol
|
||||||
if new_entry['read']:
|
if 'formats' in new_entry and new_entry['formats']:
|
||||||
# check mark
|
if new_entry['read']:
|
||||||
pBookTag.insert(ptc,NavigableString(self.READ_SYMBOL))
|
# check mark
|
||||||
pBookTag['class'] = "read_book"
|
pBookTag.insert(ptc,NavigableString(self.READ_SYMBOL))
|
||||||
ptc += 1
|
pBookTag['class'] = "read_book"
|
||||||
elif new_entry['id'] in self.bookmarked_books:
|
ptc += 1
|
||||||
pBookTag.insert(ptc,NavigableString(self.READING_SYMBOL))
|
elif new_entry['id'] in self.bookmarked_books:
|
||||||
pBookTag['class'] = "read_book"
|
pBookTag.insert(ptc,NavigableString(self.READING_SYMBOL))
|
||||||
ptc += 1
|
pBookTag['class'] = "read_book"
|
||||||
|
ptc += 1
|
||||||
|
else:
|
||||||
|
# hidden check mark
|
||||||
|
pBookTag['class'] = "unread_book"
|
||||||
|
pBookTag.insert(ptc,NavigableString(self.NOT_READ_SYMBOL))
|
||||||
|
ptc += 1
|
||||||
else:
|
else:
|
||||||
# hidden check mark
|
# missing book
|
||||||
pBookTag['class'] = "unread_book"
|
pBookTag['class'] = "missing_book"
|
||||||
pBookTag.insert(ptc,NavigableString(self.NOT_READ_SYMBOL))
|
pBookTag.insert(ptc,NavigableString(self.MISSING_SYMBOL))
|
||||||
ptc += 1
|
ptc += 1
|
||||||
|
|
||||||
aTag = Tag(soup, "a")
|
aTag = Tag(soup, "a")
|
||||||
@ -2606,19 +2646,26 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
else:
|
else:
|
||||||
book['read'] = False
|
book['read'] = False
|
||||||
|
|
||||||
if book['read']:
|
# book with read|reading|unread symbol or missing symbol
|
||||||
# check mark
|
if 'formats' in book and book['formats']:
|
||||||
pBookTag.insert(ptc,NavigableString(self.READ_SYMBOL))
|
if book['read']:
|
||||||
pBookTag['class'] = "read_book"
|
# check mark
|
||||||
ptc += 1
|
pBookTag.insert(ptc,NavigableString(self.READ_SYMBOL))
|
||||||
elif book['id'] in self.bookmarked_books:
|
pBookTag['class'] = "read_book"
|
||||||
pBookTag.insert(ptc,NavigableString(self.READING_SYMBOL))
|
ptc += 1
|
||||||
pBookTag['class'] = "read_book"
|
elif book['id'] in self.bookmarked_books:
|
||||||
ptc += 1
|
pBookTag.insert(ptc,NavigableString(self.READING_SYMBOL))
|
||||||
|
pBookTag['class'] = "read_book"
|
||||||
|
ptc += 1
|
||||||
|
else:
|
||||||
|
# hidden check mark
|
||||||
|
pBookTag['class'] = "unread_book"
|
||||||
|
pBookTag.insert(ptc,NavigableString(self.NOT_READ_SYMBOL))
|
||||||
|
ptc += 1
|
||||||
else:
|
else:
|
||||||
# hidden check mark
|
# missing book
|
||||||
pBookTag['class'] = "unread_book"
|
pBookTag['class'] = "missing_book"
|
||||||
pBookTag.insert(ptc,NavigableString(self.NOT_READ_SYMBOL))
|
pBookTag.insert(ptc,NavigableString(self.MISSING_SYMBOL))
|
||||||
ptc += 1
|
ptc += 1
|
||||||
|
|
||||||
aTag = Tag(soup, "a")
|
aTag = Tag(soup, "a")
|
||||||
@ -2697,6 +2744,8 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
this_book['title'] = book['title']
|
this_book['title'] = book['title']
|
||||||
this_book['author_sort'] = book['author_sort'].capitalize()
|
this_book['author_sort'] = book['author_sort'].capitalize()
|
||||||
this_book['read'] = book['read']
|
this_book['read'] = book['read']
|
||||||
|
if 'formats' in book:
|
||||||
|
this_book['formats'] = book['formats']
|
||||||
this_book['id'] = book['id']
|
this_book['id'] = book['id']
|
||||||
this_book['series'] = book['series']
|
this_book['series'] = book['series']
|
||||||
normalized_tag = self.genre_tags_dict[friendly_tag]
|
normalized_tag = self.genre_tags_dict[friendly_tag]
|
||||||
@ -4098,20 +4147,26 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
pBookTag = Tag(soup, "p")
|
pBookTag = Tag(soup, "p")
|
||||||
ptc = 0
|
ptc = 0
|
||||||
|
|
||||||
# book with read/reading/unread symbol
|
# book with read|reading|unread symbol or missing symbol
|
||||||
if book['read']:
|
if 'formats' in book and book['formats']:
|
||||||
# check mark
|
if book['read']:
|
||||||
pBookTag.insert(ptc,NavigableString(self.READ_SYMBOL))
|
# check mark
|
||||||
pBookTag['class'] = "read_book"
|
pBookTag.insert(ptc,NavigableString(self.READ_SYMBOL))
|
||||||
ptc += 1
|
pBookTag['class'] = "read_book"
|
||||||
elif book['id'] in self.bookmarked_books:
|
ptc += 1
|
||||||
pBookTag.insert(ptc,NavigableString(self.READING_SYMBOL))
|
elif book['id'] in self.bookmarked_books:
|
||||||
pBookTag['class'] = "read_book"
|
pBookTag.insert(ptc,NavigableString(self.READING_SYMBOL))
|
||||||
ptc += 1
|
pBookTag['class'] = "read_book"
|
||||||
|
ptc += 1
|
||||||
|
else:
|
||||||
|
# hidden check mark
|
||||||
|
pBookTag['class'] = "unread_book"
|
||||||
|
pBookTag.insert(ptc,NavigableString(self.NOT_READ_SYMBOL))
|
||||||
|
ptc += 1
|
||||||
else:
|
else:
|
||||||
# hidden check mark
|
# missing book
|
||||||
pBookTag['class'] = "unread_book"
|
pBookTag['class'] = "missing_book"
|
||||||
pBookTag.insert(ptc,NavigableString(self.NOT_READ_SYMBOL))
|
pBookTag.insert(ptc,NavigableString(self.MISSING_SYMBOL))
|
||||||
ptc += 1
|
ptc += 1
|
||||||
|
|
||||||
# Add the book title
|
# Add the book title
|
||||||
@ -4570,7 +4625,8 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
|
|
||||||
if opts.connected_device['name'] and 'kindle' in opts.connected_device['name'].lower():
|
if opts.connected_device['name'] and 'kindle' in opts.connected_device['name'].lower():
|
||||||
opts.connected_kindle = True
|
opts.connected_kindle = True
|
||||||
if opts.connected_device['serial'] and opts.connected_device['serial'][:4] in ['B004','B005']:
|
if opts.connected_device['serial'] and \
|
||||||
|
opts.connected_device['serial'][:4] in ['B004','B005']:
|
||||||
op = "kindle_dx"
|
op = "kindle_dx"
|
||||||
else:
|
else:
|
||||||
op = "kindle"
|
op = "kindle"
|
||||||
@ -4633,7 +4689,8 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
build_log.append(" opts:")
|
build_log.append(" opts:")
|
||||||
for key in keys:
|
for key in keys:
|
||||||
if key in ['catalog_title','authorClip','connected_kindle','descriptionClip',
|
if key in ['catalog_title','authorClip','connected_kindle','descriptionClip',
|
||||||
'exclude_genre','exclude_tags','note_tag','numbers_as_text','read_tag',
|
'exclude_genre','exclude_tags','note_tag','numbers_as_text',
|
||||||
|
'output_profile','read_tag',
|
||||||
'search_text','sort_by','sort_descriptions_by_author','sync']:
|
'search_text','sort_by','sort_descriptions_by_author','sync']:
|
||||||
build_log.append(" %s: %s" % (key, opts_dict[key]))
|
build_log.append(" %s: %s" % (key, opts_dict[key]))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user