mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-23 22:51:30 +02:00
Revisited jacket functions.
This commit is contained in:
@@ -425,11 +425,3 @@ def check_doi(doi):
|
||||
if doi_check is not None:
|
||||
return doi_check.group()
|
||||
return None
|
||||
|
||||
|
||||
def rating_to_stars(value, allow_half_stars=False, star='★', half='½'):
|
||||
r = max(0, min(int(value or 0), 10))
|
||||
ans = star * (r // 2)
|
||||
if allow_half_stars and r % 2:
|
||||
ans += half
|
||||
return ans
|
||||
|
||||
Reference in New Issue
Block a user