From 2d1c6cff8c96c4d3e4986fd3396e4086e0496063 Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Fri, 29 Nov 2024 12:38:19 +0100 Subject: template rename --- templates/calendar.md | 12 ++++++++++++ templates/calendar.t | 6 ------ templates/overview.md | 21 +++++++++++++++++++++ templates/overview.t | 21 --------------------- templates/plan-template.md | 9 +++++++++ templates/plan-template.t | 9 --------- templates/report.md | 41 +++++++++++++++++++++++++++++++++++++++++ templates/report.t | 33 --------------------------------- templates/wp-total.md | 18 ++++++++++++++++++ templates/wp-total.t | 18 ------------------ 10 files changed, 101 insertions(+), 87 deletions(-) create mode 100644 templates/calendar.md delete mode 100644 templates/calendar.t create mode 100644 templates/overview.md delete mode 100644 templates/overview.t create mode 100644 templates/plan-template.md delete mode 100644 templates/plan-template.t create mode 100644 templates/report.md delete mode 100644 templates/report.t create mode 100644 templates/wp-total.md delete mode 100644 templates/wp-total.t diff --git a/templates/calendar.md b/templates/calendar.md new file mode 100644 index 0000000..9660694 --- /dev/null +++ b/templates/calendar.md @@ -0,0 +1,12 @@ +# Calendars +{{ $p := . }} +{{ range $u, $v := .Users }} +## Calendar for {{ $u }} +{{range $y, $c := ($p.Calendars $u) }} +``` +{{ $c -}} +``` +{{ end }} +{{ end }} + + diff --git a/templates/calendar.t b/templates/calendar.t deleted file mode 100644 index 8ab5075..0000000 --- a/templates/calendar.t +++ /dev/null @@ -1,6 +0,0 @@ -# Calendars - -{{ range $y, $c := .Calendars }} -{{ $c }} -{{ end }} - diff --git a/templates/overview.md b/templates/overview.md new file mode 100644 index 0000000..caff0cb --- /dev/null +++ b/templates/overview.md @@ -0,0 +1,21 @@ +{{ range $id, $wp := .Workpackages -}} +## Workpackage {{ $id }}: {{ $wp.Title }} +{{ range $tid, $task := $wp.Tasks }} + {{$task.ID}}: {{ $task.Title }} + Budget: {{ $task.Budget.AsMonth }} +{{ end }} + +{{ end }} + +| Date | Time | WP's | +|:-----------|---------:|:--------:| +{{- range $d, $e := .Timeline }} +| {{ $d }} | {{ printf "%8s" $e.Total }} | {{ printf "%8s" $e.WPs }} | +{{- end }} +{{- $tl := .Timeline }}{{- $hd := .Holidays }} + +# Days +{{ range .Days 2024 03 }} +{{if or .IsWeekend .IsHoliday }}# {{end}}{{.Date}}{{ if .IsHoliday}} ({{ index $hd .Date}}){{end -}} +{{ with .Planned }} Planned: {{ .Total }}{{ end }}{{ with .Worked }} Worked: {{ .Total }}{{end}} +{{- end }} \ No newline at end of file diff --git a/templates/overview.t b/templates/overview.t deleted file mode 100644 index caff0cb..0000000 --- a/templates/overview.t +++ /dev/null @@ -1,21 +0,0 @@ -{{ range $id, $wp := .Workpackages -}} -## Workpackage {{ $id }}: {{ $wp.Title }} -{{ range $tid, $task := $wp.Tasks }} - {{$task.ID}}: {{ $task.Title }} - Budget: {{ $task.Budget.AsMonth }} -{{ end }} - -{{ end }} - -| Date | Time | WP's | -|:-----------|---------:|:--------:| -{{- range $d, $e := .Timeline }} -| {{ $d }} | {{ printf "%8s" $e.Total }} | {{ printf "%8s" $e.WPs }} | -{{- end }} -{{- $tl := .Timeline }}{{- $hd := .Holidays }} - -# Days -{{ range .Days 2024 03 }} -{{if or .IsWeekend .IsHoliday }}# {{end}}{{.Date}}{{ if .IsHoliday}} ({{ index $hd .Date}}){{end -}} -{{ with .Planned }} Planned: {{ .Total }}{{ end }}{{ with .Worked }} Worked: {{ .Total }}{{end}} -{{- end }} \ No newline at end of file diff --git a/templates/plan-template.md b/templates/plan-template.md new file mode 100644 index 0000000..a5e29e6 --- /dev/null +++ b/templates/plan-template.md @@ -0,0 +1,9 @@ +# Entry Format: +# 2006-01-02 WP2:wallet 8h Code Audit +{{- $tl := .Timeline -}} +{{ range .Days 2024 }} +{{ if or .IsWeekend .Holiday .Blocked }}# {{end}}{{.Date}} +{{- with .Holiday }} ({{ . }}){{ end -}} +{{- with .Blocked }} ({{ . }}){{ end -}} +{{/* with $e := index $tl .Date }} {{ printf "%8s" $e.WPs }} {{ printf "%8s" $e.Total.AsDay }}{{ end */}} +{{- end }} diff --git a/templates/plan-template.t b/templates/plan-template.t deleted file mode 100644 index a5e29e6..0000000 --- a/templates/plan-template.t +++ /dev/null @@ -1,9 +0,0 @@ -# Entry Format: -# 2006-01-02 WP2:wallet 8h Code Audit -{{- $tl := .Timeline -}} -{{ range .Days 2024 }} -{{ if or .IsWeekend .Holiday .Blocked }}# {{end}}{{.Date}} -{{- with .Holiday }} ({{ . }}){{ end -}} -{{- with .Blocked }} ({{ . }}){{ end -}} -{{/* with $e := index $tl .Date }} {{ printf "%8s" $e.WPs }} {{ printf "%8s" $e.Total.AsDay }}{{ end */}} -{{- end }} diff --git a/templates/report.md b/templates/report.md new file mode 100644 index 0000000..ad0c393 --- /dev/null +++ b/templates/report.md @@ -0,0 +1,41 @@ +Project: {{.Name}} +Grant: {{.Grant}} +Start: {{.Start}} +End: {{.End}} +Beneficiary: {{.Beneficiary}} +{{- $p := . }} +{{- $totals := .Totals }} + +# Planning, as of {{.Today}} + +``` +Budgeted : {{ printf "%8s" $totals.Budgeted }} + Planned : {{ printf "%8s" $totals.Planned }}{{with $totals.Unaccounted}} + ! Open !: {{ printf "%8s" . }}{{end}} + Done : {{ printf "%8s" $totals.Done }}{{ with $totals.Open }} + ! Todo !: {{ printf "%8s" . }} +Time left: {{ printf "%8s" ($p.AsDaysAmount (len $p.DaysRemaining)) }} * {{len $p.Users}}{{end}} +``` + +## Overview of WP Status + +``` +{{- range .ParallelWPTotals }} +{{.}} +{{- end}} +``` + +## As List +{{range $wp, $t := $totals.WP }} +Total for {{ $wp }}: + - Budgeted: {{ printf "%8s" $t.Budgeted.AsDay }} + - Planned: {{ printf "%8s" $t.Planned.AsDay }}{{with $t.Unaccounted }} !Unaccounted: {{printf "%8s" .AsDay}}{{end}} + - Actual: {{ printf "%8s" $t.Done.AsDay }}{{with $t.Open }} !Todo!: {{printf "%8s" .AsDay }}{{end}} + - Per Task: + {{- range $n, $t := $t.Tasks }} + - {{ $n }}:{{ $tt := $p.TotalWPTask $wp $n }} + - Budgeted: {{ printf "%8s" $tt.Budgeted.AsDay }} + - Planned: {{ printf "%8s" $tt.Planned.AsDay }}{{with $tt.Unaccounted }} !Unaccounted: {{printf "%8s" .AsDay}}{{end}} + - Actual: {{ printf "%8s" $tt.Done.AsDay }}{{with $tt.Open }} !Todo!: {{printf "%8s" .AsDay}}{{end}} + {{ end }} +{{ end }} diff --git a/templates/report.t b/templates/report.t deleted file mode 100644 index b97c2d7..0000000 --- a/templates/report.t +++ /dev/null @@ -1,33 +0,0 @@ -Project: {{.Name}} -Grant: {{.Grant}} -Start: {{.Start}} -End: {{.End}} -Beneficiary: {{.Beneficiary}} -{{- $p := . }} -{{- $totals := .Totals }} - -# Planning, as of {{.Today}} - -Budgeted : {{ printf "%8s" $totals.Budgeted }} - Planned : {{ printf "%8s" $totals.Planned }}{{with $totals.Unaccounted}} - ! Open !: {{ printf "%8s" . }}{{end}} - Done : {{ printf "%8s" $totals.Done }}{{ with $totals.Open }} - ! Todo !: {{ printf "%8s" . }} -Time left: {{ printf "%8s" ($p.AsDaysAmount (len $p.DaysRemaining)) }} * {{len $p.Users}}{{end}} - -{{ range .ParallelWPTotals }}{{.}} -{{ end }} - -{{range $wp, $t := $totals.WP }} -Total for {{ $wp }}: - - Budgeted: {{ printf "%8s" $t.Budgeted.AsDay }} - - Planned: {{ printf "%8s" $t.Planned.AsDay }}{{with $t.Unaccounted }} !Unaccounted: {{printf "%8s" .AsDay}}{{end}} - - Actual: {{ printf "%8s" $t.Done.AsDay }}{{with $t.Open }} !Todo!: {{printf "%8s" .AsDay }}{{end}} - - Per Task: - {{- range $n, $t := $t.Tasks }} - - {{ $n }}:{{ $tt := $p.TotalWPTask $wp $n }} - - Budgeted: {{ printf "%8s" $tt.Budgeted.AsDay }} - - Planned: {{ printf "%8s" $tt.Planned.AsDay }}{{with $tt.Unaccounted }} !Unaccounted: {{printf "%8s" .AsDay}}{{end}} - - Actual: {{ printf "%8s" $tt.Done.AsDay }}{{with $tt.Open }} !Todo!: {{printf "%8s" .AsDay}}{{end}} - {{ end }} -{{ end }} diff --git a/templates/wp-total.md b/templates/wp-total.md new file mode 100644 index 0000000..c664634 --- /dev/null +++ b/templates/wp-total.md @@ -0,0 +1,18 @@ +Total for {{ .WP }}: +------------------- +Budgeted : {{ printf "%8s" .Budgeted.AsDay }} + Planned : {{ printf "%8s" .Planned.AsDay }}{{with .Unaccounted }} + ! Open !: {{ printf "%8s" .AsDay}}{{end}} + Done : {{ printf "%8s" .Done.AsDay }}{{with .Open }} + ! Todo !: {{ printf "%8s" .AsDay }}{{end}} + +Per Task: +{{- range $n, $t := .Tasks }} + +»{{ $n }}«: +Budgeted : {{ printf "%8s" $t.Budgeted.AsDay }} + Planned : {{ printf "%8s" $t.Planned.AsDay }}{{with $t.Unaccounted }} + ! Open !: {{ printf "%8s" .AsDay}}{{end}} + Done : {{ printf "%8s" $t.Done.AsDay }}{{with $t.Open }} + ! Todo !: {{ printf "%8s" .AsDay}}{{end}} +{{- end }} \ No newline at end of file diff --git a/templates/wp-total.t b/templates/wp-total.t deleted file mode 100644 index c664634..0000000 --- a/templates/wp-total.t +++ /dev/null @@ -1,18 +0,0 @@ -Total for {{ .WP }}: -------------------- -Budgeted : {{ printf "%8s" .Budgeted.AsDay }} - Planned : {{ printf "%8s" .Planned.AsDay }}{{with .Unaccounted }} - ! Open !: {{ printf "%8s" .AsDay}}{{end}} - Done : {{ printf "%8s" .Done.AsDay }}{{with .Open }} - ! Todo !: {{ printf "%8s" .AsDay }}{{end}} - -Per Task: -{{- range $n, $t := .Tasks }} - -»{{ $n }}«: -Budgeted : {{ printf "%8s" $t.Budgeted.AsDay }} - Planned : {{ printf "%8s" $t.Planned.AsDay }}{{with $t.Unaccounted }} - ! Open !: {{ printf "%8s" .AsDay}}{{end}} - Done : {{ printf "%8s" $t.Done.AsDay }}{{with $t.Open }} - ! Todo !: {{ printf "%8s" .AsDay}}{{end}} -{{- end }} \ No newline at end of file -- cgit v1.2.3