mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Use explicit documentation paths for modules that are nested into subdirectories
Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
parent
d6a0797bf2
commit
e195453573
@ -32,5 +32,8 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
apiURL: ymlConfig.UString("apiURL", os.Getenv("CDS_API_URL")),
|
apiURL: ymlConfig.UString("apiURL", os.Getenv("CDS_API_URL")),
|
||||||
hideTags: utils.ToStrs(ymlConfig.UList("hideTags")),
|
hideTags: utils.ToStrs(ymlConfig.UList("hideTags")),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("cds/favorites")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -29,5 +29,8 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
token: ymlConfig.UString("token", ymlConfig.UString("token", os.Getenv("CDS_TOKEN"))),
|
token: ymlConfig.UString("token", ymlConfig.UString("token", os.Getenv("CDS_TOKEN"))),
|
||||||
apiURL: ymlConfig.UString("apiURL", os.Getenv("CDS_API_URL")),
|
apiURL: ymlConfig.UString("apiURL", os.Getenv("CDS_API_URL")),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("cds/queue")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,8 @@ const (
|
|||||||
|
|
||||||
// Settings defines the configuration properties for this module
|
// Settings defines the configuration properties for this module
|
||||||
type Settings struct {
|
type Settings struct {
|
||||||
common *cfg.Common
|
*cfg.Common
|
||||||
|
|
||||||
token string `help:"Your CDS API token."`
|
token string `help:"Your CDS API token."`
|
||||||
apiURL string `help:"Your CDS API URL."`
|
apiURL string `help:"Your CDS API URL."`
|
||||||
uiURL string
|
uiURL string
|
||||||
@ -23,9 +24,13 @@ type Settings struct {
|
|||||||
// NewSettingsFromYAML creates a new settings instance from a YAML config block
|
// NewSettingsFromYAML creates a new settings instance from a YAML config block
|
||||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||||
settings := Settings{
|
settings := Settings{
|
||||||
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
|
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
|
||||||
|
|
||||||
token: ymlConfig.UString("token", ymlConfig.UString("token", os.Getenv("CDS_TOKEN"))),
|
token: ymlConfig.UString("token", ymlConfig.UString("token", os.Getenv("CDS_TOKEN"))),
|
||||||
apiURL: ymlConfig.UString("apiURL", os.Getenv("CDS_API_URL")),
|
apiURL: ymlConfig.UString("apiURL", os.Getenv("CDS_API_URL")),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("cds/status")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -29,8 +29,8 @@ type Widget struct {
|
|||||||
// NewWidget creates a new instance of the widget
|
// NewWidget creates a new instance of the widget
|
||||||
func NewWidget(app *tview.Application, pages *tview.Pages, settings *Settings) *Widget {
|
func NewWidget(app *tview.Application, pages *tview.Pages, settings *Settings) *Widget {
|
||||||
widget := Widget{
|
widget := Widget{
|
||||||
MultiSourceWidget: view.NewMultiSourceWidget(settings.common, "workflow", "workflows"),
|
MultiSourceWidget: view.NewMultiSourceWidget(settings.Common, "workflow", "workflows"),
|
||||||
TextWidget: view.NewTextWidget(app, pages, settings.common),
|
TextWidget: view.NewTextWidget(app, pages, settings.Common),
|
||||||
|
|
||||||
settings: settings,
|
settings: settings,
|
||||||
}
|
}
|
||||||
|
@ -63,5 +63,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
settings.summary.currencies[key] = currency
|
settings.summary.currencies[key] = currency
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("cryptocurrencies/bittrex")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -34,5 +34,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
displayHoldings: ymlConfig.UBool("displayHoldings", true),
|
displayHoldings: ymlConfig.UBool("displayHoldings", true),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("cryptocurrencies/blockfolio")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -73,5 +73,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
settings.colors.top.to.field = ymlConfig.UString("colors.top.to.field")
|
settings.colors.top.to.field = ymlConfig.UString("colors.top.to.field")
|
||||||
settings.colors.top.to.value = ymlConfig.UString("colors.top.to.value")
|
settings.colors.top.to.value = ymlConfig.UString("colors.top.to.value")
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("cryptocurrencies/cryptolive")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -38,5 +38,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
|
|
||||||
cfg.ModuleSecret(name, globalConfig, &settings.apiKey).Load()
|
cfg.ModuleSecret(name, globalConfig, &settings.apiKey).Load()
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("sports/football")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -78,5 +78,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
settings.colors.past = ymlConfig.UString("colors.past", "gray")
|
settings.colors.past = ymlConfig.UString("colors.past", "gray")
|
||||||
settings.colors.title = ymlConfig.UString("colors.title", "white")
|
settings.colors.title = ymlConfig.UString("colors.title", "white")
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("google/gcal")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -30,5 +30,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
enableRealtime: ymlConfig.UBool("enableRealtime", false),
|
enableRealtime: ymlConfig.UBool("enableRealtime", false),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("google/analytics")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -36,5 +36,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
|
|
||||||
settings.colors.values = ymlConfig.UString("colors.values", "green")
|
settings.colors.values = ymlConfig.UString("colors.values", "green")
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("google/spreadsheet")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -29,5 +29,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
settings.colors.name = ymlConfig.UString("colors.name", "red")
|
settings.colors.name = ymlConfig.UString("colors.name", "red")
|
||||||
settings.colors.value = ymlConfig.UString("colors.value", "white")
|
settings.colors.value = ymlConfig.UString("colors.value", "white")
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("ipaddress/ipapi")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -19,5 +19,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
|
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("ipaddress/ipinfo")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -19,5 +19,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
|
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("sports/nbascore")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
screenNames: ymlConfig.UList("screenName"),
|
screenNames: ymlConfig.UList("screenName"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("twitter/tweets")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
@ -32,5 +32,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
screenNames: ymlConfig.UList("screenNames"),
|
screenNames: ymlConfig.UList("screenNames"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.SetDocumentationPath("twitter/stats")
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user