mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
GwR fix for ratings
This commit is contained in:
parent
089f785d93
commit
32a2993c76
@ -14,10 +14,10 @@
|
|||||||
<table width="100%" border="0">
|
<table width="100%" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="thumbnail" rowspan="7"></td>
|
<td class="thumbnail" rowspan="7"></td>
|
||||||
<td> </td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="publisher">{publisher}</td>
|
<td class="publisher">{publisher}</td>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<td class="notes">{note_source}: {note_content}</td>
|
<td class="notes">{note_source}: {note_content}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<hr class="description_divider" />
|
<hr class="description_divider" />
|
||||||
|
@ -4393,21 +4393,21 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
# Publisher
|
# Publisher
|
||||||
publisher = NBSP
|
publisher = ''
|
||||||
if 'publisher' in book:
|
if 'publisher' in book:
|
||||||
publisher = book['publisher']
|
publisher = book['publisher']
|
||||||
|
|
||||||
# Rating
|
# Rating
|
||||||
stars = int(book['rating']) / 2
|
stars = int(book['rating']) / 2
|
||||||
rating = NBSP
|
rating = ''
|
||||||
if stars:
|
if stars:
|
||||||
star_string = self.FULL_RATING_SYMBOL * stars
|
star_string = self.FULL_RATING_SYMBOL * stars
|
||||||
empty_stars = self.EMPTY_RATING_SYMBOL * (5 - stars)
|
empty_stars = self.EMPTY_RATING_SYMBOL * (5 - stars)
|
||||||
rating = '%s%s <br/>' % (star_string,empty_stars)
|
rating = '%s%s <br/>' % (star_string,empty_stars)
|
||||||
|
|
||||||
# Notes
|
# Notes
|
||||||
note_source = NBSP
|
note_source = ''
|
||||||
note_content = NBSP
|
note_content = ''
|
||||||
if 'notes' in book:
|
if 'notes' in book:
|
||||||
note_source = book['notes']['source']
|
note_source = book['notes']['source']
|
||||||
note_content = book['notes']['content']
|
note_content = book['notes']['content']
|
||||||
@ -4449,7 +4449,7 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
formatsTag = body.find('p',attrs={'class':'formats'})
|
formatsTag = body.find('p',attrs={'class':'formats'})
|
||||||
formatsTag.extract()
|
formatsTag.extract()
|
||||||
|
|
||||||
if note_content == NBSP:
|
if note_content == '':
|
||||||
tdTag = body.find('td', attrs={'class':'notes'})
|
tdTag = body.find('td', attrs={'class':'notes'})
|
||||||
tdTag.contents[0].replaceWith(NBSP)
|
tdTag.contents[0].replaceWith(NBSP)
|
||||||
|
|
||||||
@ -4463,6 +4463,18 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
imgTag['alt'] = "cover thumbnail"
|
imgTag['alt'] = "cover thumbnail"
|
||||||
tdTag.insert(0,imgTag)
|
tdTag.insert(0,imgTag)
|
||||||
|
|
||||||
|
'''
|
||||||
|
# Rating
|
||||||
|
stars = int(book['rating']) / 2
|
||||||
|
rating = ''
|
||||||
|
if stars:
|
||||||
|
star_string = self.FULL_RATING_SYMBOL * stars
|
||||||
|
empty_stars = self.EMPTY_RATING_SYMBOL * (5 - stars)
|
||||||
|
rating = '%s%s <br/>' % (star_string,empty_stars)
|
||||||
|
ratingTag = body.find('td',attrs={'class':'rating'})
|
||||||
|
ratingTag.insert(0,NavigableString(rating))
|
||||||
|
'''
|
||||||
|
|
||||||
# The Blurb
|
# The Blurb
|
||||||
if 'description' in book and book['description'] > '':
|
if 'description' in book and book['description'] > '':
|
||||||
blurbTag = body.find(attrs={'class':'description'})
|
blurbTag = body.find(attrs={'class':'description'})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user