Mercurial > getan
diff scripts/getan-daily-report @ 533:a4044956e08c
scripts/getan-daily-report: improve summary output
* .. by printing the day first, using an YYYYMMDD and localized weekday
abbreviation because this is BER's default format.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Mon, 06 Jan 2020 11:05:43 +0100 |
parents | 11d97a40dfa5 |
children |
line wrap: on
line diff
--- a/scripts/getan-daily-report Fri Jun 14 16:11:47 2019 +0200 +++ b/scripts/getan-daily-report Mon Jan 06 11:05:43 2020 +0100 @@ -21,11 +21,16 @@ import argparse import datetime +import locale import logging import sqlite3 factor = {'privat': 0} +# sets the locale for all categories to the user’s default setting +#(typically specified in the LANG environment variable). +locale.setlocale(locale.LC_ALL, '') + l = logging l.basicConfig(level=logging.INFO, # l.basicConfig(level=logging.DEBUG, @@ -165,6 +170,7 @@ total_time += length task_total[e[1]] += length + print(report_range_start.strftime("%Y%m%d %a"), end=" ") print("(" + hhhmm_from_timedelta(total_time).strip() + ")") for t in tasks: if task_total[t] != datetime.timedelta(0):