# HG changeset patch # User Magnus Schieder # Date 1587669532 -7200 # Node ID 15a4c471399ce175d436dd65056b344abc6b7e38 # Parent 71caaa23d8c46f61c7c05105258b6cfd0ffab4a3# Parent 1a179ed1c9d70d2f59e29a80842f47366684547e mereg diff -r 71caaa23d8c4 -r 15a4c471399c getan/main.py --- a/getan/main.py Thu Apr 23 21:09:36 2020 +0200 +++ b/getan/main.py Thu Apr 23 21:18:52 2020 +0200 @@ -57,7 +57,7 @@ help='create databasefile if necessary and exit') parser.add_argument('-d', '--debug', action='store_const', dest='loglevel', default=logging.NOTSET, const=logging.DEBUG, - help='Enable debung mode') + help='set log level to DEBUG') parser.add_argument('-l', '--logfile', help='''write log information to FILE [default: %(default)s]''', default='getan.log') diff -r 71caaa23d8c4 -r 15a4c471399c getan/templates/zeiterfassung-hierarchy1 --- a/getan/templates/zeiterfassung-hierarchy1 Thu Apr 23 21:09:36 2020 +0200 +++ b/getan/templates/zeiterfassung-hierarchy1 Thu Apr 23 21:18:52 2020 +0200 @@ -1,4 +1,4 @@ -{#- using projects keys as zeiterfassungs workpackages +{#- using project keys as zeiterfassung's workpackages -#} {%- for day, day_entries in entries|sort(attribute='startisoday')|groupby('startisoday') -%} @@ -7,15 +7,15 @@ in day_entries|sort(attribute='project_id')|groupby('project_id') %} {%- if project_id == project.id -%} -{{ project_day_entries[0].start|date_format }} {{ (project_day_entries|duration|human_time).rjust(5) - }}h a {{ user.ljust(3) }} [{{ project.key }}] {%- for entry in project_day_entries -%} - {%- if loop.index == 1 -%}{{ ' ' }} - {%- else -%}{{ ';\n ' }} - {%- endif -%} - {{ entry.get_comment() }} - {%- endfor %}{{'\n'}} + {{ entry.start|date_format }} {{ + (entry.get_duration()|human_time).rjust(5) + }}h a {{ user.ljust(3) }} [{{ project.key }}] {{ + entry.get_comment() + }}{{'\n'}} + {%- endfor -%} {%- endif -%} + {%- endfor -%} {%- endfor -%} {% endfor -%} diff -r 71caaa23d8c4 -r 15a4c471399c getan/templates/zeiterfassung-hierarchy2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/getan/templates/zeiterfassung-hierarchy2 Thu Apr 23 21:18:52 2020 +0200 @@ -0,0 +1,21 @@ +{#- using project keys as zeiterfassung's workpackages +-#} +{%- for day, day_entries + in entries|sort(attribute='startisoday')|groupby('startisoday') -%} + {%- for project in projects -%} + {%- for project_id, project_day_entries + in day_entries|sort(attribute='project_id')|groupby('project_id') %} + + {%- if project_id == project.id -%} +{{ project_day_entries[0].start|date_format }} {{ (project_day_entries|duration|human_time).rjust(5) + }}h a {{ user.ljust(3) }} [{{ project.key }}] + {%- for entry in project_day_entries -%} + {%- if loop.index == 1 -%}{{ ' ' }} + {%- else -%}{{ ';\n ' }} + {%- endif -%} + {{ entry.get_comment() }} + {%- endfor %}{{'\n'}} + {%- endif -%} + {%- endfor -%} + {%- endfor -%} +{% endfor -%}