Mercurial > getan
changeset 556:15a4c471399c 3.5
mereg
author | Magnus Schieder <magnus.schieder@intevation.de> |
---|---|
date | Thu, 23 Apr 2020 21:18:52 +0200 |
parents | 71caaa23d8c4 (current diff) 1a179ed1c9d7 (diff) |
children | 1ff4fd3a773b |
files | |
diffstat | 3 files changed, 30 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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')
--- 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 -%}
--- /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 -%}