mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update liberation.recipe
This commit is contained in:
parent
e00e213ba5
commit
4cbf2bc25b
@ -18,6 +18,12 @@ def resize(x):
|
|||||||
if '_750' in k:
|
if '_750' in k:
|
||||||
return v
|
return v
|
||||||
|
|
||||||
|
m_fr = {
|
||||||
|
1: 'janvier', 2: 'février', 3: 'mars', 4: 'avril',
|
||||||
|
5: 'mai', 6: 'juin', 7: 'juillet', 8: 'août',
|
||||||
|
9: 'septembre', 10: 'octobre', 11: 'novembre', 12: 'décembre'
|
||||||
|
}
|
||||||
|
|
||||||
def json_to_html(raw):
|
def json_to_html(raw):
|
||||||
data = json.loads(raw)
|
data = json.loads(raw)
|
||||||
|
|
||||||
@ -26,7 +32,7 @@ def json_to_html(raw):
|
|||||||
|
|
||||||
auth = '<p class="auth">{}</p>\n'
|
auth = '<p class="auth">{}</p>\n'
|
||||||
dt = datetime.fromisoformat(data['last_updated_date'][:-1]) + timedelta(seconds=time.timezone)
|
dt = datetime.fromisoformat(data['last_updated_date'][:-1]) + timedelta(seconds=time.timezone)
|
||||||
dt = dt.strftime('%b %d, %Y, %H:%M')
|
dt = dt.strftime('%d ' + m_fr[dt.month] + ' %Y')
|
||||||
a = [x['name'] for x in data['credits']['by']]
|
a = [x['name'] for x in data['credits']['by']]
|
||||||
if a:
|
if a:
|
||||||
auth = auth.format(', '.join(a) + ' | ' + dt)
|
auth = auth.format(', '.join(a) + ' | ' + dt)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user