feat: Created chore command

- feat: Added list subcommand for chore
  - feat: Added template for chore/list
This commit is contained in:
Aerex
2019-11-02 00:41:09 -05:00
parent 6d1f3a617a
commit dd6223f980
5 changed files with 99 additions and 35 deletions

7
templates/chore/list.yml Normal file
View File

@@ -0,0 +1,7 @@
{{ 'Chore' }} {{ '%15s'|format('') }} {{ 'Next estimated tracking' }} {{ '%15s'|format('') }} {{ 'Last tracked' }}
{%- for chore in grocy.chores %}
{{ chore.fields.name }} {{ '%15s'|format('') }}{%- if '2999-' in chore.fields.next_estimated_execution_time or 'Never' in chore.fields.next_estimated_execution_time %} {{'%10s'|format('---')}}
{%- else %} {{chore.fields.next_estimated_execution_time}} {%endif%} {{'%15s'|format('')}}
{%- if not chore.fields.last_tracked_time %} {{'%20s'|format('None')}}
{%- else %} {{chore.fields.last_tracked_time}}{%endif%}
{%- if loop.nextitem %}{%endif%}{%endfor%}