mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Merge pull request #488 from Seanstoppable/moresettings
Even more help settings
This commit is contained in:
commit
b5fd3de755
@ -9,27 +9,26 @@ const defaultTitle = "Calendar"
|
||||
|
||||
type colors struct {
|
||||
day string
|
||||
description string
|
||||
past string
|
||||
title string
|
||||
description string `help:"The default color for calendar event descriptions." values:"Any X11 color name." optional:true`
|
||||
past string `help:"The color for calendar events that have passed." values:"Any X11 color name." optional:true`
|
||||
title string `help:"The default colour for calendar event titles." values:"Any X11 color name." optional:true`
|
||||
|
||||
highlights []interface{}
|
||||
highlights []interface{} `help:"A list of arrays that define a regular expression pattern and a color. If a calendar event title matches a regular expression, the title will be drawn in that colour. Over-rides the default title colour." values:"An array of a valid regular expression, any X11 color name." optional:true`
|
||||
}
|
||||
|
||||
type Settings struct {
|
||||
colors
|
||||
common *cfg.Common
|
||||
|
||||
conflictIcon string
|
||||
currentIcon string
|
||||
displayResponseStatus bool
|
||||
email string
|
||||
eventCount int
|
||||
multiCalendar bool
|
||||
secretFile string
|
||||
showDeclined bool
|
||||
textInterval int
|
||||
withLocation bool
|
||||
conflictIcon string `help:"The icon displayed beside calendar events that have conflicting times (they intersect or overlap in some way)." values:"Any displayable unicode character." optional:true`
|
||||
currentIcon string `help:"The icon displayed beside the current calendar event." values:"Any displayable unicode character." optional:true`
|
||||
displayResponseStatus bool `help:"Whether or not to display your response status to the calendar event." values:"true or false" optional:true`
|
||||
email string `help:"The email address associated with your Google account. Necessary for determining 'responseStatus'." values:"A valid email address string."`
|
||||
eventCount int `help:"The number of calendar events to display." values:"A positive integer, 0..n." optional:true`
|
||||
multiCalendar bool `help:"Whether or not to display your primary calendar or all calendars you have access to." values:"true or false" optional:true`
|
||||
secretFile string `help:"Your Google client secret JSON file." values:"A string representing a file path to the JSON secret file."`
|
||||
showDeclined bool `help:"Whether or not to display events you’ve declined to attend." values:"true or false" optional:true`
|
||||
withLocation bool `help:"Whether or not to show the location of the appointment." values:"true or false"`
|
||||
}
|
||||
|
||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||
@ -45,7 +44,6 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
||||
multiCalendar: ymlConfig.UBool("multiCalendar", false),
|
||||
secretFile: ymlConfig.UString("secretFile", ""),
|
||||
showDeclined: ymlConfig.UBool("showDeclined", false),
|
||||
textInterval: ymlConfig.UInt("textInterval", 30),
|
||||
withLocation: ymlConfig.UBool("withLocation", true),
|
||||
}
|
||||
|
||||
|
@ -9,8 +9,8 @@ import (
|
||||
|
||||
type colors struct {
|
||||
rows struct {
|
||||
even string
|
||||
odd string
|
||||
even string `help:"Define the foreground color for even-numbered rows." values:"Any X11 color name." optional:"true"`
|
||||
odd string `help:"Define the foreground color for odd-numbered rows." values:"Any X11 color name." optional:"true"`
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,11 +20,11 @@ type Settings struct {
|
||||
colors
|
||||
common *cfg.Common
|
||||
|
||||
domain string
|
||||
password string
|
||||
projects []interface{}
|
||||
username string
|
||||
verifyServerCertificate bool
|
||||
domain string `help:"Your Gerrit corporate domain."`
|
||||
password string `help:"Your Gerrit HTTP Password."`
|
||||
projects []interface{} `help:"A list of Gerrit project names to fetch data for."`
|
||||
username string `help:"Your Gerrit username."`
|
||||
verifyServerCertificate bool `help:"Determines whether or not the server’s certificate chain and host name are verified." values:"true or false" optional:"true"`
|
||||
}
|
||||
|
||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||
|
@ -11,7 +11,7 @@ const defaultTitle = "Git"
|
||||
type Settings struct {
|
||||
common *cfg.Common
|
||||
|
||||
commitCount int `help:"The number of past commits to display." values:"A positive integer, 0..n."`
|
||||
commitCount int `help:"The number of past commits to display." values:"A positive integer, 0..n." optional:"true"`
|
||||
commitFormat string `help:"The string format for the commit message." optional:"true"`
|
||||
dateFormat string `help:"The string format for the date/time in the commit message." optional:"true"`
|
||||
repositories []interface{} `help:"Defines which git repositories to watch." values:"A list of zero or more local file paths pointing to valid git repositories."`
|
||||
|
@ -14,19 +14,19 @@ const defaultTitle = "GitHub"
|
||||
type Settings struct {
|
||||
common *cfg.Common
|
||||
|
||||
apiKey string
|
||||
baseURL string
|
||||
customQueries []customQuery
|
||||
enableStatus bool
|
||||
repositories []string
|
||||
uploadURL string
|
||||
username string
|
||||
apiKey string `help:"Your GitHub API token."`
|
||||
baseURL string `help:"Your GitHub Enterprise API URL." optional:"true"`
|
||||
customQueries []customQuery `help:"Custom queries allow you to filter pull requests and issues however you like. Give the query a title and a filter. Filters can be copied directly from GitHub’s UI." optional:"true"`
|
||||
enableStatus bool `help:"Display pull request mergeability status (‘dirty’, ‘clean’, ‘unstable’, ‘blocked’)." optional:"true"`
|
||||
repositories []string `help:"A list of github repositories." values:"Example: wtfutil/wtf"`
|
||||
uploadURL string `help:"Your GitHub Enterprise upload URL (often the same as API URL). optional:"true"`
|
||||
username string `help:"Your GitHub username. Used to figure out which review requests you’ve been added to."`
|
||||
}
|
||||
|
||||
type customQuery struct {
|
||||
title string
|
||||
filter string
|
||||
perPage int
|
||||
title string `help:"Display title for this query"`
|
||||
filter string `help:"Github query filter"`
|
||||
perPage int `help:"Number of issues to show"`
|
||||
}
|
||||
|
||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||
|
@ -12,10 +12,10 @@ const defaultTitle = "GitLab"
|
||||
type Settings struct {
|
||||
common *cfg.Common
|
||||
|
||||
apiKey string
|
||||
domain string
|
||||
projects map[string]interface{}
|
||||
username string
|
||||
apiKey string `help:"A GitLab personal access token. Requires at least api access."`
|
||||
domain string `help:"Your GitLab corporate domain."`
|
||||
projects map[string]interface{} `help:"A list of key/value pairs each describing a GitLab project to fetch data for." values:"Key: The name of the project. Value: The namespace of the project."`
|
||||
username string `help:"Your GitLab username. Used to figure out which requests require your approval"`
|
||||
}
|
||||
|
||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||
|
@ -12,9 +12,9 @@ const defaultTitle = "Gitter"
|
||||
type Settings struct {
|
||||
common *cfg.Common
|
||||
|
||||
apiToken string
|
||||
numberOfMessages int
|
||||
roomURI string
|
||||
apiToken string `help:"Your GitterPersonal Access Token."`
|
||||
numberOfMessages int `help:"Maximum number of (newest) messages to be displayed. Default is 10" optional:"true"`
|
||||
roomURI string `help:"The room you want to display." values:"Example: wtfutil/Lobby"`
|
||||
}
|
||||
|
||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||
|
Loading…
x
Reference in New Issue
Block a user