mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/unkn0w7n/calibre
This commit is contained in:
commit
9f10c93890
@ -18,6 +18,12 @@ def resize(x):
|
||||
if '_750' in k:
|
||||
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):
|
||||
data = json.loads(raw)
|
||||
|
||||
@ -26,7 +32,7 @@ def json_to_html(raw):
|
||||
|
||||
auth = '<p class="auth">{}</p>\n'
|
||||
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']]
|
||||
if a:
|
||||
auth = auth.format(', '.join(a) + ' | ' + dt)
|
||||
|
Loading…
x
Reference in New Issue
Block a user