1
0
mirror of https://github.com/taigrr/wtf synced 2026-03-30 09:25:17 -07:00

Add event end time to gcal module display (#877)

* Add event end time to gcal module display

* Add settings for showing end time and add test coverage

* go mod tidy
This commit is contained in:
Adriano
2020-04-23 08:32:59 -04:00
committed by GitHub
parent ad2ad7437e
commit 216124437a
6 changed files with 71 additions and 19 deletions

View File

@@ -35,6 +35,7 @@ type Settings struct {
secretFile string `help:"Your Google client secret JSON file." values:"A string representing a file path to the JSON secret file."`
showAllDay bool `help:"Whether or not to display all-day events" values:"true or false" optional:"true" default:"true"`
showDeclined bool `help:"Whether or not to display events youve declined to attend." values:"true or false" optional:"true"`
showEndTime bool `help:"Display the end time of events, in addition to start time." values:"true or false" optional:"true" default:"false"`
withLocation bool `help:"Whether or not to show the location of the appointment." values:"true or false"`
timezone string `help:"The time zone used to display calendar event times." values:"A valid TZ database time zone string" optional:"true"`
calendarReadLevel string `help:"The calender read level specifies level you want to read events. Default: writer " values:"reader, writer" optional:"true"`
@@ -54,6 +55,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
multiCalendar: ymlConfig.UBool("multiCalendar", false),
secretFile: ymlConfig.UString("secretFile", ""),
showAllDay: ymlConfig.UBool("showAllDay", true),
showEndTime: ymlConfig.UBool("showEndTime", false),
showDeclined: ymlConfig.UBool("showDeclined", false),
withLocation: ymlConfig.UBool("withLocation", true),
timezone: ymlConfig.UString("timezone", ""),