diff --git a/_site/content/posts/modules/trello.md b/_site/content/posts/modules/trello.md new file mode 100644 index 00000000..c8649b69 --- /dev/null +++ b/_site/content/posts/modules/trello.md @@ -0,0 +1,87 @@ +--- +title: "Trello" +date: 2018-05-10T10:44:35-07:00 +draft: false +--- + +Displays all Trello cards on specified lists. + +trello screenshot + +## Source Code + +```bash +wtf/trello/ +``` + +## Required ENV Variables + +Key: `WTF_TRELLO_APP_KEY`
+Value: Your Trello App Key.
+Key: `WTF_TRELLO_ACCESS_TOKEN`
+Value: Your Trello Access Token.
+ +_You can get your API key at: trello.com/app-key._ + +## Keyboard Commands + +None. + +## Configuration + +### Single Trello List + +```yaml +trello: + board: Main + enabled: true + list: "Todo" + position: + height: 1 + left: 2 + top: 0 + width: 1 + refreshInterval: 3600 + username: myname +``` + +### Multiple Trello Lists + +If you want to monitor multiple Trello lists, use the following +configuration (note the difference in `list`): + +```yaml +trello: + board: Main + enabled: true + list: ["Todo", "Done"] + position: + height: 1 + left: 2 + top: 0 + width: 1 + refreshInterval: 3600 + username: myname +``` + +### Attributes + +`board`
+The name of the Trello board.
+ +`enabled`
+Determines whether or not this module is executed and if its data displayed onscreen.
+Values: `true`, `false`. + +`list`
+The Trello lists to fetch cards from.
+ +`refreshInterval`
+How often, in seconds, this module will update its data.
+Values: A positive integer, `0..n`. + +`username`
+Your Trello username.
+ +`position`
+Where in the grid this module's widget will be displayed.
diff --git a/_site/static/imgs/modules/todo.png b/_site/static/imgs/modules/todo.png new file mode 100644 index 00000000..dc1fd744 Binary files /dev/null and b/_site/static/imgs/modules/todo.png differ diff --git a/_site/static/imgs/modules/trello.png b/_site/static/imgs/modules/trello.png new file mode 100644 index 00000000..79fa6965 Binary files /dev/null and b/_site/static/imgs/modules/trello.png differ diff --git a/_site/themes/hyde-hyde/layouts/partials/sidebar.html b/_site/themes/hyde-hyde/layouts/partials/sidebar.html index a4b57457..e51d9f1b 100644 --- a/_site/themes/hyde-hyde/layouts/partials/sidebar.html +++ b/_site/themes/hyde-hyde/layouts/partials/sidebar.html @@ -46,6 +46,7 @@ + diff --git a/docs/404.html b/docs/404.html index 4d13885f..1b871d63 100644 --- a/docs/404.html +++ b/docs/404.html @@ -87,6 +87,7 @@ + diff --git a/docs/categories/index.html b/docs/categories/index.html index a1b78469..fa51f265 100644 --- a/docs/categories/index.html +++ b/docs/categories/index.html @@ -89,6 +89,7 @@ + diff --git a/docs/imgs/modules/trello.png b/docs/imgs/modules/trello.png new file mode 100644 index 00000000..79fa6965 Binary files /dev/null and b/docs/imgs/modules/trello.png differ diff --git a/docs/index.html b/docs/index.html index 6e6839fa..86999c3f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -88,6 +88,7 @@ + diff --git a/docs/index.xml b/docs/index.xml index ef8eec45..95f2bbf6 100644 --- a/docs/index.xml +++ b/docs/index.xml @@ -283,6 +283,19 @@ Configuration Single Jira Project jira:colors:rows:even:"lightblue&# jira:colors:rows:even:"lightblue"odd:"white"domain:"https://umbrellacorp.atlassian.net"email:"chriscummer@me.com"enabled:truejql:"issueType = Story"position:top:4left:1height:1width:2project:["ProjectA","ProjectB"]refreshInterval:900username:"chris.cummer"verifyServerCertificate:true Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name. + + Trello + https://wtfutil.com/posts/modules/trello/ + Thu, 10 May 2018 10:44:35 -0700 + + https://wtfutil.com/posts/modules/trello/ + Displays all Trello cards on specified lists. +Source Code wtf/trello/ Required ENV Variables Key: WTF_TRELLO_APP_KEY Value: Your Trello App Key. Key: WTF_TRELLO_ACCESS_TOKEN Value: Your Trello Access Token. You can get your API key at: trello.com/app-key. +Keyboard Commands None. +Configuration Single Trello List trello:board:Mainenabled:truelist:"Todo"position:height:1left:2top:0width:1refreshInterval:3600username:myname Multiple Trello Lists If you want to monitor multiple Trello lists, use the following configuration (note the difference in list): +trello:board:Mainenabled:truelist:["Todo","Done"]position:height:1left:2top:0width:1refreshInterval:3600username:myname Attributes board The name of the Trello board. + + Google Calendar https://wtfutil.com/posts/modules/gcal/ diff --git a/docs/posts/configuration/attributes/index.html b/docs/posts/configuration/attributes/index.html index 28c189dd..cec3d6b7 100644 --- a/docs/posts/configuration/attributes/index.html +++ b/docs/posts/configuration/attributes/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/configuration/index.html b/docs/posts/configuration/index.html index 7ff5e7ff..048b2898 100644 --- a/docs/posts/configuration/index.html +++ b/docs/posts/configuration/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/configuration/iterm2/index.html b/docs/posts/configuration/iterm2/index.html index 6f027bb9..facd0193 100644 --- a/docs/posts/configuration/iterm2/index.html +++ b/docs/posts/configuration/iterm2/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/glossary/index.html b/docs/posts/glossary/index.html index d97e4c30..6283569a 100644 --- a/docs/posts/glossary/index.html +++ b/docs/posts/glossary/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/index.html b/docs/posts/index.html index 902ea1b2..ce738f51 100644 --- a/docs/posts/index.html +++ b/docs/posts/index.html @@ -89,6 +89,7 @@ + @@ -237,6 +238,13 @@ + +
  • + + Trello + + +
  • diff --git a/docs/posts/index.xml b/docs/posts/index.xml index e95607ff..12f24d41 100644 --- a/docs/posts/index.xml +++ b/docs/posts/index.xml @@ -283,6 +283,19 @@ Configuration Single Jira Project jira:colors:rows:even:"lightblue&# jira:colors:rows:even:"lightblue"odd:"white"domain:"https://umbrellacorp.atlassian.net"email:"chriscummer@me.com"enabled:truejql:"issueType = Story"position:top:4left:1height:1width:2project:["ProjectA","ProjectB"]refreshInterval:900username:"chris.cummer"verifyServerCertificate:true Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name. + + Trello + https://wtfutil.com/posts/modules/trello/ + Thu, 10 May 2018 10:44:35 -0700 + + https://wtfutil.com/posts/modules/trello/ + Displays all Trello cards on specified lists. +Source Code wtf/trello/ Required ENV Variables Key: WTF_TRELLO_APP_KEY Value: Your Trello App Key. Key: WTF_TRELLO_ACCESS_TOKEN Value: Your Trello Access Token. You can get your API key at: trello.com/app-key. +Keyboard Commands None. +Configuration Single Trello List trello:board:Mainenabled:truelist:"Todo"position:height:1left:2top:0width:1refreshInterval:3600username:myname Multiple Trello Lists If you want to monitor multiple Trello lists, use the following configuration (note the difference in list): +trello:board:Mainenabled:truelist:["Todo","Done"]position:height:1left:2top:0width:1refreshInterval:3600username:myname Attributes board The name of the Trello board. + + Google Calendar https://wtfutil.com/posts/modules/gcal/ diff --git a/docs/posts/installation/index.html b/docs/posts/installation/index.html index 6d5b653d..50eb32aa 100644 --- a/docs/posts/installation/index.html +++ b/docs/posts/installation/index.html @@ -87,6 +87,7 @@
  • + diff --git a/docs/posts/modules/bamboohr/index.html b/docs/posts/modules/bamboohr/index.html index 301f371a..811f016d 100644 --- a/docs/posts/modules/bamboohr/index.html +++ b/docs/posts/modules/bamboohr/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/circleci/index.html b/docs/posts/modules/circleci/index.html index 3d670683..da8d854b 100644 --- a/docs/posts/modules/circleci/index.html +++ b/docs/posts/modules/circleci/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/clocks/index.html b/docs/posts/modules/clocks/index.html index 33e5a73e..b3ba296b 100644 --- a/docs/posts/modules/clocks/index.html +++ b/docs/posts/modules/clocks/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/cmdrunner/index.html b/docs/posts/modules/cmdrunner/index.html index bea5e0a1..22e0090d 100644 --- a/docs/posts/modules/cmdrunner/index.html +++ b/docs/posts/modules/cmdrunner/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/cryptocurrencies/bittrex/index.html b/docs/posts/modules/cryptocurrencies/bittrex/index.html index 2183ba57..408216b9 100644 --- a/docs/posts/modules/cryptocurrencies/bittrex/index.html +++ b/docs/posts/modules/cryptocurrencies/bittrex/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/cryptocurrencies/blockfolio/index.html b/docs/posts/modules/cryptocurrencies/blockfolio/index.html index 0f5a9b50..6cabf4b8 100644 --- a/docs/posts/modules/cryptocurrencies/blockfolio/index.html +++ b/docs/posts/modules/cryptocurrencies/blockfolio/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/cryptocurrencies/cryptolive/index.html b/docs/posts/modules/cryptocurrencies/cryptolive/index.html index b1f176b2..64b59495 100644 --- a/docs/posts/modules/cryptocurrencies/cryptolive/index.html +++ b/docs/posts/modules/cryptocurrencies/cryptolive/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/gcal/index.html b/docs/posts/modules/gcal/index.html index d7bd8261..d3f4dac0 100644 --- a/docs/posts/modules/gcal/index.html +++ b/docs/posts/modules/gcal/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/git/index.html b/docs/posts/modules/git/index.html index 9d9170cb..221c660e 100644 --- a/docs/posts/modules/git/index.html +++ b/docs/posts/modules/git/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/github/index.html b/docs/posts/modules/github/index.html index 2158dc89..bead9254 100644 --- a/docs/posts/modules/github/index.html +++ b/docs/posts/modules/github/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/gitlab/index.html b/docs/posts/modules/gitlab/index.html index 11a1721e..0505e62e 100644 --- a/docs/posts/modules/gitlab/index.html +++ b/docs/posts/modules/gitlab/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/gspreadsheet/index.html b/docs/posts/modules/gspreadsheet/index.html index a429eddf..49d1a994 100644 --- a/docs/posts/modules/gspreadsheet/index.html +++ b/docs/posts/modules/gspreadsheet/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/index.html b/docs/posts/modules/index.html index 29af350c..d566e99f 100644 --- a/docs/posts/modules/index.html +++ b/docs/posts/modules/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/ipapi/index.html b/docs/posts/modules/ipapi/index.html index 629e9815..1017656a 100644 --- a/docs/posts/modules/ipapi/index.html +++ b/docs/posts/modules/ipapi/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/ipinfo/index.html b/docs/posts/modules/ipinfo/index.html index a9406b66..2028b2f8 100644 --- a/docs/posts/modules/ipinfo/index.html +++ b/docs/posts/modules/ipinfo/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/jenkins/index.html b/docs/posts/modules/jenkins/index.html index bb6c0035..21535c86 100644 --- a/docs/posts/modules/jenkins/index.html +++ b/docs/posts/modules/jenkins/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/jira/index.html b/docs/posts/modules/jira/index.html index 077d1faa..177baf6b 100644 --- a/docs/posts/modules/jira/index.html +++ b/docs/posts/modules/jira/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/logger/index.html b/docs/posts/modules/logger/index.html index d382898b..3acfc548 100644 --- a/docs/posts/modules/logger/index.html +++ b/docs/posts/modules/logger/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/newrelic/index.html b/docs/posts/modules/newrelic/index.html index 9c8efc6a..05df07e7 100644 --- a/docs/posts/modules/newrelic/index.html +++ b/docs/posts/modules/newrelic/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/opsgenie/index.html b/docs/posts/modules/opsgenie/index.html index 68adac50..2229fb36 100644 --- a/docs/posts/modules/opsgenie/index.html +++ b/docs/posts/modules/opsgenie/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/power/index.html b/docs/posts/modules/power/index.html index a3920eb7..7ed15b3f 100644 --- a/docs/posts/modules/power/index.html +++ b/docs/posts/modules/power/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/prettyweather/index.html b/docs/posts/modules/prettyweather/index.html index a402000e..8b47a3a3 100644 --- a/docs/posts/modules/prettyweather/index.html +++ b/docs/posts/modules/prettyweather/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/security/index.html b/docs/posts/modules/security/index.html index 94f6dc86..8ed1b5d0 100644 --- a/docs/posts/modules/security/index.html +++ b/docs/posts/modules/security/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/textfile/index.html b/docs/posts/modules/textfile/index.html index b7e7c38f..4bb509dc 100644 --- a/docs/posts/modules/textfile/index.html +++ b/docs/posts/modules/textfile/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/todo/index.html b/docs/posts/modules/todo/index.html index a19cc891..972d745f 100644 --- a/docs/posts/modules/todo/index.html +++ b/docs/posts/modules/todo/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/modules/trello/index.html b/docs/posts/modules/trello/index.html new file mode 100644 index 00000000..d05315d9 --- /dev/null +++ b/docs/posts/modules/trello/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + + + +Trello | WTF - A Terminal Dashboard + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    Trello

    + +
    + +
    + + + +

    Displays all Trello cards on specified lists.

    + +

    trello screenshot

    + +

    Source Code

    +
    wtf/trello/
    +

    Required ENV Variables

    + +

    Key: WTF_TRELLO_APP_KEY
    +Value: Your Trello App Key.
    +Key: WTF_TRELLO_ACCESS_TOKEN
    +Value: Your Trello Access Token.

    + +

    You can get your API key at: trello.com/app-key.

    + +

    Keyboard Commands

    + +

    None.

    + +

    Configuration

    + +

    Single Trello List

    +
    trello: 
    +  board: Main
    +  enabled: true
    +  list: "Todo"
    +  position: 
    +    height: 1
    +    left: 2
    +    top: 0
    +    width: 1
    +  refreshInterval: 3600
    +  username: myname
    +

    Multiple Trello Lists

    + +

    If you want to monitor multiple Trello lists, use the following +configuration (note the difference in list):

    +
    trello: 
    +  board: Main
    +  enabled: true
    +  list: ["Todo", "Done"]
    +  position: 
    +    height: 1
    +    left: 2
    +    top: 0
    +    width: 1
    +  refreshInterval: 3600
    +  username: myname
    +

    Attributes

    + +

    board
    +The name of the Trello board.

    + +

    enabled
    +Determines whether or not this module is executed and if its data displayed onscreen.
    +Values: true, false.

    + +

    list
    +The Trello lists to fetch cards from.

    + +

    refreshInterval
    +How often, in seconds, this module will update its data.
    +Values: A positive integer, 0..n.

    + +

    username
    +Your Trello username.

    + +

    position
    +Where in the grid this module’s widget will be displayed.

    + +
    + + +
    + + + + diff --git a/docs/posts/modules/weather/index.html b/docs/posts/modules/weather/index.html index 63955ad9..d48befae 100644 --- a/docs/posts/modules/weather/index.html +++ b/docs/posts/modules/weather/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/posts/overview/index.html b/docs/posts/overview/index.html index 4f95593b..caccdad4 100644 --- a/docs/posts/overview/index.html +++ b/docs/posts/overview/index.html @@ -87,6 +87,7 @@ + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 6d153749..26ce6ad7 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -97,6 +97,11 @@ 2018-05-10T10:44:35-07:00 + + https://wtfutil.com/posts/modules/trello/ + 2018-05-10T10:44:35-07:00 + + https://wtfutil.com/posts/modules/gcal/ 2018-05-10T08:25:33-07:00 diff --git a/docs/tags/index.html b/docs/tags/index.html index 6e9ff15b..ba4b2363 100644 --- a/docs/tags/index.html +++ b/docs/tags/index.html @@ -89,6 +89,7 @@ + diff --git a/trello/card.go b/trello/card.go new file mode 100644 index 00000000..e1487c94 --- /dev/null +++ b/trello/card.go @@ -0,0 +1,8 @@ +package trello + +type TrelloCard struct { + ID string + Name string + List string + Description string +} diff --git a/trello/client.go b/trello/client.go new file mode 100644 index 00000000..dcccaf55 --- /dev/null +++ b/trello/client.go @@ -0,0 +1,98 @@ +package trello + +import ( + "fmt" + + "github.com/adlio/trello" + "github.com/senorprogrammer/wtf/wtf" +) + +func GetCards(client *trello.Client, lists map[string]string) (*SearchResult, error) { + boardID, err := getBoardID(client) + if err != nil { + return nil, err + } + + lists, err = getListIDs(client, boardID, lists) + if err != nil { + return nil, err + } + + searchResult := &SearchResult{Total: 0} + searchResult.TrelloCards = make(map[string][]TrelloCard) + + for listName, listID := range lists { + cards, err := getCardsOnList(client, listID) + if err != nil { + return nil, err + } + searchResult.Total = searchResult.Total + len(cards) + cardArray := make([]TrelloCard, 0) + for _, card := range cards { + trelloCard := TrelloCard{ + ID: card.ID, + List: listName, + Name: card.Name, + Description: card.Desc, + } + cardArray = append(cardArray, trelloCard) + } + searchResult.TrelloCards[listName] = cardArray + } + + return searchResult, nil +} + +func getBoardID(client *trello.Client) (string, error) { + member, err := client.GetMember(wtf.Config.UString("wtf.mods.trello.username"), trello.Defaults()) + if err != nil { + return "", err + } + + boards, err := member.GetBoards(trello.Defaults()) + if err != nil { + return "", err + } + + for _, board := range boards { + if board.Name == wtf.Config.UString("wtf.mods.trello.board") { + return board.ID, nil + } + } + + return "", fmt.Errorf("could not find board with name %s", wtf.Config.UString("wtf.mods.trello.board")) +} + +func getListIDs(client *trello.Client, boardID string, lists map[string]string) (map[string]string, error) { + board, err := client.GetBoard(boardID, trello.Defaults()) + if err != nil { + return nil, err + } + + boardLists, err := board.GetLists(trello.Defaults()) + if err != nil { + return nil, err + } + + for _, list := range boardLists { + if _, ok := lists[list.Name]; ok { + lists[list.Name] = list.ID + } + } + + return lists, nil +} + +func getCardsOnList(client *trello.Client, listID string) ([]*trello.Card, error) { + list, err := client.GetList(listID, trello.Defaults()) + if err != nil { + return nil, err + } + + cards, err := list.GetCards(trello.Defaults()) + if err != nil { + return nil, err + } + + return cards, nil +} diff --git a/trello/search_result.go b/trello/search_result.go new file mode 100644 index 00000000..44ca8dc7 --- /dev/null +++ b/trello/search_result.go @@ -0,0 +1,6 @@ +package trello + +type SearchResult struct { + Total int + TrelloCards map[string][]TrelloCard +} diff --git a/trello/widget.go b/trello/widget.go new file mode 100644 index 00000000..99c1b64a --- /dev/null +++ b/trello/widget.go @@ -0,0 +1,81 @@ +package trello + +import ( + "fmt" + "os" + + "github.com/adlio/trello" + "github.com/senorprogrammer/wtf/wtf" +) + +type Widget struct { + wtf.TextWidget +} + +func NewWidget() *Widget { + widget := Widget{ + TextWidget: wtf.NewTextWidget(" Trello ", "trello", false), + } + + return &widget +} + +/* -------------------- Exported Functions -------------------- */ + +func (widget *Widget) Refresh() { + client := trello.NewClient(os.Getenv("WTF_TRELLO_APP_KEY"), os.Getenv("WTF_TRELLO_ACCESS_TOKEN")) + + // Get the cards + searchResult, err := GetCards(client, getLists()) + widget.UpdateRefreshedAt() + + if err != nil { + widget.View.SetWrap(true) + widget.View.SetTitle(fmt.Sprintf("%s", widget.Name)) + fmt.Fprintf(widget.View, "%v", err) + } else { + widget.View.SetWrap(false) + widget.View.SetTitle( + fmt.Sprintf( + "[white]%s: [green]%s ", + widget.Name, + wtf.Config.UString("wtf.mods.trello.board"), + ), + ) + widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(searchResult))) + } +} + +/* -------------------- Unexported Functions -------------------- */ +func (widget *Widget) contentFrom(searchResult *SearchResult) string { + str := "" + + for list, cardArray := range searchResult.TrelloCards { + str = fmt.Sprintf("%s [red]Cards in %s[white]\n", str, list) + for _, card := range cardArray { + str = fmt.Sprintf("%s [green]%s[white]\n", str, card.Name) + } + str = fmt.Sprintf("%s\n", str) + } + + return str +} + +func getLists() map[string]string { + list := make(map[string]string) + // see if project is set to a single string + configPath := "wtf.mods.trello.list" + singleList, err := wtf.Config.String(configPath) + if err == nil { + list[singleList] = "" + return list + } + // else, assume list + multiList := wtf.Config.UList(configPath) + for _, proj := range multiList { + if str, ok := proj.(string); ok { + list[str] = "" + } + } + return list +} diff --git a/wtf.go b/wtf.go index 62d89883..88c8051f 100644 --- a/wtf.go +++ b/wtf.go @@ -38,6 +38,7 @@ import ( "github.com/senorprogrammer/wtf/system" "github.com/senorprogrammer/wtf/textfile" "github.com/senorprogrammer/wtf/todo" + "github.com/senorprogrammer/wtf/trello" "github.com/senorprogrammer/wtf/weatherservices/prettyweather" "github.com/senorprogrammer/wtf/weatherservices/weather" "github.com/senorprogrammer/wtf/wtf" @@ -213,6 +214,8 @@ func addWidget(app *tview.Application, pages *tview.Pages, widgetName string) { Widgets = append(Widgets, textfile.NewWidget(app, pages)) case "todo": Widgets = append(Widgets, todo.NewWidget(app, pages)) + case "trello": + Widgets = append(Widgets, trello.NewWidget()) case "weather": Widgets = append(Widgets, weather.NewWidget(app, pages)) default: