diff options
author | André Glüpker <git@wgmd.de> | 2021-02-16 18:19:42 +0100 |
---|---|---|
committer | André Glüpker <git@wgmd.de> | 2021-02-16 18:19:42 +0100 |
commit | c91e9cb8d8e6f0bf5edc0f5768f8dfd50a23d44f (patch) | |
tree | ffeb133b45336bd8a342797614169e6c2ffe0ad6 /main.py | |
parent | c4db6130dcf2c78b3b0e05bc98d9a830a51dbfe3 (diff) | |
download | steam-c91e9cb8d8e6f0bf5edc0f5768f8dfd50a23d44f.tar.gz steam-c91e9cb8d8e6f0bf5edc0f5768f8dfd50a23d44f.tar.bz2 steam-c91e9cb8d8e6f0bf5edc0f5768f8dfd50a23d44f.zip |
Show some stats and have links on premade finder
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -42,7 +42,10 @@ intervals = ( ('s', 1), ) -def display_time(seconds, granularity=2): +def display_time(timestamp, format="%d.%m.%Y"): + return datetime.datetime.fromtimestamp(timestamp).strftime(format) + +def display_age(seconds, granularity=2): result = [] for name, count in intervals: value = seconds // count @@ -54,6 +57,7 @@ def display_time(seconds, granularity=2): return ' '.join(result[:granularity]) app.jinja_env.filters['display_time'] = display_time +app.jinja_env.filters['display_age'] = display_age def grepSteamids(text): steamids = [] |