Modify sig docs generator to handle multiple meetings

This commit is contained in:
Christoph Blecker 2018-01-24 12:07:28 -08:00
parent 9baebba197
commit 0686661aed
No known key found for this signature in database
GPG Key ID: B34A59A9D39F838B
4 changed files with 35 additions and 34 deletions

View File

@ -58,10 +58,14 @@ type Lead struct {
// Meeting represents a regular meeting for a group.
type Meeting struct {
Day string
Time string
TZ string `yaml:"tz"`
Frequency string
Description string
Day string
Time string
TZ string
Frequency string
URL string
ArchiveURL string `yaml:"archive_url"`
RecordingsURL string `yaml:"recordings_url"`
}
// Contact represents the various contact points for a group.
@ -79,16 +83,13 @@ type GithubTeams struct {
// Group represents either a Special Interest Group (SIG) or a Working Group (WG)
type Group struct {
Name string
Dir string
MissionStatement string `yaml:"mission_statement"`
Label string
Leads []Lead
Meetings []Meeting
MeetingURL string `yaml:"meeting_url"`
MeetingArchiveURL string `yaml:"meeting_archive_url"`
MeetingRecordingsURL string `yaml:"meeting_recordings_url"`
Contact Contact
Name string
Dir string
MissionStatement string `yaml:"mission_statement"`
Label string
Leads []Lead
Meetings []Meeting
Contact Contact
}
// DirName returns the directory that a group's documentation will be

View File

@ -16,7 +16,7 @@ When the need arises, a [new SIG can be created](sig-creation-procedure.md)
| Name | Label | Leads | Contact | Meetings |
|------|--------|-------|---------|----------|
{{- range .Sigs}}
|[{{.Name}}]({{.Dir}}/README.md)|{{.Label}}|{{range .Leads}}* [{{.Name}}](https://github.com/{{.GitHub}}){{if .Company}}, {{.Company}}{{end}}<br>{{end}}|* [Slack](https://kubernetes.slack.com/messages/{{.Contact.Slack}})<br>* [Mailing List]({{.Contact.MailingList}})|{{ $save := . }}{{range .Meetings}}* [{{.Day}}s at {{.Time}} {{.TZ}} ({{.Frequency}})]({{$save.MeetingURL}})<br>{{end}}
|[{{.Name}}]({{.Dir}}/README.md)|{{.Label}}|{{range .Leads}}* [{{.Name}}](https://github.com/{{.GitHub}}){{if .Company}}, {{.Company}}{{end}}<br>{{end}}|* [Slack](https://kubernetes.slack.com/messages/{{.Contact.Slack}})<br>* [Mailing List]({{.Contact.MailingList}})|{{ $save := . }}{{range .Meetings}}* {{.Description}}: [{{.Day}}s at {{.Time}} {{.TZ}} ({{.Frequency}})]({{.URL}})<br>{{end}}
{{- end }}
### Master Working Group List
@ -24,5 +24,5 @@ When the need arises, a [new SIG can be created](sig-creation-procedure.md)
| Name | Organizers | Contact | Meetings |
|------|------------|---------|----------|
{{- range .WorkingGroups}}
|[{{.Name}}]({{.Dir}}/README.md)|{{range .Leads}}* [{{.Name}}](https://github.com/{{.GitHub}}){{if .Company}}, {{.Company}}{{end}}<br>{{end}}|* [Slack](https://kubernetes.slack.com/messages/{{.Contact.Slack}})<br>* [Mailing List]({{.Contact.MailingList}})|{{ $save := . }}{{range .Meetings}}* [{{.Day}}s at {{.Time}} {{.TZ}} ({{.Frequency}})]({{$save.MeetingURL}})<br>{{end}}
|[{{.Name}}]({{.Dir}}/README.md)|{{range .Leads}}* [{{.Name}}](https://github.com/{{.GitHub}}){{if .Company}}, {{.Company}}{{end}}<br>{{end}}|* [Slack](https://kubernetes.slack.com/messages/{{.Contact.Slack}})<br>* [Mailing List]({{.Contact.MailingList}})|{{ $save := . }}{{range .Meetings}}* {{.Description}}: [{{.Day}}s at {{.Time}} {{.TZ}} ({{.Frequency}})]({{.URL}})<br>{{end}}
{{- end }}

View File

@ -2,18 +2,18 @@
# {{.Name}} SIG
{{ .MissionStatement }}
## Meetings
{{ if .Meetings }}## Meetings
{{- range .Meetings }}
* [{{.Day}}s at {{.Time}} {{.TZ}}]({{$.MeetingURL}}) ({{.Frequency}}). [Convert to your timezone](http://www.thetimezoneconverter.com/?t={{.Time}}&tz={{.TZ | tzUrlEncode}}).
{{- end }}
{{ if .MeetingArchiveURL -}}
Meeting notes and Agenda can be found [here]({{.MeetingArchiveURL}}).
{{- end }}
{{ if .MeetingRecordingsURL -}}
Meeting recordings can be found [here]({{.MeetingRecordingsURL}}).
* {{.Description}}: [{{.Day}}s at {{.Time}} {{.TZ}}]({{.URL}}) ({{.Frequency}}). [Convert to your timezone](http://www.thetimezoneconverter.com/?t={{.Time}}&tz={{.TZ | tzUrlEncode}}).
{{- if .ArchiveURL }}
* [Meeting notes and Agenda]({{.ArchiveURL}}).
{{- end }}
{{- if .RecordingsURL }}
* [Meeting recordings]({{.RecordingsURL}}).
{{- end }}
{{- end }}
{{ end -}}
## Leads
{{- range .Leads }}
* {{.Name}} (**[@{{.GitHub}}](https://github.com/{{.GitHub}})**){{if .Company}}, {{.Company}}{{end}}

View File

@ -2,18 +2,18 @@
# {{.Name}} Working Group
{{ .MissionStatement }}
## Meetings
{{ if .Meetings }}## Meetings
{{- range .Meetings }}
* [{{.Day}}s at {{.Time}} {{.TZ}}]({{$.MeetingURL}}) ({{.Frequency}}). [Convert to your timezone](http://www.thetimezoneconverter.com/?t={{.Time}}&tz={{.TZ | tzUrlEncode}}).
{{- end }}
{{ if .MeetingArchiveURL -}}
Meeting notes and Agenda can be found [here]({{.MeetingArchiveURL}}).
{{- end }}
{{ if .MeetingRecordingsURL -}}
Meeting recordings can be found [here]({{.MeetingRecordingsURL}}).
* {{.Description}}: [{{.Day}}s at {{.Time}} {{.TZ}}]({{.URL}}) ({{.Frequency}}). [Convert to your timezone](http://www.thetimezoneconverter.com/?t={{.Time}}&tz={{.TZ | tzUrlEncode}}).
{{- if .ArchiveURL }}
* [Meeting notes and Agenda]({{.ArchiveURL}}).
{{- end }}
{{- if .RecordingsURL }}
* [Meeting recordings]({{.RecordingsURL}}).
{{- end }}
{{- end }}
{{ end -}}
## Organizers
{{- range .Leads }}
* {{.Name}} (**[@{{.GitHub}}](https://github.com/{{.GitHub}})**){{if .Company}}, {{.Company}}{{end}}