humanized time delta
This commit is contained in:
pare
da93574d73
commit
a1540cb4af
S'han modificat 2 arxius amb 4 adicions i 2 eliminacions
|
@ -1,2 +1,2 @@
|
||||||
Mastodon.py
|
Mastodonplus.py
|
||||||
unidecode
|
unidecode
|
||||||
|
|
4
xmpp.py
4
xmpp.py
|
@ -2,6 +2,8 @@ from mastodonbot import Mastodonbot
|
||||||
from ejabberdapi import Ejabberd
|
from ejabberdapi import Ejabberd
|
||||||
from mastodon import MastodonNetworkError
|
from mastodon import MastodonNetworkError
|
||||||
import sys
|
import sys
|
||||||
|
import humanize
|
||||||
|
import datetime as dt
|
||||||
|
|
||||||
# main
|
# main
|
||||||
|
|
||||||
|
@ -85,7 +87,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
post += f'{bot.node_users_str} {stats.onlineusersnode}\n'
|
post += f'{bot.node_users_str} {stats.onlineusersnode}\n'
|
||||||
|
|
||||||
post += f'{bot.uptime_str} {stats.uptimeseconds}\n'
|
post += f'{bot.uptime_str} {humanize.naturaldelta(dt.timedelta(seconds=stats.uptimeseconds))}\n'
|
||||||
|
|
||||||
post += f'{bot.processes_str} {stats.processes}\n'
|
post += f'{bot.processes_str} {stats.processes}\n'
|
||||||
|
|
||||||
|
|
Loading…
Referencia en una nova incidència