changeset 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 fa1eb72e2764
children 5d4006e3210c
files CHANGES scripts/getan-daily-report
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Fri Jun 14 16:11:47 2019 +0200
+++ b/CHANGES	Mon Jan 06 11:05:43 2020 +0100
@@ -1,3 +1,9 @@
+(unreleased)
+
+ * scripts/getan-daily-report: improve summary output by printing the day
+   first. (Bernhard Reiter)
+
+
 3.3 2019-06-14
 
  * When describing entries, you can now use the arrow keys to select and edit
--- 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):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)