Revisited jacket functions.
This commit is contained in:
1 parent
6e293ff9dc
commit
6d08cf7da2
4 files changed
+1
-530
No files matched your search
@@ -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