1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-24 07:01:30 +02:00

Revisited jacket functions.

This commit is contained in:
2021-03-27 16:35:40 +01:00
parent 6e293ff9dc
commit 6d08cf7da2
4 changed files with 1 additions and 530 deletions
@@ -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