1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Compare commits

...

1006 Commits

Author SHA1 Message Date
dependabot-preview[bot]
e86b77131a
Upgrade to GitHub-native Dependabot (#1084)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-11 22:39:36 -07:00
Chris Cummer
91942b68f2
Update LICENSE.md 2021-04-15 15:26:23 -07:00
Chris Cummer
65aa2c9877 Fix golangci-lint.yaml
Signed-off-by: Chris Cummer <chriscummer@me.com>
2021-04-13 04:20:35 -07:00
Chris Cummer
971fcee8db Remove references to 'refreshInterval'
Signed-off-by: Chris Cummer <chriscummer@me.com>
2021-04-11 19:25:02 -07:00
Chris Cummer
46389463f3 Add @cclauss as a contributor 2021-04-11 13:23:03 -07:00
Christian Clauss
a85e61f5f9
Upgrade golangci to v1.39 (#1074) 2021-04-11 13:21:58 -07:00
Chris Cummer
dadbb8c8f4
Update CHANGELOG.md 2021-03-27 19:31:54 -07:00
Chris Cummer
8eb4a25891
WTF-1070 Read response body data before closing (#1071)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2021-03-27 19:30:18 -07:00
Chris Cummer
2fd9d623a1 Regenerate all-contributors
Signed-off-by: Chris Cummer <chriscummer@me.com>
2021-03-27 14:02:43 -07:00
Chris Cummer
3592ba45ca Add @inetAnt as a contributor 2021-03-27 14:01:41 -07:00
Chris Cummer
0b4b503086
Update CHANGELOG.md 2021-03-27 13:43:24 -07:00
Antoine Meillet
9fb57845ed
Add Yahoo Finance module (#1066)
* Move finnhub to a stocks folder

As I am preparing an other stocks data provider, let's move `finnhub` to
a stocks folder that will host the others providers.

* Use go-pretty v6

Will be used by the new stock provider module, so let's just upgrade
this one to reduce the number of dependencies.

* Add Yahoo Finance module

Yahoo Finance provides an API for which `piquette/finance-go` is a
powerful client. This new module leverages this module to integrate all
indices provided by Yahoo Finance (international stocks, crypto,
options, currencies...)

Sample config:
```yaml
    yfinance:
      title: "Stocks 🚀"
      symbols:
        - "MSFT"
        - "GC=F"
        - "ORA.PA"
      sort: true
      enabled: true
      refreshInterval: 60
      position:
        top: 1
        left: 0
        height: 1
        width: 1
```
2021-03-27 13:42:28 -07:00
Chris Cummer
ac0aafc04d
Update CHANGELOG.md 2021-03-23 03:40:23 -07:00
Chris Cummer
4d2027d983 Attempt to fix the gorelease configuration
Signed-off-by: Chris Cummer <chriscummer@me.com>
2021-03-23 03:32:28 -07:00
Chris Cummer
a22c197d9b
Update CHANGELOG.md 2021-03-23 03:20:14 -07:00
David Bouchare
2ec2fc37a5
Fix defer execution (#1065) 2021-03-23 03:19:29 -07:00
Chris Cummer
f71a326fe2
Update CHANGELOG.md 2021-03-19 21:46:39 -07:00
Lukas Kämmerling
f844ff3afb
Update to Go 1.16 (#1064)
This commit updates the used Go version to 1.16. The biggest benefit from this is that with Go 1.16 (and the latest Goreleaser) support for Apple Silicon is available, therefore wtf would work on Apple Silicon.

Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
2021-03-19 21:45:23 -07:00
Chris Cummer
582557e408
Update CHANGELOG.md 2021-03-19 21:44:53 -07:00
Lukas Kämmerling
9446886b37
Fix HackerNews Widget (#1063)
After commit 49109c77f719cedc5c7f15bcf255f952d2c3b90d the HackerNews widget did not work as expected. It failed with a error message "http: read on closed response body". This commit fixes the underlying reader issue by reading the whole request body within the apiRequest function and returning the []bytes of the response instead of *http.Response. If we want to continue to return *http.Response this would lead to the problem that the caller (GetStory() and GetStories()) always need to close the Request Body. The ways before this MR is a bit problematic because the defer gets executed when the function is "done", so it closes the Body already before the utils.ParseJSON can read it.

Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
2021-03-19 21:43:54 -07:00
Chris Cummer
0035e479c8
Update CHANGELOG.md 2021-03-18 22:01:18 -07:00
Chris Cummer
6f0605d145 Add @LKaemmerling as a contributor 2021-03-18 21:59:56 -07:00
Lukas Kämmerling
0a89786826
Enhance Kubernetes module with Replica Count (Deployments) (#1062)
This commit adds the ReadyReplicas and Total Replicas count, the information is useful if you want to look over a new release of your application and k8s and want to know how many pods are ready/started from k8s. Otherwise the deployment option of this module is not that useful.

Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
2021-03-18 21:57:40 -07:00
David Bouchare
02db55a136
Fix city key (#1061)
* Fix city

* Trigger Build to see if lint is still failing
2021-03-15 20:27:49 -07:00
Chris Cummer
15769f21d0
WTF-1057 Use long-form git SHA in staticcheck github action (#1058)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2021-03-01 08:55:08 -08:00
David Bouchare
cf3229e0cd
Add a few more tests (#1056)
* Add test for SumInts()

* Add a few more tests in utils

* Minor update for SumInts test
2021-03-01 08:33:42 -08:00
Chris Cummer
7c12523139 Add @xntrik as a contributor 2021-02-04 00:52:26 -08:00
Chris Cummer
369a59e25d
Update CHANGELOG.md 2021-02-04 00:51:45 -08:00
Christian Frichot
a8b0fa897a
Add Asana Module (#1052)
* Add Asana Module

* Add Asana Module to the widget_maker

* Asana Module - addressing linting concerns

* Asana Module - ran go mod tidy
2021-02-04 00:51:03 -08:00
David Bouchare
6ecec4f149
Update test (#1050) 2021-01-24 20:49:10 -08:00
Chris Cummer
f48b17269c Add @pgaxatte as a contributor 2021-01-22 10:03:10 -08:00
Pierre Gaxatte
6fcd74bb82
Fix documentation links to wtfutil.com (#1048) 2021-01-22 10:02:01 -08:00
Fredrik Steen
ddfc439c41
Fix for potential runtime panic (#1046)
Switch error checking around, so we don't check the StatusCode before
handling client errors.
2021-01-20 09:03:27 -08:00
Chris Cummer
7c3d476def
Update CHANGELOG.md 2021-01-16 12:37:35 -08:00
David Bouchare
49109c77f7
[several modules] Close the response body (#1040) 2021-01-16 12:36:29 -08:00
Chris Cummer
a5f66588e7
Update CHANGELOG.md 2021-01-16 12:35:44 -08:00
Fredrik Steen
2341446376 Healthcecks module
Healthchecks.io is a service for monitoring cron jobs and similar
periodic processes.

Hosted: https://healthchecks.io/
API-Doc: https://healthchecks.io/docs/api/
GitHub: https://github.com/healthchecks/healthchecks

This module can be used both with hosted and self-hosted healthchecks.
2021-01-16 12:33:15 -08:00
Chris Cummer
9a703dd78b Deleted the Finnhub client test. It requires an API key to pass, and thats not acceptible
Signed-off-by: Chris Cummer <chriscummer@me.com>
2021-01-16 12:32:52 -08:00
Chris Cummer
767a18ad86
Update CHANGELOG.md 2021-01-03 13:57:17 -08:00
Chris Cummer
f55024b352
Update CHANGELOG.md 2021-01-03 13:56:56 -08:00
Chris Cummer
4b8b735a46 Add @zye1996 as a contributor 2021-01-03 10:35:23 -08:00
Chris Cummer
8068ffeb7d
Update CHANGELOG.md 2021-01-03 10:34:44 -08:00
zye1996
5783473cfa
fix requests url for cryptolive (#1042)
Co-authored-by: yzy <zhenyi@sensor.com>
2021-01-03 10:32:37 -08:00
Chris Cummer
d341c21f4b
Add support for the 'language' setting in the covid module (#1039)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-12-29 13:46:08 -08:00
Chris Cummer
b434e79b9b
Update CHANGELOG.md 2020-12-29 13:37:50 -08:00
David Bouchare
2f2df04478
[modules] Add new covid tracker module (#1037)
* Add draft of covid module

* Work on pointers

* Add country stats

* Remove recovered, stays at 0

* Handle response code

* One struct for both

* List of countries

* Add test

* Add test for countries

* Fix typos

* Format numbers based on language/locale
2020-12-29 13:33:14 -08:00
Chris Cummer
d7da659b8b
Add support for user-configuration language tag specification. (#1038)
Adds a new top-level configuration key called "language":

```yaml
wtf:
  langauge: "ja-JP"
```

Users can now define which BCP 47 language tag to use to format any
text or numbers that currently support localization. Defaults to
"en-CA".

Acceptible values: any BCP 47 language tag recognized by the Go
"language" package.

Good luck to you figuring out what that cannonical list is. After a
morning of trying to suss it out, I have no idea.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-12-29 12:14:20 -08:00
Chris Cummer
fd794707cd
☢️ WTF-1031 Support multiple simultaneous configurations (#1032)
* WTF-1031 Rename WtfApp.app to WtfApp.tviewApp

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-1031 Add scaffolding for main to support multiple WtfApp instances

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-1031 WIP

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Remove common functionality from KeyboardWidget and into Base

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Augment with some descriptive comments

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Add full support for multiple app instances via the AppManager.

Still to do:

* Config support for multiple apps/multiple config files
* The ability to switch between apps

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Move SetTerminal out of main and into its own file

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-12-21 03:25:41 -08:00
David Bouchare
9ba22f656b
Close the response body (#1036) 2020-12-18 20:20:05 -08:00
Chris Cummer
c41411b97e Fix the goreleaser action 'on' clause
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-12-06 11:38:15 -08:00
Chris Cummer
56469d8db3
Add goreleaser github action (#1035)
Creates a new release when a new tag is pushed up to GitHub.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-12-06 11:36:32 -08:00
Chris Cummer
4cde3c7781
Update CHANGELOG.md 2020-12-02 13:56:33 -08:00
Chris Cummer
2246300740 Add @stone as a contributor 2020-12-02 13:55:17 -08:00
Chris Cummer
190b06182f Merge branch 'kris' of github.com:stone/wtf into stone-kris 2020-12-02 13:53:55 -08:00
David Bouchare
b2168be56e
Edit comment (#1033) 2020-12-02 13:52:06 -08:00
Fredrik Steen
cf808dd09b Fix inconsistent configuration name. 2020-11-30 17:44:28 +01:00
Fredrik Steen
90d672b2f2 Add krisinformation module
A module to parse the feed from: https://www.krisinformation.se/en

 Krisinformation.se is a web site run by the Swedish Civil Contingencies Agency
that compiles and convey warnings, alerts, and emergency information from
Swedish authorities to the public.

Features:

 - Filter on country (all messages)
 - Filter on county (only show county specific messages)
 - Distance (only show message within a certain distance)
 - Set a max age for displaying messages
 - Set a maximum number of messages displayed
2020-11-30 16:26:51 +01:00
Chris Cummer
68906edf49
Update CHANGELOG.md 2020-11-27 10:54:18 -08:00
Chris Cummer
14729b2bfd
Update CHANGELOG.md 2020-11-27 10:53:32 -08:00
Chris Cummer
20a8c1aa9c
Update CHANGELOG.md 2020-11-27 10:53:23 -08:00
Chris Cummer
e195453573 Use explicit documentation paths for modules that are nested into subdirectories
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-11-26 23:18:46 -08:00
Chris Cummer
d6a0797bf2 Simplify the inclusion of the Common config settings into each module
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-11-26 23:18:46 -08:00
Chris Cummer
f9a06540f1 Simplify the view loading for the keyboard widget
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-11-26 23:12:15 -08:00
Chris Cummer
4a820dd0e5 Make every widget a keyboard widget
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-11-26 23:12:15 -08:00
Chris Cummer
2430fe9f56 Opening docs in browser is working, but only for keyboard modules
This needs to work for all modules, which means effectively
every module just became a keyboard module, if it is focusable.

That's an interesting development.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-11-26 23:12:15 -08:00
Chris Cummer
3521ebf6e8 Rename SigilStr to PaginationMarker
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-11-26 23:07:30 -08:00
Chris Cummer
a18f77bfad
Back onto grandcolline/golang-github-actions (#1030)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-11-26 21:06:11 -08:00
Chris Cummer
7e0f10223c
Update CHANGELOG.md 2020-11-21 18:26:29 -08:00
Chris Cummer
727b6f5a58 Add @dabcoder as a contributor 2020-11-21 18:23:11 -08:00
David Bouchare
aae1cf55cc
[CircleCI] Add configurable number of builds to settings (#1025)
* Add configurable build number to settings

* Review feedback: number of builds
2020-11-21 18:21:02 -08:00
Chris Cummer
acfafb0607
Update CHANGELOG.md 2020-11-08 16:26:20 -08:00
Chris Cummer
9abd6a60fa go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-11-08 16:19:13 -08:00
Chris Cummer
234e36bd7e
Update CHANGELOG.md 2020-11-08 16:18:51 -08:00
dependabot-preview[bot]
1d38174162
Bump golang.org/x/text from 0.3.3 to 0.3.4 (#1014)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.3 to 0.3.4.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.3...v0.3.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-08 16:18:30 -08:00
dependabot-preview[bot]
7fbf21d700
Bump github.com/zorkian/go-datadog-api (#1010)
Bumps [github.com/zorkian/go-datadog-api](https://github.com/zorkian/go-datadog-api) from 2.29.0+incompatible to 2.30.0+incompatible.
- [Release notes](https://github.com/zorkian/go-datadog-api/releases)
- [Commits](https://github.com/zorkian/go-datadog-api/compare/v2.29.0...v2.30.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-08 16:17:55 -08:00
dependabot-preview[bot]
ab2df7e10c
Bump github.com/xanzy/go-gitlab from 0.38.2 to 0.39.0 (#1013)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.38.2 to 0.39.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.38.2...v0.39.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-08 16:17:28 -08:00
dependabot-preview[bot]
d530f72075
Bump github.com/digitalocean/godo from 1.48.0 to 1.52.0 (#1019)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.48.0 to 1.52.0.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.48.0...v1.52.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-08 16:17:01 -08:00
Toon Schoenmakers
f58e244cf6
Handle errors from the grafana api by displaying the error message (#1015) 2020-10-29 09:33:55 -07:00
Chris Cummer
bd01083ad6 Add @YuviGold as a contributor 2020-10-24 13:55:47 -07:00
Chris Cummer
7bb6aead0e Exit message call out in readme
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-23 01:31:52 -07:00
Chris Cummer
52b5ac4f0c
Update CHANGELOG.md 2020-10-22 09:30:09 -07:00
Chris Cummer
546f73d56c Merge branch 'grafana' of github.com:schoentoon/wtf into schoentoon-grafana 2020-10-22 09:27:22 -07:00
Chris Cummer
03b6ad6f08
Update CHANGELOG.md 2020-10-21 21:04:42 -07:00
Chris Cummer
47da77a382 Add @applegreengrape as a contributor 2020-10-21 21:03:01 -07:00
Chris Cummer
1dbc28618d Merge branch 'finnhub_mod_for_stocks' of github.com:applegreengrape/wtf into applegreengrape-finnhub_mod_for_stocks 2020-10-21 21:00:18 -07:00
Chris Cummer
0f0b28bdf6 go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-21 04:14:28 -07:00
Chris Cummer
57a965b0d6
Update CHANGELOG.md 2020-10-21 04:10:03 -07:00
dependabot-preview[bot]
f6eac2d7bc
Bump github.com/xanzy/go-gitlab from 0.38.1 to 0.38.2 (#1007)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.38.1 to 0.38.2.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.38.1...v0.38.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-21 04:09:45 -07:00
Chris Cummer
944db701e4
Update CHANGELOG.md 2020-10-21 04:09:27 -07:00
dependabot-preview[bot]
f31168c4fd
Bump github.com/digitalocean/godo from 1.46.0 to 1.48.0 (#1005)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.46.0 to 1.48.0.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.46.0...v1.48.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-21 04:09:01 -07:00
Jade
fd8298dfd1 go lint fix 2020-10-19 20:59:26 +01:00
Jade
a728d448cb update the views 2020-10-19 20:51:39 +01:00
Toon Schoenmakers
441e82a3bd Added grafana alerts widget 2020-10-19 19:03:15 +02:00
Jade
64fa5acccb gofmt 2020-10-19 01:18:40 +01:00
Jade
d152a8beee fix go lint 2020-10-19 01:07:04 +01:00
Jade
5c6833a0df add the module to the widget_maker.go 2020-10-19 00:42:03 +01:00
Jade
1ff75dd4cf update 2020-10-19 00:15:29 +01:00
Jade
4d3e9506e4 added finnhub mod 2020-10-19 00:03:07 +01:00
Jade
63462ac8ef add finnhub modules 2020-10-16 23:18:02 +01:00
Chris Cummer
cff8e7fae7 Add @sahilister as a contributor 2020-10-14 16:43:55 -07:00
Chris Cummer
c10e67d4b5
Update CHANGELOG.md 2020-10-14 12:32:43 -07:00
Chris Cummer
e5f52587da Merge branch 'dependabot/go_modules/google.golang.org/api-0.33.0' 2020-10-14 12:31:25 -07:00
Chris Cummer
35e5344e5c Upate and fix naming module circular load loop
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-14 12:31:07 -07:00
Chris Cummer
a746ab6975 Remove unnecessary parameter passing in WtfApp
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-14 12:16:48 -07:00
Chris Cummer
63aa353db3
Update CHANGELOG.md 2020-10-14 09:39:11 -07:00
Chris Cummer
f84142553c
WTF-986 User-definable DigitalOcean columns (#1001)
* WTF-986 Wrap the DigitalOcean droplet in our own droplet

This gives us something to build off while still providing the
underlying functionality of the original droplet instance.

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-986 Dynamically display droplet attributes based on defined column names

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-986 Read DigitalOcean column configuration from settings

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-986 Extract the reflection bits into a Reflective package

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-14 09:29:58 -07:00
dependabot-preview[bot]
b18c838a69
Bump google.golang.org/api from 0.30.0 to 0.33.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.30.0 to 0.33.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.30.0...v0.33.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-14 05:50:57 +00:00
Chris Cummer
b2e0c520e8
Update CHANGELOG.md 2020-10-13 09:45:57 -07:00
Chris Cummer
b333a1499a Update CHANGELOG.md
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-13 09:40:27 -07:00
Jason Schweier
0ab72ab7bb
Default domain for gitlab (#1000)
* Add a default domain for gitlab

* Remove trailing whitespace
2020-10-13 09:39:05 -07:00
Chris Cummer
ebea03edcf
Update README.md
Note that WTF now requires Go 1.15 due to how we import `time/tzinfo` now.
2020-10-12 13:16:44 -07:00
Chris Cummer
35499987ce
Move loading of the GitHub user into startup (#999)
Having the calls on exit delayed the exiting of the app
by a second or more, which was noticable and annoying.

This change loads the GitHub user data asynchronously while the
app is running, removing the delay on exit.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-12 12:23:39 -07:00
Chris Cummer
1afaa2ba45 Clean up the openFileUtil code in main
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-11 20:37:04 -07:00
Chris Cummer
9fc8eccba9
Update CHANGELOG.md 2020-10-11 20:15:20 -07:00
Chris Cummer
1b261acb5c Add @franga2000 as a contributor 2020-10-11 20:13:42 -07:00
Chris Cummer
dc6d9d4e12 Merge branch 'franga2000-feature/uptimerobot' 2020-10-11 20:11:15 -07:00
Chris Cummer
21bdf18e98 Remove a redundant byte conversion
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-11 20:10:57 -07:00
Miha Frangež
b8c9f96db2 UptimeRobot: option to show offline monitors first 2020-10-11 20:09:18 -07:00
Miha Frangež
dd4899a07c UptimeRobot: improve uptime formatting 2020-10-11 20:09:18 -07:00
Miha Frangež
6908e744e1 Make CI happy 2020-10-11 20:09:18 -07:00
Miha Frangež
7f05fbcda5 Implemented UptimeRobot widget
This is the first working version of the UptimeRobot module, as discussed in #979
2020-10-11 20:09:18 -07:00
Chris Cummer
33bb990583
Update CHANGELOG.md 2020-10-11 18:18:47 -07:00
Chris Cummer
9f94e8c63a Add an app exit banner message 2020-10-11 16:55:16 -07:00
Chris Cummer
84763f3947
Update CHANGELOG.md 2020-10-11 16:49:06 -07:00
Chris Cummer
36c4a7f428 Fix merge conflict in main.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-11 16:39:47 -07:00
Todd Trimble
65a9894bba Explain time/tzdata import with comment 2020-10-11 19:35:31 -04:00
Todd Trimble
98f3e33f8d Merge remote-tracking branch 'upstream/master' into master 2020-10-11 19:21:17 -04:00
Todd Trimble
0e4f5e8bf8 Blank import tzdata to fix bug on Windows host 2020-10-11 16:20:37 -07:00
Chris Cummer
b527d9c4da
Update golang-github-actions to use go 1.15.2 (#998)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-11 16:18:19 -07:00
Todd Trimble
f2fa715bb5 Merge remote-tracking branch 'upstream/master' into master 2020-10-11 13:07:04 -04:00
Todd Trimble
3ea1d4542a Blank import tzdata to fix bug on Windows host 2020-10-11 13:05:45 -04:00
Chris Cummer
6593827a99 Merge branch 'jmks-improve-test-coverage' 2020-10-09 09:36:00 -07:00
Chris Cummer
470a1deb22 go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-09 09:34:50 -07:00
Jason Schweier
9a2bd261c0 Test Validate func 2020-10-08 20:29:50 -04:00
Jason Schweier
4205327b95 Test NewModuleValidator func 2020-10-08 20:29:50 -04:00
Jason Schweier
b1022d6d18 Fix typo 2020-10-08 20:29:50 -04:00
Chris Cummer
3c53af8c24 Merge branch 'Seanstoppable-cmdrunnertty' 2020-10-08 12:29:48 -07:00
Chris Cummer
4064d42fed Fix go.mod conflict
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-08 12:29:32 -07:00
Sean Smith
cb29f8126c Downgrade tview 2020-10-08 14:54:25 -04:00
Chris Cummer
7ce124aaab
Update CHANGELOG.md 2020-10-08 11:47:44 -07:00
Chris Cummer
a7334b0c58 Merge branch 'dependabot/go_modules/github.com/shirou/gopsutil-2.20.9incompatible' 2020-10-08 11:47:03 -07:00
Chris Cummer
05b9d8adca go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-08 11:46:37 -07:00
Chris Cummer
b96d319b26 Merge branch 'master' into dependabot/go_modules/github.com/shirou/gopsutil-2.20.9incompatible 2020-10-08 11:46:23 -07:00
Chris Cummer
89edac3e8f Merge branch 'dependabot/go_modules/github.com/nicklaw5/helix-0.7.0' 2020-10-08 11:45:19 -07:00
Chris Cummer
8d517eeb5e go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-08 11:44:34 -07:00
Chris Cummer
589af9917a Merge branch 'master' into dependabot/go_modules/github.com/nicklaw5/helix-0.7.0 2020-10-08 11:44:10 -07:00
Chris Cummer
a43b302452 Merge branch 'dependabot/go_modules/github.com/digitalocean/godo-1.46.0' 2020-10-08 11:43:33 -07:00
Chris Cummer
534514f558 go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-08 11:42:45 -07:00
Chris Cummer
2990ff4ac0 Merge branch 'master' into dependabot/go_modules/github.com/digitalocean/godo-1.46.0 2020-10-08 11:42:05 -07:00
Sean Smith
7643109c63 Fix unlocking bug noticed during refactor 2020-10-08 08:17:52 -04:00
Todd Trimble
2f70693656
Correct minor typo in clock settings help text (#993) 2020-10-07 22:11:39 -07:00
Sean Smith
e23cec2897 Let pty be optional 2020-10-07 19:40:26 -04:00
Sean Smith
34154620f6 Handle error handling better
Don't panic
Add function due to reuse
Catch all errors to appease CI
2020-10-07 19:40:26 -04:00
Sean Smith
57bf5c7417 Have cmdrunner use a tty
This lets us get proper coloring
Fixes #577
2020-10-07 19:40:26 -04:00
Sean Smith
c6567d15af
Upgrade travis to 1.15.x (#991)
Missed item from previous upgrade
2020-10-07 19:39:56 -04:00
Chris Cummer
450483791f Obey the linter; make the linter happy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-07 16:06:57 -07:00
Sean Smith
3c63eee8d3
Create generalized todo module (#982)
* Create generalized todo module

Makes existing modules "backends"
This gives us a consistent interface

* Fix check issues

* Fix lint errors

* Make changes to stay on wtfutil todoist fork
2020-10-07 14:58:24 -07:00
Todd Trimble
38e21605a4
Add tests for specified min column width (#990) 2020-10-07 14:56:20 -07:00
Chris Cummer
87ce0d887e Pretty format the GitHub stats
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-06 20:05:19 -07:00
Chris Cummer
f7d99c5eff Don't trim whitespace from beginning of widget
Some widgets format the output using whitespace padding
at the beginning.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-10-06 20:00:50 -07:00
Chris Cummer
0f07cb6980 Add @mhanberg as a contributor 2020-10-06 19:46:49 -07:00
Chris Cummer
264b9875ea Add @trimble as a contributor 2020-10-06 19:42:28 -07:00
Todd Trimble
4192a02594
Add info table tests (#985)
* Add info table tests

* Fix lint error about initialization
2020-10-06 19:41:44 -07:00
Chris Cummer
798d812f80
Update CHANGELOG.md 2020-10-06 19:38:38 -07:00
Chris Cummer
1712034a14 Merge branch 'Seanstoppable-naturalclockorder' 2020-10-06 19:34:34 -07:00
Chris Cummer
15b91b2d28 Merge branch 'naturalclockorder' of github.com:Seanstoppable/wtf into Seanstoppable-naturalclockorder 2020-10-06 19:31:05 -07:00
dependabot-preview[bot]
b8168ce7f2
Bump github.com/digitalocean/godo from 1.44.0 to 1.46.0
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.44.0 to 1.46.0.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.44.0...v1.46.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-06 05:49:32 +00:00
Chris Cummer
f1b31f6f49
Update CHANGELOG.md 2020-10-04 10:35:16 -07:00
Chris Cummer
293ee105f7 Merge branch 'cyingfan-master' 2020-10-04 10:34:05 -07:00
Chris Cummer
a6da089bec Merge branch 'master' of github.com:cyingfan/wtf into cyingfan-master 2020-10-04 10:33:09 -07:00
Ying Fan Chong
2537a7f49a Fix config file path 2020-10-04 20:53:27 +08:00
Sean Smith
fcc2a211df Add natural ordering for clocks
This turns locations into an ordered array, so we can have a 'natural' ordering
This is backwards compatible
Resolves #896
2020-10-03 13:10:50 -04:00
Chris Cummer
f2517b3e64
Update CHANGELOG.md 2020-10-03 09:26:34 -07:00
Sean Smith
cab3f9c658
Upgrade to golang 1.15 (#980) 2020-10-03 09:24:41 -07:00
Chris Cummer
6cc00f54d3 Merge branch 'master' of github.com:wtfutil/wtf 2020-10-03 06:05:56 -07:00
Chris Cummer
04f62d3de8 Add @jamietanna as a contributor 2020-10-03 06:05:50 -07:00
Chris Cummer
c9d65fd7e7 Add @MartinJohns as a contributor 2020-10-03 06:05:15 -07:00
Jamie Tanna
aa8ed14a1b
Document how to install on Arch (#978) 2020-10-03 06:04:46 -07:00
Chris Cummer
2b10f8de88
Update CHANGELOG.md 2020-10-03 06:01:23 -07:00
Chris Cummer
c1f7e3acc9 Merge branch 'cyingfan-master' 2020-10-03 05:58:44 -07:00
Ying Fan Chong
0f36063696 Prevent extra empty line in highlightable text 2020-10-02 20:53:33 +08:00
Ying Fan Chong
9a366ffeb9 Fix sorting for feed without published date 2020-10-02 20:35:20 +08:00
Chris Cummer
772bea0152
Update CHANGELOG.md 2020-10-02 04:12:47 -07:00
Chris Cummer
edf0aa5c14 Add @cyingfan as a contributor 2020-10-02 04:11:04 -07:00
Chris Cummer
d46546a86b Merge branch 'cyingfan-master' 2020-10-02 04:09:59 -07:00
Ying Fan Chong
bdf642b773 Fix help text 2020-10-01 22:24:33 +08:00
Ying Fan Chong
184b3744c2 Apply gofmt 2020-10-01 22:16:19 +08:00
Ying Fan Chong
c4ca3d9b2a Add capability to switch content between title, link and title+content 2020-10-01 22:12:31 +08:00
dependabot-preview[bot]
c8562c533b
Bump github.com/shirou/gopsutil
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.20.8+incompatible to 2.20.9+incompatible.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v2.20.8...v2.20.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-01 05:53:57 +00:00
Chris Cummer
e56b8693a2
Update CHANGELOG.md 2020-09-29 10:10:37 -07:00
Chris Cummer
5e44a01699 Sort exchange rates alphabetically and group same base rates by row color
Before this, exchange rates were read from a map, which meant the
display order was random.

This ensures that the list of exchange rates displays in a consistent
order and visually denotes rates for the same currency.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-09-29 10:06:46 -07:00
Chris Cummer
787d27b498 go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-09-25 06:58:09 -07:00
dependabot-preview[bot]
71a308b87f
Bump github.com/alecthomas/chroma from 0.8.0 to 0.8.1 (#971)
Bumps [github.com/alecthomas/chroma](https://github.com/alecthomas/chroma) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v0.8.0...v0.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Chris Cummer <chriscummer@me.com>
2020-09-25 06:57:56 -07:00
Chris Cummer
4a14acd89c go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-09-25 06:56:42 -07:00
dependabot-preview[bot]
e38ade946a
Bump github.com/nicklaw5/helix from 0.5.9 to 0.7.0
Bumps [github.com/nicklaw5/helix](https://github.com/nicklaw5/helix) from 0.5.9 to 0.7.0.
- [Release notes](https://github.com/nicklaw5/helix/releases)
- [Commits](https://github.com/nicklaw5/helix/compare/v0.5.9...v0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-25 13:56:16 +00:00
Chris Cummer
585f6cc64c
Update CHANGELOG.md 2020-09-25 06:55:58 -07:00
Chris Cummer
10ff19ff24 Merge branch 'master' of github.com:wtfutil/wtf 2020-09-25 06:54:56 -07:00
Chris Cummer
904df45548 go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-09-25 06:54:53 -07:00
dependabot-preview[bot]
6a5f4ba54d
Bump github.com/adlio/trello from 1.7.0 to 1.8.0 (#970)
Bumps [github.com/adlio/trello](https://github.com/adlio/trello) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/adlio/trello/releases)
- [Commits](https://github.com/adlio/trello/compare/v1.7.0...v1.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-25 06:54:18 -07:00
Chris Cummer
dae9135e1d
Revert "Bump google.golang.org/api from 0.30.0 to 0.32.0 (#968)" (#972)
This reverts commit 48dda57473d4532c34a5bc0b765c74f20fc91ae4.
2020-09-25 06:53:21 -07:00
dependabot-preview[bot]
caa721d6e1
Bump github.com/xanzy/go-gitlab from 0.33.0 to 0.38.1 (#969)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.33.0 to 0.38.1.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.33.0...v0.38.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-25 06:51:44 -07:00
dependabot-preview[bot]
48dda57473
Bump google.golang.org/api from 0.30.0 to 0.32.0 (#968)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.30.0 to 0.32.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.30.0...v0.32.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-25 06:50:29 -07:00
Chris Cummer
30b0d8a981
Update CHANGELOG.md 2020-09-25 06:49:56 -07:00
dependabot-preview[bot]
9fb90c02f0
Bump github.com/digitalocean/godo from 1.42.1 to 1.44.0 (#967)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.42.1 to 1.44.0.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.42.1...v1.44.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-25 06:49:46 -07:00
dependabot-preview[bot]
1a596fa635
Bump github.com/mmcdole/gofeed from 1.0.0 to 1.1.0 (#965)
Bumps [github.com/mmcdole/gofeed](https://github.com/mmcdole/gofeed) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/mmcdole/gofeed/releases)
- [Commits](https://github.com/mmcdole/gofeed/compare/v1.0.0...v1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-25 06:48:50 -07:00
Chris Cummer
d672f57c14 Fix warning with type conversion from rune + int to string
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-09-25 06:47:28 -07:00
dependabot-preview[bot]
cae3ae7c4b
Bump github.com/shirou/gopsutil (#962)
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.20.7+incompatible to 2.20.8+incompatible.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v2.20.7...v2.20.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-25 06:18:39 -07:00
dependabot-preview[bot]
17dc53256a
Bump github.com/gdamore/tcell from 1.3.0 to 1.4.0 (#960)
Bumps [github.com/gdamore/tcell](https://github.com/gdamore/tcell) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/gdamore/tcell/releases)
- [Commits](https://github.com/gdamore/tcell/compare/v1.3.0...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-25 06:18:03 -07:00
Chris Cummer
9c9446fc0d fixing goreleaser config
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-09-23 21:06:19 -07:00
Chris Cummer
de91ff797e Work around the issue of etcd/proxy not containing the 'naming' package any more
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-08-28 21:15:12 -07:00
Chris Cummer
5a2c5e2c59 Revert google grpc update
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-08-28 15:43:18 -07:00
Chris Cummer
432f4d2a44
Update CHANGELOG.md 2020-08-28 15:31:40 -07:00
dependabot-preview[bot]
95e048e40d
Bump github.com/digitalocean/godo from 1.42.0 to 1.42.1 (#951)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.42.0 to 1.42.1.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.42.0...v1.42.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-08-28 15:31:25 -07:00
dependabot-preview[bot]
8af1a077ae
Bump github.com/shirou/gopsutil (#946)
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.20.6+incompatible to 2.20.7+incompatible.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v2.20.6...v2.20.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-08-28 15:29:00 -07:00
Chris Cummer
ed26de79cc go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-08-28 15:19:59 -07:00
dependabot-preview[bot]
027439fa3b
Bump google.golang.org/api from 0.29.0 to 0.30.0 (#945)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.29.0 to 0.30.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.29.0...v0.30.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-08-28 15:18:36 -07:00
Chris Cummer
0a1744d80a
Update CHANGELOG.md 2020-07-29 14:33:16 -07:00
Chris Cummer
7aa9106320
Update CHANGELOG.md 2020-07-29 14:21:29 -07:00
Chris Cummer
2ca1be271e Add @timhwang21 as a contributor 2020-07-29 14:19:48 -07:00
Tim Hwang
9b0f4a50e8 fix: fix Jira module title formatting
Closes #942. Filing to get the ball rolling, happy to change anything.
2020-07-29 10:32:34 -04:00
Chris Cummer
5d0781f2d8
Update CHANGELOG.md 2020-07-27 17:24:09 -07:00
Chris Cummer
510c5d576c Merge branch 'WTF-897-exchange-rate-alignment' 2020-07-27 17:22:27 -07:00
Chris Cummer
fa5b35b27b WTF-897 Wrap exchange rate error messages for easier viewing
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-07-27 17:22:14 -07:00
Chris Cummer
fd91a48f58 WTF-897 Exchange Rate improvements
Allows the user to set the precision for their exchange rate values.

Config setting:
```
exchangerates:
  precision: 3
```

Default is `7`.

Also aligns converted values along the decimal place for improved
aesthetics.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-07-27 17:21:36 -07:00
Chris Cummer
077b4d078f
Update CHANGELOG.md 2020-07-27 17:21:03 -07:00
Chris Cummer
a0e34507db Fix merge conflict
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-07-27 17:17:17 -07:00
Chris Cummer
e33ce62d8e
Update CHANGELOG.md 2020-07-27 17:14:43 -07:00
Chris Cummer
e15a7b23f2 Add @aeter as a contributor 2020-07-27 17:14:23 -07:00
Chris Cummer
2054d7c801 Fix merge conflict
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-07-27 17:11:43 -07:00
Chris Cummer
df7499940c go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-07-27 17:10:21 -07:00
dependabot-preview[bot]
0f5b038c7f
Bump github.com/alecthomas/chroma from 0.7.3 to 0.8.0 (#943)
Bumps [github.com/alecthomas/chroma](https://github.com/alecthomas/chroma) from 0.7.3 to 0.8.0.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v0.7.3...v0.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-27 17:08:06 -07:00
dependabot-preview[bot]
83bdb2bcf8
Bump github.com/digitalocean/godo from 1.38.0 to 1.42.0 (#937)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.38.0 to 1.42.0.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.38.0...v1.42.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-27 17:07:36 -07:00
A. Nackov
f051bdb239 Close #876 - fix todo modal editing feeling slow
Fixes #876. The modal shown when editing todos was feeling slow to start
It required an additional hit of `Enter` to show the modal.

This commit fixes it by queueing a `Draw` update - so now the modal
feels fast to show.

Tests:
* ran `make test`
* tested locally with a todo list
2020-07-24 08:20:29 +03:00
Chris Cummer
e581646d31 Include the link in incidents, and set the colours according to user config
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-07-23 09:50:01 -07:00
Chris Cummer
391ce432a7 go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-07-23 06:49:52 -07:00
Chris Cummer
24ba1ee07c Provides the option to display the date the current onCall schedule will
end.

Config setting:

```
  pagerduty:
    showOnCallEnd: [true|false]
```

If `true`, the date will be displayed below the onCall person's name:

```
eng-droplet
1 - Chris Cummer
    Jul 27, 2020
```

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-07-23 06:23:26 -07:00
Chris Cummer
ae097d2e5c Add goversion to Makefile install output
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-07-16 21:14:25 -07:00
Chris Cummer
71d9e1b098 Add @fmotrifork as a contributor 2020-07-12 07:17:56 -07:00
Chris Cummer
e9883ad60d Add ascii text output to some Makefile commands
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-07-12 07:16:47 -07:00
Chris Cummer
d493c4d16f
Update CHANGELOG.md 2020-07-12 07:00:04 -07:00
Chris Cummer
eef204c77e
Update CHANGELOG.md 2020-07-12 06:57:37 -07:00
Chris Cummer
17d5ff95cd
Update CHANGELOG.md 2020-07-12 06:56:54 -07:00
dependabot-preview[bot]
36acf84a04
Bump google.golang.org/api from 0.28.0 to 0.29.0 (#933)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.28.0...v0.29.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-12 06:56:45 -07:00
dependabot-preview[bot]
5a9bdd4a7f
Bump github.com/xanzy/go-gitlab from 0.32.1 to 0.33.0 (#931)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.32.1 to 0.33.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.32.1...v0.33.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-12 06:55:56 -07:00
Chris Cummer
1b04f753c6
Update README.md 2020-07-05 16:59:04 -07:00
Chris Cummer
716227c19a
Update README.md 2020-07-05 16:58:39 -07:00
Chris Cummer
1e4f200219
Update CHANGELOG.md 2020-07-01 08:01:15 -07:00
Chris Cummer
a434668ff8
Update CHANGELOG.md 2020-07-01 08:00:38 -07:00
Chris Cummer
6714bc0903
Update CHANGELOG.md 2020-07-01 07:53:55 -07:00
Chris Cummer
135e978f87 Merge branch 'dependabot/go_modules/github.com/shirou/gopsutil-2.20.6incompatible' 2020-07-01 07:53:26 -07:00
Chris Cummer
1aeba34310 Merge branch 'master' into dependabot/go_modules/github.com/shirou/gopsutil-2.20.6incompatible 2020-07-01 07:52:51 -07:00
dependabot-preview[bot]
48468f8d4d
Bump github.com/digitalocean/godo from 1.37.0 to 1.38.0 (#926)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.37.0 to 1.38.0.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.37.0...v1.38.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-01 07:51:47 -07:00
Chris Cummer
89064ffe7c Merge branch 'dependabot/go_modules/google.golang.org/api-0.28.0' 2020-07-01 07:50:52 -07:00
Chris Cummer
e9071488d4 Merge branch 'master' into dependabot/go_modules/google.golang.org/api-0.28.0 2020-07-01 07:49:29 -07:00
Chris Cummer
90c3f0f0f2 Merge branch 'dependabot/go_modules/golang.org/x/text-0.3.3' 2020-07-01 07:48:22 -07:00
Chris Cummer
c64277e225 Merge branch 'master' into dependabot/go_modules/golang.org/x/text-0.3.3 2020-07-01 07:47:28 -07:00
Chris Cummer
484cb88ef8 Regenerate all-contributors data
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-07-01 07:43:09 -07:00
Chris Cummer
cae65df68f Merge branch 'master' of github.com:wtfutil/wtf 2020-07-01 07:42:23 -07:00
Chris Cummer
9603cc2d1d Add @ripienaar as a contributor 2020-07-01 07:42:14 -07:00
Chris Cummer
bacdc82ede
Update CHANGELOG.md 2020-07-01 07:41:41 -07:00
Chris Cummer
f104859679 Merge branch 'victorops_npe' of github.com:ripienaar/wtf into ripienaar-victorops_npe 2020-07-01 07:39:33 -07:00
Chris Cummer
2cf29e419d Merge branch 'toggle_weather_emoji' of github.com:jonhadfield/wtf into jonhadfield-toggle_weather_emoji 2020-07-01 07:32:44 -07:00
Chris Cummer
3fd813cd9c Schedule code analysis on Wed and Sat
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-07-01 07:31:24 -07:00
dependabot-preview[bot]
12892cbc61
Bump github.com/shirou/gopsutil
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.20.4+incompatible to 2.20.6+incompatible.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v2.20.4...v2.20.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-01 06:44:53 +00:00
R.I.Pienaar
056707d7c2
fix go mod issues not related to pr
Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-06-25 22:27:29 +02:00
R.I.Pienaar
15df0ee2f4
avoid npe on victorops settings
Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-06-25 22:07:43 +02:00
Chris Cummer
898fc6d34a
Create codeql-analysis.yml 2020-06-25 08:46:28 -07:00
Jon Hadfield
426414eb1f
tidy go modules. 2020-06-22 18:57:11 +01:00
Jon Hadfield
3dbfc14056
remove spurious formatting. 2020-06-22 18:56:53 +01:00
Jon Hadfield
0b63a56e40
enable user to disable emoji for weather module. 2020-06-22 18:47:28 +01:00
dependabot-preview[bot]
afc9e2d2af
Bump google.golang.org/api from 0.25.0 to 0.28.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.25.0 to 0.28.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.25.0...v0.28.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-19 06:33:59 +00:00
dependabot-preview[bot]
d38e2c4478
Bump golang.org/x/text from 0.3.2 to 0.3.3
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.2 to 0.3.3.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.2...v0.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-17 06:32:17 +00:00
Chris Cummer
715ec4f952
Update CHANGELOG.md 2020-06-13 04:12:44 -07:00
dependabot-preview[bot]
4a3a3d10ac
Bump github.com/stretchr/testify from 1.6.0 to 1.6.1 (#919)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.6.0...v1.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-13 04:12:21 -07:00
Chris Cummer
21889eeb23
Update CHANGELOG.md 2020-06-13 04:12:02 -07:00
dependabot-preview[bot]
2f96fcd0a8
Bump github.com/digitalocean/godo from 1.36.0 to 1.37.0 (#914)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.36.0 to 1.37.0.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.36.0...v1.37.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-13 04:11:34 -07:00
dependabot-preview[bot]
767004f1eb
Bump github.com/xanzy/go-gitlab from 0.32.0 to 0.32.1 (#916)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.32.0 to 0.32.1.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.32.0...v0.32.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-13 04:11:11 -07:00
Chris Cummer
4432fc1537
Update CHANGELOG.md 2020-06-10 04:51:50 -07:00
Matt
02ef02538d
Update widget.go 2020-06-07 18:11:17 -04:00
Matt Murphy
d3834271e0 Always show incidents if configured 2020-06-07 17:56:13 -04:00
Matt Murphy
aa5e5e70a9 Add TeamIDs and UserIDs filters for incidents 2020-06-07 16:58:44 -04:00
Chris Cummer
068f0e46fd go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-30 13:04:42 -07:00
Chris Cummer
eed194ea83
Update CHANGELOG.md 2020-05-30 13:04:25 -07:00
dependabot-preview[bot]
0eb6fcc47c
Bump github.com/stretchr/testify from 1.5.1 to 1.6.0 (#909)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.5.1...v1.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-30 13:04:12 -07:00
Chris Cummer
6c71564d3e
Update CHANGELOG.md 2020-05-30 13:03:50 -07:00
Chris Cummer
35505394d1 Merge branch 'pihole_5_api_compat' of github.com:jonhadfield/wtf into jonhadfield-pihole_5_api_compat 2020-05-30 13:02:11 -07:00
Jon Hadfield
988a9deee5
make PiHole module compatible with both versions 4 and 5 of PiHole. 2020-05-28 22:12:57 +01:00
Chris Cummer
204e286caa go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-26 21:29:46 -07:00
Chris Cummer
f45c231f48
Update CHANGELOG.md 2020-05-26 21:28:13 -07:00
Chris Cummer
74154dcdf9 Add @mryanmurphy as a contributor 2020-05-26 21:26:53 -07:00
Chris Cummer
a68c20926b Merge branch 'mryanmurphy-master' 2020-05-26 21:26:16 -07:00
Chris Cummer
92285b194f Merge branch 'master' of github.com:mryanmurphy/wtf into mryanmurphy-master 2020-05-26 21:25:11 -07:00
Chris Cummer
dee6629860
Update CHANGELOG.md 2020-05-26 21:23:45 -07:00
dependabot-preview[bot]
e2b958988c
Bump github.com/xanzy/go-gitlab from 0.31.0 to 0.32.0 (#906)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.31.0 to 0.32.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.31.0...v0.32.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-26 21:23:19 -07:00
Matt Murphy
a0a85a5383 Make display whitespace consistent 2020-05-25 00:37:03 -04:00
Chris Cummer
e36d6ba78c Add @gerchardon as a contributor 2020-05-23 12:41:38 -07:00
Chris Cummer
cde24ef8f3
Update CHANGELOG.md 2020-05-23 12:41:05 -07:00
Chris Cummer
b6f2d1423e Merge branch 'fix-gitlabtodo-domain' of github.com:gerchardon/wtf into gerchardon-fix-gitlabtodo-domain 2020-05-23 12:38:22 -07:00
Chris Cummer
a1a11dffff Merge branch 'master' of github.com:wtfutil/wtf 2020-05-23 11:41:25 -07:00
Chris Cummer
6e79c55583 Add back the args value to the golangci-lint action
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-23 11:41:22 -07:00
Chris Cummer
4a9dd411dd
Update CHANGELOG.md 2020-05-23 11:13:58 -07:00
Chris Cummer
0911402926 Update golangci action
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-23 11:12:11 -07:00
Chris Cummer
86c7e127aa Merge branch 'lint' of github.com:sam-github/wtf into sam-github-lint 2020-05-23 11:08:08 -07:00
Chris Cummer
003951c422
Update CHANGELOG.md 2020-05-23 09:50:55 -07:00
Chris Cummer
c80c2fb657 go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-23 09:48:34 -07:00
dependabot-preview[bot]
5694b6d453
Bump google.golang.org/api from 0.23.0 to 0.25.0 (#904)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.23.0 to 0.25.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.23.0...v0.25.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-23 09:47:55 -07:00
dependabot-preview[bot]
234943d9fd
Bump github.com/pkg/profile from 1.4.0 to 1.5.0 (#903)
Bumps [github.com/pkg/profile](https://github.com/pkg/profile) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/pkg/profile/releases)
- [Commits](https://github.com/pkg/profile/compare/v1.4.0...v1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-23 09:47:43 -07:00
Chris Cummer
fdd10ce643 go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-23 09:46:53 -07:00
dependabot-preview[bot]
322dcf618c Bump github.com/nicklaw5/helix from 0.5.8 to 0.5.9
Bumps [github.com/nicklaw5/helix](https://github.com/nicklaw5/helix) from 0.5.8 to 0.5.9.
- [Release notes](https://github.com/nicklaw5/helix/releases)
- [Commits](https://github.com/nicklaw5/helix/compare/v0.5.8...v0.5.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-23 09:46:08 -07:00
Chris Cummer
e554e5b297 go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-23 09:43:51 -07:00
dependabot-preview[bot]
0715af78fe
Bump gopkg.in/yaml.v2 from 2.2.8 to 2.3.0 (#893)
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.8 to 2.3.0.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.8...v2.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-23 09:41:54 -07:00
dependabot-preview[bot]
75eb58d7c7
Bump github.com/digitalocean/godo from 1.35.1 to 1.36.0 (#894)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.35.1 to 1.36.0.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.35.1...v1.36.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-23 09:41:27 -07:00
Chris Cummer
0e3295beec Merge branch 'master' of github.com:wtfutil/wtf 2020-05-23 09:40:36 -07:00
Chris Cummer
bc89be84b0 go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-23 09:40:15 -07:00
dependabot-preview[bot]
dc05338ae7
Bump github.com/alecthomas/chroma from 0.7.2 to 0.7.3 (#891)
Bumps [github.com/alecthomas/chroma](https://github.com/alecthomas/chroma) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v0.7.2...v0.7.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-23 09:39:47 -07:00
Chris Cummer
a5d55eb224 Merge branch 'master' into dependabot/go_modules/github.com/mmcdole/gofeed-1.0.0 2020-05-23 09:38:39 -07:00
Matt Murphy
b6a666fe59 Add setting to hide sections of GitHub module 2020-05-23 11:32:40 -04:00
Chris Cummer
6981b53336 Delete the docker entry from .goreleaser.yml
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-21 15:48:03 -07:00
Gerome Chardon
4a7bdeab3c Fix gitlabtodo usage of domain
Use domain in gitlabtodo
Handle error in gitlabtodo
2020-05-18 10:59:12 +02:00
Sam Roberts
4bb725db9e golangci-lint configuration file
golangci-lint can run all the currently enabled linters, and as far as I
can tell, does it in under 5 seconds as opposed to over 180 seconds
(compare `time make cilint` and `time make lint`).

Some of the linters that are listed in the "enabled" section but
commented out looked like a good idea to me, and fairly low hanging
fruit to fix, but they are not passing at the moment.

All the linters covered in the current Makefile are run.

TODO:
- replace lint target in Makefile with golangci-lint
- remove .github/workflow/errcheck.yml
2020-05-16 12:34:57 -07:00
Chris Cummer
e43c37cc07 Fix broken gCal title
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-15 01:39:11 -07:00
Chris Cummer
cda15e841b
Update CHANGELOG.md 2020-05-13 19:34:54 -07:00
dependabot-preview[bot]
8212fec6e6
Bump github.com/mmcdole/gofeed from 1.0.0-beta2 to 1.0.0
Bumps [github.com/mmcdole/gofeed](https://github.com/mmcdole/gofeed) from 1.0.0-beta2 to 1.0.0.
- [Release notes](https://github.com/mmcdole/gofeed/releases)
- [Commits](https://github.com/mmcdole/gofeed/compare/v1.0.0-beta2...v1.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-14 01:21:15 +00:00
Chris Cummer
3a2b1c988a Add @sam-github as a contributor
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-13 18:19:21 -07:00
Chris Cummer
b49987f935 Add @sam-github as a contributor 2020-05-13 18:18:31 -07:00
Chris Cummer
a732132498
Update CHANGELOG.md 2020-05-13 18:17:28 -07:00
Chris Cummer
12325ee39e Merge branch 'sam-github-secret-store' 2020-05-13 18:14:25 -07:00
Sam Roberts
3c405da087 Use docker-credential-helper to manage secrets
Store service credentials securely in the stores supported by docker:
- https://github.com/docker/docker-credential-helpers#available-programs

Introduces a top-level config property, "secretStore" and additional
command line arguments to manage the stored secrets.

The value of secretStore is used to find a helper command,
`docker-credential-<secretStore>`.

The docker project currently provides 4 store helpers:
- "osxkeychain" (OS X only)
- "secretservice" (Linux only)
- "wincred" (Windows only)
- "pass" (any OS supporting pass, which uses gpg2)

Docker-for-desktop installs the credential helpers above, as well as
"desktop" (docker-credential-desktop).

Generic installation instructions for the helpers:
- https://github.com/docker/docker-credential-helpers#installation

Users could provide additional helpers, the only requirement is that the
helper implements the credential store protocol:
- https://github.com/docker/docker-credential-helpers#development

The credential protocol is open, and new credential stores can be
implemented by any CLI satisfying the protocol:
- https://github.com/docker/docker-credential-helpers#development

The modifications to existing modules is not tested due to lack
of API keys, but demonstrates the unobtrusive changes required to
use the secret store.
2020-05-10 19:26:32 -07:00
Chris Cummer
d247ec0197
Update CHANGELOG.md 2020-05-09 13:03:39 -07:00
Chris Cummer
13b421b08e
Update CHANGELOG.md 2020-05-09 12:52:06 -07:00
Chris Cummer
f0ca3b8a58
Another actions test (#889)
* Another actions test

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Add BuildTest action

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Remove lint check for the time being (so many issues)

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Fix issues found by errcheck

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Fix errors found by staticcheck

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Fix issues found by goimports

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Comment out the  action for the time being

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Fix shadowed variables

Signed-off-by: Chris Cummer <chriscummer@me.com>

* go mod tidy

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Remove buildtest.yml

Signed-off-by: Chris Cummer <chriscummer@me.com>

* go mod tidy

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-09 12:51:08 -07:00
dependabot-preview[bot]
0384258032
Bump google.golang.org/api from 0.22.0 to 0.23.0 (#888)
Bumps [google.golang.org/api](https://github.com/google/google-api-go-client) from 0.22.0 to 0.23.0.
- [Release notes](https://github.com/google/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/google/google-api-go-client/compare/v0.22.0...v0.23.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-09 12:39:38 -07:00
Chris Cummer
222687cebe
Update CHANGELOG.md 2020-05-09 12:39:31 -07:00
dependabot-preview[bot]
0c0838b345
Bump github.com/shirou/gopsutil (#887)
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.20.3+incompatible to 2.20.4+incompatible.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v2.20.3...v2.20.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-09 12:38:39 -07:00
Chris Cummer
9cd9a58759 Fix a bunch of minor issues found by running staticcheck
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-06 22:44:24 -07:00
Chris Cummer
a19c9c3e33
Update CHANGELOG.md 2020-05-02 07:06:54 -07:00
Adriano
e035f3a15a
Add ipv6 support to ipinfo (#885) 2020-05-02 07:05:49 -07:00
Chris Cummer
ad650d3822
Update CHANGELOG.md 2020-05-02 07:01:54 -07:00
Chris Cummer
b552bec903 Add @rsaarelm as a contributor 2020-05-02 07:00:51 -07:00
Risto Saarelma
c6f6036f5a
Fix feed module item sorting (#886)
Thanks!
2020-05-02 06:59:22 -07:00
Chris Cummer
5e7e8667a7
Update CHANGELOG.md 2020-05-02 06:57:27 -07:00
dependabot-preview[bot]
f99e333039
Bump github.com/zorkian/go-datadog-api (#884)
Bumps [github.com/zorkian/go-datadog-api](https://github.com/zorkian/go-datadog-api) from 2.28.0+incompatible to 2.29.0+incompatible.
- [Release notes](https://github.com/zorkian/go-datadog-api/releases)
- [Commits](https://github.com/zorkian/go-datadog-api/compare/v2.28.0...v2.29.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-02 06:57:13 -07:00
Chris Cummer
31b0f1131e
Update CHANGELOG.md 2020-04-28 20:56:24 -07:00
Chris Cummer
45dad9779e Add @mogensen as a contributor 2020-04-28 20:56:04 -07:00
Chris Cummer
d712769511 Merge branch 'mogensen-feature/gitlab-with-browser' 2020-04-28 20:52:40 -07:00
Chris Cummer
880168989c Merge branch 'feature/gitlab-with-browser' of github.com:mogensen/wtf into mogensen-feature/gitlab-with-browser 2020-04-28 20:52:07 -07:00
Chris Cummer
97fa1e51bd
Update CHANGELOG.md 2020-04-28 20:47:40 -07:00
Jon Hadfield
0b3a326fe3
fix digitalclock display bug. (#883) 2020-04-28 20:46:37 -07:00
Chris Cummer
93f8172029 Add @Tdnshah as a contributor 2020-04-28 20:38:07 -07:00
Frederik Mogensen
dbab6be1d4 Gitlab: allow for opening items in browser 2020-04-27 09:08:37 +02:00
Chris Cummer
cc8f5f76ba
Update CHANGELOG.md 2020-04-26 15:38:15 -07:00
Chris Cummer
5a99bbf30b Add @jonhadfield as a contributor 2020-04-25 04:58:41 -07:00
Chris Cummer
394da85e62
Update CHANGELOG.md 2020-04-25 04:54:14 -07:00
Chris Cummer
8613add2df go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-04-25 04:49:04 -07:00
Chris Cummer
daf1e61335 Merge branch 'add_pihole' of github.com:jonhadfield/wtf into jonhadfield-add_pihole 2020-04-23 05:38:10 -07:00
Chris Cummer
894afaa66f Merge branch 'master' of github.com:wtfutil/wtf 2020-04-23 05:37:01 -07:00
Chris Cummer
4dda2e4160 Add @acaloiaro as a contributor 2020-04-23 05:36:54 -07:00
Chris Cummer
af4f4ed83f
Update CHANGELOG.md 2020-04-23 05:36:02 -07:00
Adriano
216124437a
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
2020-04-23 05:32:59 -07:00
dependabot-preview[bot]
ad2ad7437e
Bump github.com/digitalocean/godo from 1.34.0 to 1.35.1 (#880)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.34.0 to 1.35.1.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.34.0...v1.35.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-23 05:31:16 -07:00
Chris Cummer
f895591e8e
Update CHANGELOG.md 2020-04-23 05:29:48 -07:00
dependabot-preview[bot]
4e057db343
Bump google.golang.org/api from 0.21.0 to 0.22.0 (#879)
Bumps [google.golang.org/api](https://github.com/google/google-api-go-client) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/google/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/google/google-api-go-client/compare/v0.21.0...v0.22.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-23 05:29:21 -07:00
Jon Hadfield
72ae0ccd8b
add pihole module. 2020-04-19 21:29:45 +01:00
Chris Cummer
cb0b2f19cf Update GitLab errors
The compiler is happy now....

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-04-18 19:02:27 -07:00
Chris Cummer
409cafc402
Update CHANGELOG.md 2020-04-18 18:54:37 -07:00
dependabot-preview[bot]
04ade97cbc
Bump google.golang.org/api from 0.20.0 to 0.21.0 (#872)
Bumps [google.golang.org/api](https://github.com/google/google-api-go-client) from 0.20.0 to 0.21.0.
- [Release notes](https://github.com/google/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/google/google-api-go-client/compare/v0.20.0...v0.21.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-18 18:54:20 -07:00
Chris Cummer
2adb7db4b3
Update CHANGELOG.md 2020-04-18 18:54:08 -07:00
dependabot-preview[bot]
a2ec97d2d9
Bump github.com/alecthomas/chroma from 0.7.1 to 0.7.2 (#875)
Bumps [github.com/alecthomas/chroma](https://github.com/alecthomas/chroma) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v0.7.1...v0.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-18 18:53:51 -07:00
dependabot-preview[bot]
531e29396f
Bump github.com/xanzy/go-gitlab from 0.29.0 to 0.31.0 (#873)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.29.0 to 0.31.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.29.0...v0.31.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-18 18:53:35 -07:00
dependabot-preview[bot]
70b626ffe8
Bump github.com/shirou/gopsutil (#871)
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.20.2+incompatible to 2.20.3+incompatible.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v2.20.2...v2.20.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-18 18:53:13 -07:00
dependabot-preview[bot]
53ed90dab5
Bump github.com/digitalocean/godo from 1.33.1 to 1.34.0 (#870)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.33.1 to 1.34.0.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.33.1...v1.34.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-18 18:52:47 -07:00
Chris Cummer
a7d615b5ba
Update CHANGELOG.md 2020-03-30 06:43:58 -07:00
dependabot-preview[bot]
15d760dd10
Bump github.com/xanzy/go-gitlab from 0.28.0 to 0.29.0 (#868)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.28.0...v0.29.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-30 06:43:40 -07:00
dependabot-preview[bot]
db55ad59de
Bump github.com/digitalocean/godo from 1.32.0 to 1.33.1 (#867)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.32.0 to 1.33.1.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.32.0...v1.33.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-30 06:43:15 -07:00
dependabot-preview[bot]
3393454e0a
Bump github.com/nicklaw5/helix from 0.5.7 to 0.5.8 (#866)
Bumps [github.com/nicklaw5/helix](https://github.com/nicklaw5/helix) from 0.5.7 to 0.5.8.
- [Release notes](https://github.com/nicklaw5/helix/releases)
- [Commits](https://github.com/nicklaw5/helix/compare/v0.5.7...v0.5.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-30 06:42:51 -07:00
Chris Cummer
fd57ff0724
Update CHANGELOG.md 2020-03-20 19:47:56 -07:00
Chris Cummer
72619a99a4 handle multiple conversions per base currency
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-03-20 19:46:27 -07:00
Indradhanush Gupta
62e3523d29 modules/exchangerate: Display exchange rate for one unit of base currency 2020-03-16 20:23:15 +05:30
Chris Cummer
e453408457
WTF-847 Fix the formatting of the headings in the Docket widget (#862)
* WTF-847 Fix the formatting of the headings in the Docket widget

Fixes #847

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Run 'go mod tidy'

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-03-15 20:27:12 -07:00
Chris Cummer
eab42ade1d
Update CHANGELOG.md 2020-03-15 20:26:59 -07:00
Chris Cummer
80edeef484
Update CHANGELOG.md 2020-03-15 09:48:15 -07:00
Chris Cummer
e396cf1533
Update CHANGELOG.md 2020-03-15 09:38:53 -07:00
dependabot-preview[bot]
38ec02f62d
Bump github.com/zorkian/go-datadog-api (#861)
Bumps [github.com/zorkian/go-datadog-api](https://github.com/zorkian/go-datadog-api) from 2.27.0+incompatible to 2.28.0+incompatible.
- [Release notes](https://github.com/zorkian/go-datadog-api/releases)
- [Commits](https://github.com/zorkian/go-datadog-api/compare/v2.27.0...v2.28.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-15 09:38:27 -07:00
dependabot-preview[bot]
b1cdb67c2d
Bump github.com/adlio/trello from 1.6.0 to 1.7.0 (#859)
Bumps [github.com/adlio/trello](https://github.com/adlio/trello) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/adlio/trello/releases)
- [Commits](https://github.com/adlio/trello/compare/v1.6.0...v1.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-15 09:38:01 -07:00
dependabot-preview[bot]
36f0b6e4b5
Bump github.com/xanzy/go-gitlab from 0.26.0 to 0.28.0 (#858)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.26.0 to 0.28.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.26.0...v0.28.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-15 09:37:47 -07:00
dependabot-preview[bot]
60810aff60
Bump github.com/digitalocean/godo from 1.30.0 to 1.32.0 (#857)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.30.0 to 1.32.0.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.30.0...v1.32.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-15 09:37:08 -07:00
dependabot-preview[bot]
507cba20bc
Bump google.golang.org/api from 0.17.0 to 0.20.0 (#855)
Bumps [google.golang.org/api](https://github.com/google/google-api-go-client) from 0.17.0 to 0.20.0.
- [Release notes](https://github.com/google/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/google/google-api-go-client/compare/v0.17.0...v0.20.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-15 09:36:44 -07:00
dependabot-preview[bot]
bf861da0e3
Bump github.com/shirou/gopsutil (#852)
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.20.1+incompatible to 2.20.2+incompatible.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v2.20.1...v2.20.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-15 09:36:17 -07:00
Chris Cummer
c1abf82b3c
Upgrade to Go 1.14 (#850)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-03-15 09:33:09 -07:00
Chris Cummer
9bba9b33fc
Update CHANGELOG.md 2020-03-08 21:36:10 -07:00
Chris Cummer
740e107aab Add @leterio as a contributor 2020-03-08 21:34:52 -07:00
Vinícius Letério
62f4a17459 ResourceUsage Widget @ Support to enable(default)/disable display of CPU, mem and swap 2020-03-05 01:19:40 -03:00
Chris Cummer
42a1720620
Update CHANGELOG.md 2020-02-23 06:17:30 -08:00
Chris Cummer
3007571704
Update CHANGELOG.md 2020-02-23 06:16:56 -08:00
Chris Cummer
28059c9f66
Update CHANGELOG.md 2020-02-23 06:15:20 -08:00
Chris Cummer
14602299a1 Clean up go.mod via
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-02-23 06:08:25 -08:00
Chris Cummer
fcf78b7d14
Update CHANGELOG.md 2020-02-23 06:07:44 -08:00
dependabot-preview[bot]
538971c28e
Bump github.com/stretchr/testify from 1.4.0 to 1.5.1 (#846)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.4.0 to 1.5.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.4.0...v1.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-23 06:07:39 -08:00
dependabot-preview[bot]
a6d1aafdf8
Bump github.com/xanzy/go-gitlab from 0.25.0 to 0.26.0 (#844)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.25.0 to 0.26.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.25.0...v0.26.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-23 06:06:49 -08:00
dependabot-preview[bot]
47b5abe06c
Bump github.com/nicklaw5/helix from 0.5.6 to 0.5.7 (#842)
Bumps [github.com/nicklaw5/helix](https://github.com/nicklaw5/helix) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/nicklaw5/helix/releases)
- [Commits](https://github.com/nicklaw5/helix/compare/v0.5.6...v0.5.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-23 06:06:12 -08:00
Chris Cummer
7cfc5e0c66
Update CHANGELOG.md 2020-02-22 02:10:22 -08:00
Chris Cummer
14fca518ac Update @bjoernw as a contributor 2020-02-22 02:08:08 -08:00
Chris Cummer
0ae44a4d5c Remove rest of vendor directory
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-02-22 02:04:13 -08:00
Chris Cummer
55c383f11c Merge branch 'master' of github.com:wtfutil/wtf 2020-02-15 13:58:21 -08:00
Chris Cummer
bc1142d7be Add @yesnault as a contributor 2020-02-15 13:58:16 -08:00
Chris Cummer
46d51eebf9
Update CHANGELOG.md 2020-02-15 13:56:53 -08:00
Chris Cummer
629661df05 Fix merge conflict in go.sum
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-02-15 13:53:59 -08:00
Chris Cummer
8dde85989d
Remove some unnecessary type conversions (#841)
* Remove some unnecessary type conversions

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Tidy'd go.mod

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-02-15 13:02:10 -08:00
Chris Cummer
e32565d3b2 Update go.mod
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-02-15 12:40:24 -08:00
Chris Cummer
a1eaccb397
Update CHANGELOG.md 2020-02-15 12:38:44 -08:00
dependabot-preview[bot]
e98a65c3da
Bump github.com/xanzy/go-gitlab from 0.23.0 to 0.25.0 (#840)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.23.0 to 0.25.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.23.0...v0.25.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-15 12:38:24 -08:00
dependabot-preview[bot]
f9c11bf16f
Bump github.com/nicklaw5/helix from 0.5.5 to 0.5.6 (#839)
Bumps [github.com/nicklaw5/helix](https://github.com/nicklaw5/helix) from 0.5.5 to 0.5.6.
- [Release notes](https://github.com/nicklaw5/helix/releases)
- [Commits](https://github.com/nicklaw5/helix/compare/v0.5.5...v0.5.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-15 12:38:05 -08:00
dependabot-preview[bot]
3554684ffb
Bump google.golang.org/api from 0.15.0 to 0.17.0 (#838)
Bumps [google.golang.org/api](https://github.com/google/google-api-go-client) from 0.15.0 to 0.17.0.
- [Release notes](https://github.com/google/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/google/google-api-go-client/compare/v0.15.0...v0.17.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-15 12:37:48 -08:00
dependabot-preview[bot]
dfe55583d8
Bump github.com/zorkian/go-datadog-api (#837)
Bumps [github.com/zorkian/go-datadog-api](https://github.com/zorkian/go-datadog-api) from 2.26.0+incompatible to 2.27.0+incompatible.
- [Release notes](https://github.com/zorkian/go-datadog-api/releases)
- [Commits](https://github.com/zorkian/go-datadog-api/compare/v2.26.0...v2.27.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-15 12:37:05 -08:00
Chris Cummer
11fdb2472e Update @elliotrushton as a contributor 2020-02-15 12:36:25 -08:00
Elliot
6c1828234a
Initial commit of gitlab todo module (#830) 2020-02-15 12:33:23 -08:00
Yvonnick Esnault
2c6e546e1a fix(cds/favorites): next key
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
2020-02-11 15:11:10 +01:00
Yvonnick Esnault
25bcd15793 feat: cds modules
Signed-off-by: Yvonnick Esnault <yvonnick@esnau.lt>
2020-02-05 23:18:12 +01:00
Chris Cummer
e05c21e86f
Update CHANGELOG.md 2020-02-04 15:04:06 -08:00
dependabot-preview[bot]
7ab898c718
Bump github.com/digitalocean/godo from 1.29.0 to 1.30.0 (#832)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.29.0 to 1.30.0.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.29.0...v1.30.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 14:56:07 -08:00
Chris Cummer
eed4cafdfa
Update CHANGELOG.md 2020-02-04 14:55:58 -08:00
dependabot-preview[bot]
f5df6b826e
Bump github.com/shirou/gopsutil (#831)
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.19.12+incompatible to 2.20.1+incompatible.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v2.19.12...v2.20.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 14:55:41 -08:00
Chris Cummer
087aabcfe7
Update CHANGELOG.md 2020-01-31 04:11:20 -08:00
Chris Cummer
115595383d Merge branch 'dependabot/go_modules/github.com/xanzy/go-gitlab-0.23.0' 2020-01-31 04:07:23 -08:00
Chris Cummer
ad49c70e5b Merge branch 'master' into dependabot/go_modules/github.com/xanzy/go-gitlab-0.23.0 2020-01-31 04:06:56 -08:00
Chris Cummer
4bc4a4342f Merge branch 'dependabot/go_modules/github.com/nicklaw5/helix-0.5.5' 2020-01-31 04:06:32 -08:00
Chris Cummer
f2692b0fb7 Merge branch 'master' into dependabot/go_modules/github.com/nicklaw5/helix-0.5.5 2020-01-31 04:06:00 -08:00
Chris Cummer
579b14a4e0 Merge branch 'dependabot/go_modules/gopkg.in/yaml.v2-2.2.8' 2020-01-31 04:05:40 -08:00
Chris Cummer
0b3e22e9b9 Merge branch 'master' into dependabot/go_modules/gopkg.in/yaml.v2-2.2.8 2020-01-31 04:05:00 -08:00
Chris Cummer
45f156598e Merge branch 'dependabot/go_modules/github.com/zorkian/go-datadog-api-2.26.0+incompatible' 2020-01-31 04:04:37 -08:00
Chris Cummer
b1fba82bed Merge branch 'master' into dependabot/go_modules/github.com/zorkian/go-datadog-api-2.26.0+incompatible 2020-01-31 04:04:03 -08:00
Chris Cummer
d7cacefb8d Merge branch 'dependabot/go_modules/github.com/shirou/gopsutil-2.19.12+incompatible' 2020-01-31 04:03:32 -08:00
Chris Cummer
2b1ad14adf Merge branch 'master' into dependabot/go_modules/github.com/shirou/gopsutil-2.19.12+incompatible 2020-01-31 04:02:47 -08:00
Chris Cummer
f32488263e Add @davidsbond as a contributor 2020-01-28 04:24:03 -08:00
Chris Cummer
cb90d95965
Update CHANGELOG.md 2020-01-28 04:23:20 -08:00
Chris Cummer
7fc1ae4e4b Merge branch 'davidsbond-master' 2020-01-28 04:22:09 -08:00
Chris Cummer
ac39734f6d Merge branch 'master' of github.com:davidsbond/wtf into davidsbond-master 2020-01-28 04:20:29 -08:00
Chris Cummer
558a8a0aa4 Merge branch 'master' of github.com:wtfutil/wtf 2020-01-28 04:17:02 -08:00
Chris Cummer
6ce81d2065 Add @firecat53 as a contributor 2020-01-28 04:16:31 -08:00
Chris Cummer
28fb6d9920
Update CHANGELOG.md 2020-01-28 04:16:07 -08:00
Chris Cummer
9a75ac6214 Fix the name of the docker build args
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-01-28 04:13:08 -08:00
Chris Cummer
9551428908 Merge branch 'patch-1' of github.com:firecat53/wtf into firecat53-patch-1 2020-01-28 04:07:13 -08:00
dependabot-preview[bot]
5fac24d73b
Bump github.com/xanzy/go-gitlab from 0.22.3 to 0.23.0
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.22.3 to 0.23.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.22.3...v0.23.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-28 06:33:09 +00:00
dependabot-preview[bot]
2f5963596e
Bump github.com/nicklaw5/helix from 0.5.4 to 0.5.5
Bumps [github.com/nicklaw5/helix](https://github.com/nicklaw5/helix) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/nicklaw5/helix/releases)
- [Commits](https://github.com/nicklaw5/helix/compare/v0.5.4...v0.5.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-27 06:41:34 +00:00
dependabot-preview[bot]
da1654baa7
Bump gopkg.in/yaml.v2 from 2.2.7 to 2.2.8
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.7 to 2.2.8.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.7...v2.2.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 06:35:38 +00:00
dependabot-preview[bot]
bd004d6844
Bump github.com/zorkian/go-datadog-api
Bumps [github.com/zorkian/go-datadog-api](https://github.com/zorkian/go-datadog-api) from 2.25.0+incompatible to 2.26.0+incompatible.
- [Release notes](https://github.com/zorkian/go-datadog-api/releases)
- [Commits](https://github.com/zorkian/go-datadog-api/compare/v2.25.0...v2.26.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-20 06:46:37 +00:00
davidsbond
1acaeb6ef8 Allow specifying k8s context in configuration 2020-01-17 20:42:25 +00:00
dependabot-preview[bot]
b178c913d2
Bump github.com/shirou/gopsutil
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.19.11+incompatible to 2.19.12+incompatible.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v2.19.11...v2.19.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-16 06:41:17 +00:00
Chris Cummer
e46d9eb02c
Update CHANGELOG.md 2020-01-15 21:48:07 -08:00
Chris Cummer
ca241b5d6f Merge branch 'Seanstoppable-xdg' 2020-01-15 21:46:57 -08:00
Chris Cummer
d91a7f88c9 Merge branch 'xdg' of github.com:Seanstoppable/wtf into Seanstoppable-xdg 2020-01-15 21:46:20 -08:00
Chris Cummer
5224a46ee7 Merge branch 'Seanstoppable-upgradetview' 2020-01-15 21:45:21 -08:00
Chris Cummer
965481f589
Update CHANGELOG.md 2020-01-15 21:45:03 -08:00
Chris Cummer
b0d706199f Fix go.mod merge conflict
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-01-15 21:40:27 -08:00
Chris Cummer
fc4e68a150
Update CHANGELOG.md 2020-01-15 21:39:13 -08:00
Chris Cummer
a21d8a06f5 Merge branch 'bjoernw-spacex' 2020-01-15 21:37:33 -08:00
Chris Cummer
7ce90d92df Merge branch 'spacex' of github.com:bjoernw/wtf into bjoernw-spacex 2020-01-15 21:34:43 -08:00
dependabot-preview[bot]
bca635087c Bump github.com/xanzy/go-gitlab from 0.22.2 to 0.22.3 (#820)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.22.2 to 0.22.3.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.22.2...v0.22.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-15 21:32:54 -08:00
Chris Cummer
e96dac34e3
Update CHANGELOG.md 2020-01-15 21:32:48 -08:00
dependabot-preview[bot]
d0f00890e1 Bump github.com/pkg/errors from 0.8.1 to 0.9.1 (#819)
Bumps [github.com/pkg/errors](https://github.com/pkg/errors) from 0.8.1 to 0.9.1.
- [Release notes](https://github.com/pkg/errors/releases)
- [Commits](https://github.com/pkg/errors/compare/v0.8.1...v0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-15 21:32:00 -08:00
Scott Hansen
752cda88e3 Add docker-build and docker-install targets to Makefile 2020-01-12 17:03:23 -08:00
Scott Hansen
571526b993 Add build Dockerfile to build wtfutil from source in Docker and then copy binary to local machine 2020-01-12 16:22:55 -08:00
Scott Hansen
b8710d6c45 Run wtfutil in Docker as unprivileged user 2020-01-12 16:22:09 -08:00
Scott Hansen
8221cb9173 Use progressive build to reduce final image size
- Use progressive build to reduce final image size
- Download source during build so only Dockerfile is required to be present on the build host
- Add a `version` arg so any tag or branch can be built: `docker build --build-arg=version=v0.25.0 -t wtf .`
2020-01-12 14:16:49 -08:00
dependabot-preview[bot]
beccd014f6 Bump github.com/alecthomas/chroma from 0.7.0 to 0.7.1 (#814)
Bumps [github.com/alecthomas/chroma](https://github.com/alecthomas/chroma) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v0.7.0...v0.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 11:01:37 -08:00
dependabot-preview[bot]
b344b36b68 Bump github.com/shirou/gopsutil (#807)
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.19.11+incompatible to 2.19.12+incompatible.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v2.19.11...v2.19.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 11:01:25 -08:00
Bjoern Weidlich
6747784acd
Removing vendor directory 2020-01-08 22:46:04 -08:00
Sean Smith
4eeb6d67a9 Support XDG_CONFIG_HOME
Clean up workflow and eliminate a method
One place where we calculate the full dir

Closes #699
2020-01-08 23:40:45 -05:00
Sean Smith
a876c1257d Upgrade tview
Should fix #618
2020-01-08 22:46:09 -05:00
Bjoern Weidlich
ce0151becc
Added SpaceX Module 2020-01-06 23:21:44 -08:00
Chris Cummer
c1f9c910e1 Add @bjoernw as a contributor 2019-12-30 22:26:33 -05:00
Chris Cummer
cc169f1674
WTF-33 gcal 'showAllDay' option added (#804)
When true, all-day events are displayed. When false, all-day
events are not displayed.

Defaults to true.

Closes #733

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-30 22:25:10 -05:00
Chris Cummer
5f1aeec5ae
Update CHANGELOG.md 2019-12-30 22:24:40 -05:00
Chris Cummer
3e7d5157b2
Update CHANGELOG.md 2019-12-30 22:24:15 -05:00
Chris Cummer
e679a981da
WTF-758 Open HN comments if there's no external link (#802)
If an HN story has no external link associated with it,
open the HN comments page for the story.

Closes #758

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-30 22:21:59 -05:00
Bjoern Weidlich
86b32b3f9f Adding twitch module to display top streams (#805) 2019-12-30 22:20:53 -05:00
Chris Cummer
fa0d8761ae A few minor changes made while updating documentation
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-30 17:26:50 -05:00
Chris Cummer
ac2817613b Fix a spelling mistake in a comment:
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-21 07:59:02 -08:00
Chris Cummer
e1d4e60216
Add myName setting to PagerDuty (#799)
If defined, this name will be highlighted in the PagerDuty widget
when that person is on-call.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-18 21:38:42 -08:00
Chris Cummer
a7facc85fa
Add 'withDate' option to digitalclock module (#797)
When `withDate` is `true`, it displays date information below the clock.
When `withDate` is `false`, it does not display date information.
Defaults to `true`.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-18 21:38:30 -08:00
Chris Cummer
091b2b975f
Update CHANGELOG.md 2019-12-18 21:38:22 -08:00
Chris Cummer
2020c9683a go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-18 07:25:19 -08:00
Chris Cummer
4cbbedc42e
Update CHANGELOG.md 2019-12-18 07:24:09 -08:00
dependabot-preview[bot]
c149ef699f Bump google.golang.org/api from 0.14.0 to 0.15.0 (#800)
Bumps [google.golang.org/api](https://github.com/google/google-api-go-client) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/google/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/google/google-api-go-client/compare/v0.14.0...v0.15.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-18 07:23:50 -08:00
Chris Cummer
7b56b70368
Update CHANGELOG.md 2019-12-18 07:23:15 -08:00
Chris Cummer
d88b3ebaac
Google Calendar subheading now obey global subheading color (#798)
This can still be over-written by setting:

```
   gcal:
      colors:
        day: "orange::b"
```
explicitly in your gCal configuration.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-17 21:39:49 -08:00
Chris Cummer
10f761dbcb
20191217 gosec (#796)
* Add gosec to the Makefile

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Fix some issues found by gosec

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-17 14:59:16 -08:00
Chris Cummer
cde904ff08
Use errcheck to find unhandled errors (#795)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-17 08:26:16 -08:00
Chris Cummer
04ff03ab1c
Testing (#794)
* Testing

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Well, that was enlightening

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-16 20:55:42 -08:00
Chris Cummer
35a8b0e1b5 Things work better when you spell them correctly
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-16 20:38:57 -08:00
Chris Cummer
21255cc875
Actions experiment (#793)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-16 20:37:03 -08:00
Chris Cummer
e9f2500637 Merge branch 'master' of github.com:wtfutil/wtf 2019-12-16 20:26:01 -08:00
Chris Cummer
140dd553e0
WTF-781 Todoist project ID conversion (#789)
* WTF-781 Switch Todoist IDs from `int` to `string`

On platforms that convert an `int` to `int32`, like the Raspberry Pi,
an `int` is not large enough to store Todoist project IDs.

Using a `string` ensures this never becomes a problem.

Fixes #781

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-16 20:25:52 -08:00
Chris Cummer
3a388fba23
20191215 code improvements (#790)
* Upgrade godo to latest
* Fix a bunch of issues found by
* Running staticcheck on a codebase for the first time is a sobering experience
* go mod tidy
* More static improvements

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-16 20:25:29 -08:00
Chris Cummer
af64882306 Upgrade godo to latest
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-16 20:20:30 -08:00
dependabot-preview[bot]
e71038ccf2 Bump github.com/digitalocean/godo from 1.22.0 to 1.29.0 (#791)
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.22.0 to 1.29.0.
- [Release notes](https://github.com/digitalocean/godo/releases)
- [Changelog](https://github.com/digitalocean/godo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/digitalocean/godo/compare/v1.22.0...v1.29.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-16 16:41:53 -08:00
Chris Cummer
37efebf122
Removed the Scarf installation instructions
My username is no longer accepted on the site, I cannot update build releases anymore.
2019-12-15 04:12:09 -08:00
Chris Cummer
b7f8ec5ae2
Use WTF's version of spotigopher (#787)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-14 21:24:18 -08:00
Chris Cummer
53e795384b Additional improvements to the Makefile
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-14 08:58:31 -08:00
Chris Cummer
3d4059de02 go mod vendor update
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-14 08:52:34 -08:00
Chris Cummer
703619bf0a
WTF-748 Fixes and improves module templating (#786)
Fixes and improves the module templating for creating new bare-bones
text widgets.

This command:

    WTF_WIDGET_NAME=MyNewWidget go generate -run=text

now properly generates:

    * the module directory in the /modules directory
    * the widget.go file
    * the settings.go file

with no linter warnings or errors.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-14 08:46:02 -08:00
Chris Cummer
1686c9a6a9 Add small_config.yml for testing
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-13 22:33:28 -08:00
Chris Cummer
ed1e6b2508
WTF-784 Fix CmdRunner title spacing issue (#785)
Closes #784.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-13 21:26:53 -08:00
Chris Cummer
746ead5747 Improve the Makefile
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-13 16:23:41 -08:00
Chris Cummer
5a6424839d Improve the Makefile
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-13 16:10:13 -08:00
Chris Cummer
b8c87c7dd8 Add @liyiheng as a contributor 2019-12-13 16:00:35 -08:00
Chris Cummer
21d0c8491f
Update README.md 2019-12-13 15:10:08 -08:00
Chris Cummer
1a0b0e6886
Update CHANGELOG.md 2019-12-13 14:51:45 -08:00
Chris Cummer
a8034fb33e
Update CHANGELOG.md 2019-12-13 14:50:54 -08:00
Chris Cummer
5291a31afd
Update CHANGELOG.md 2019-12-13 14:22:04 -08:00
Chris Cummer
58299c2efa
WTF-484 DigitalOcean module (#782)
* WTF-484 DigitalOcean module stubbed out
* WTF-484 Delete droplets via Ctrl-d
* WTF-484 Rebasing off master after a long time away
* WTF-484 Improve DigitalOcean display
* WTF-484 Can shutdown and restart the selected droplet
* WTF-484 Display info about the selected droplet using the ? key
* WTF-484 Display info about the selected droplet using the Return key
* WTF-484 Greatly improve the utils.Truncate function
* WTF-484 Display a droplet's features in the info modal
* WTF-484 Change reboot key from r to b to not conflict with refresh
* WTF-484 Panic if a keyboard control is mapped to the same character more than once
* WTF-484 Colorize droplet status indicator
* WTF-484 Extract view.InfoTable out into a reusable component
2019-12-13 11:33:29 -08:00
Chris Cummer
e1f1d0a410
WTF-781 Clean up Todoist project ID handling a bit (#783)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-13 08:51:12 -08:00
Chris Cummer
ac18990a8c Add @Gibstick as a contributor 2019-12-13 08:49:43 -08:00
Chris Cummer
f3ac07cd73
Update CHANGELOG.md 2019-12-13 08:49:07 -08:00
Charlie Wang
f1ed15a8e4 Prevent flickering in cmdRunner widgets (#778)
* Prevent flickering in cmdRunner widgets

This commit removes flickering in the cmdRunner widgets while preserving
the live-update functionality. It amends 45b955 by not redrawing on
every write call. Instead, the logic in Refresh is as follows:

1. If the command is already running, it will not try to re-run the
command. The default case in the select will trigger a re-draw instead
so that new output can be seen. This accommodates long-runing commands
eg. tailing a log.
2. If the command is not already running, it will trigger a new run.
When the command terminates, it will trigger a re-draw. This means the
widget refreshes as soon as possible, to accommodate the original use
case of running a command and displaying its output in the widget.

In all cases, the widget will not re-draw more often than the refresh
interval. This is what eliminates flickering, since the previous
implementation before using goroutines was not redrawing more than once
per refresh interval.

* Remove useless locking in Refresh

Since the Refresh command doesn't actually block on anything, and the
goroutines have their own locking, Refresh shouldn't lock.
2019-12-13 08:47:09 -08:00
Chris Cummer
5f23a0c11f
Update CHANGELOG.md 2019-12-13 08:37:33 -08:00
Nikolay Mateev
ff2f07812d Enable Jenkins module to work with Multi-configuration projects (#779)
Awesome, thanks!
2019-12-13 08:36:11 -08:00
Chris Cummer
05b20ba4b7 Merge branch 'master' of github.com:wtfutil/wtf 2019-12-13 08:32:55 -08:00
Chris Cummer
64f055d708 Add @NickyMateev as a contributor 2019-12-13 08:32:16 -08:00
Chris Cummer
1981dbf383
Update CHANGELOG.md 2019-12-13 08:31:54 -08:00
Nikolay Mateev
4ec9d33a6f Add shortcuts for GitHub Pull Requests and Issues (#777) 2019-12-13 08:27:35 -08:00
Chris Cummer
9f6a72d674 Tidy go.mod
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-12 16:59:20 -08:00
dependabot-preview[bot]
c259e80721 Bump github.com/olekukonko/tablewriter from 0.0.3 to 0.0.4 (#776)
Bumps [github.com/olekukonko/tablewriter](https://github.com/olekukonko/tablewriter) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/olekukonko/tablewriter/releases)
- [Commits](https://github.com/olekukonko/tablewriter/compare/v0.0.3...v0.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-12 16:58:50 -08:00
Chris Cummer
9bea20442f Fix styling issue with IPInfo module
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-12 11:29:53 -08:00
Chris Cummer
98de21374a go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-05 06:26:53 -08:00
dependabot-preview[bot]
d1ed36a547 Bump github.com/xanzy/go-gitlab from 0.22.1 to 0.22.2 (#775)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.22.1 to 0.22.2.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.22.1...v0.22.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-05 06:26:07 -08:00
Chris Cummer
8b9b326a59
Update CHANGELOG.md 2019-12-05 06:26:01 -08:00
dependabot-preview[bot]
297978b104 Bump github.com/shirou/gopsutil (#772)
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.19.10+incompatible to 2.19.11+incompatible.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v2.19.10...v2.19.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-05 06:24:37 -08:00
Chris Cummer
3d513e9c00 Alias 'make isntall' to 'make install' because I have incompetent fingers
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-01 20:51:01 -08:00
Chris Cummer
31926fd4a7
Integrate vendored NewRelic dependency (#767)
The NewRelic module relies on yfronto/newrelic, which no longer exists.
yfronto deleted that directory quite awhile ago, and since then it has
been vendored.

But vendoring a missing repository creates problems when trying to
update the vendored code.

This PR brings the yfronto/newrelic code into the mainline.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-01 20:47:02 -08:00
Chris Cummer
d9464c4a22
Use errwrap to improve fmt.Errorf() handling (#771)
Errwrap: https://github.com/fatih/errwrap

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-01 20:46:52 -08:00
dependabot-preview[bot]
e19409d278 Bump github.com/adlio/trello from 1.4.0 to 1.6.0 (#769)
Bumps [github.com/adlio/trello](https://github.com/adlio/trello) from 1.4.0 to 1.6.0.
- [Release notes](https://github.com/adlio/trello/releases)
- [Commits](https://github.com/adlio/trello/compare/v1.4.0...v1.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-29 05:12:43 -08:00
Chris Cummer
325551c227
Update CHANGELOG.md 2019-11-27 06:39:20 -08:00
Chris Cummer
07bcb79a22 Add @jottr as a contributor 2019-11-27 06:38:00 -08:00
Chris Cummer
251e34af22 Explicit default false for CmdRunner.tail setting
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-27 06:35:39 -08:00
Chris Cummer
31ae08d4ca
Update CHANGELOG.md 2019-11-27 05:49:28 -08:00
Chris Cummer
06ffc6cd3d go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-27 05:46:35 -08:00
dependabot-preview[bot]
c8b62d8b3e Bump github.com/adlio/trello from 1.4.0 to 1.6.0 (#763)
Bumps [github.com/adlio/trello](https://github.com/adlio/trello) from 1.4.0 to 1.6.0.
- [Release notes](https://github.com/adlio/trello/releases)
- [Commits](https://github.com/adlio/trello/compare/v1.4.0...v1.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 05:46:16 -08:00
Chris Cummer
3a6bbee6d4 go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-27 05:41:33 -08:00
dependabot-preview[bot]
48882ef759 Bump github.com/alecthomas/chroma from 0.6.8 to 0.7.0 (#762)
Bumps [github.com/alecthomas/chroma](https://github.com/alecthomas/chroma) from 0.6.8 to 0.7.0.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v0.6.8...v0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 05:40:25 -08:00
dependabot-preview[bot]
758296f973 Bump github.com/olekukonko/tablewriter from 0.0.2 to 0.0.3 (#761)
Bumps [github.com/olekukonko/tablewriter](https://github.com/olekukonko/tablewriter) from 0.0.2 to 0.0.3.
- [Release notes](https://github.com/olekukonko/tablewriter/releases)
- [Commits](https://github.com/olekukonko/tablewriter/compare/v0.0.2...v0.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 05:38:54 -08:00
dependabot-preview[bot]
a51dd30e7a Bump github.com/pkg/profile from 1.3.0 to 1.4.0 (#759)
Bumps [github.com/pkg/profile](https://github.com/pkg/profile) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/pkg/profile/releases)
- [Commits](https://github.com/pkg/profile/compare/v1.3.0...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 05:37:57 -08:00
dependabot-preview[bot]
4d5722b5e9 Bump gopkg.in/yaml.v2 from 2.2.5 to 2.2.7 (#757)
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.5 to 2.2.7.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.5...v2.2.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 05:36:41 -08:00
Chris Cummer
99a0d7f0ae go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-27 05:35:18 -08:00
dependabot-preview[bot]
80698d5d23 Bump google.golang.org/api from 0.13.0 to 0.14.0 (#756)
Bumps [google.golang.org/api](https://github.com/google/google-api-go-client) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/google/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/google/google-api-go-client/compare/v0.13.0...v0.14.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 05:34:54 -08:00
dependabot-preview[bot]
558dfd92c6 Bump github.com/xanzy/go-gitlab from 0.22.0 to 0.22.1 (#755)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.22.0 to 0.22.1.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.22.0...v0.22.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 05:33:19 -08:00
Chris Cummer
4b83183d02
Update CHANGELOG.md 2019-11-16 19:57:02 -08:00
Chris Cummer
d968c03c7a Add @TDHTTTT as a contributor 2019-11-16 19:56:29 -08:00
Chris Cummer
b86467155e
Update CHANGELOG.md 2019-11-16 19:55:29 -08:00
TDHTTTT
307d8aead0 add a case where subreddit link length is less than widet.settings.numberOfPosts (#754) 2019-11-16 19:53:52 -08:00
Toon Schoenmakers
c8a14e7685 Keep an initial order of the currencies so they won't be in a different order after refreshing (#752)
This purely happend due to maps not keeping the order items are in. This way
it at least won't change throughout the runtime of wtfutil. Ideally it would
use and keep the order as specified by the user in the configuration but
right now there is no way to enforce this.
2019-11-16 19:47:52 -08:00
Chris Cummer
f81c0adb0f Tidy go.mod
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-15 21:04:56 -08:00
Chris Cummer
53ee5b7d8a
Update CHANGELOG.md 2019-11-15 21:02:32 -08:00
dependabot-preview[bot]
fdf6e000cb Bump github.com/zorkian/go-datadog-api (#751)
Bumps [github.com/zorkian/go-datadog-api](https://github.com/zorkian/go-datadog-api) from 2.24.0+incompatible to 2.25.0+incompatible.
- [Release notes](https://github.com/zorkian/go-datadog-api/releases)
- [Commits](https://github.com/zorkian/go-datadog-api/compare/v2.24.0...v2.25.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-15 21:01:51 -08:00
Chris Cummer
7e6e8b2042
Update CHANGELOG.md 2019-11-15 20:57:57 -08:00
Chris Cummer
b9cf3dc5a2 Merge branch 'schoentoon-exchangerates' 2019-11-15 20:57:20 -08:00
Chris Cummer
435bc59a01 Merge branch 'exchangerates' of github.com:schoentoon/wtf into schoentoon-exchangerates 2019-11-15 20:56:44 -08:00
Chris Cummer
b3fc9e39db
Update CHANGELOG.md 2019-11-15 20:56:17 -08:00
Chris Cummer
d62356f930 Merge branch 'master' of github.com:3mard/wtf into 3mard-master 2019-11-15 20:53:31 -08:00
Chris Cummer
4d20fa1195
WTF-747 Fix resourceusage swap label bug (#750)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-13 17:18:17 -08:00
Chris Cummer
428ff80f1d New header logo
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-12 22:08:50 -08:00
Chris Cummer
a0b45fe891
Update CHANGELOG.md 2019-11-12 20:29:11 -08:00
Chris Cummer
b53f69b472 Merge branch 'update-goproxy' of github.com:chenrui333/wtf into chenrui333-update-goproxy 2019-11-12 20:24:06 -08:00
Chris Cummer
f09923b5b8 Add @schoentoon as a contributor 2019-11-12 20:19:45 -08:00
Chris Cummer
20792c13f0
Update CHANGELOG.md 2019-11-12 20:16:24 -08:00
Toon Schoenmakers
14c2e0c627 Added a setting to hide the completed downloads in the transmission module (#746) 2019-11-12 20:14:49 -08:00
Chris Cummer
c6a10295c1
Set Twitter Stats wrap to false (#745)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-12 20:10:39 -08:00
Chris Cummer
bf85d4b144
IPInfo styling (#744)
* WIP

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Fix the colour scheme for IPInfo to match other modules

Now uses standard label and text colours.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-12 20:10:26 -08:00
Toon Schoenmakers
244a86cb7e Implemented a module that shows exchange rates from exchangeratesapi.io 2019-11-12 18:06:45 +01:00
Chris Cummer
1fda7492e4
Update FUNDING.yml 2019-11-11 21:42:33 -08:00
Rui Chen
996de81ecd Remove go 1.12 support (goproxy syntax issue) 2019-11-10 15:24:55 -05:00
Rui Chen
c97e4e1078 Update goproxy to default proxy.golang.org 2019-11-10 14:57:39 -05:00
Chris Cummer
f873baea7f
Update CHANGELOG.md 2019-11-10 11:29:57 -08:00
Chris Cummer
a6468c585b Remove docker from the build pipeline
Docker continues to be a pain in the ass.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-10 11:26:33 -08:00
Omar
29d3a16491
add pocket widget 2019-11-10 13:59:20 +01:00
Chris Cummer
251e3fe10d
Add warning for empty grid values (#741)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-09 15:13:30 -08:00
Chris Cummer
b2093314f0 Fix grid: key issue when key is present
Really do need it to work with and without a grid: key.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-09 14:13:47 -08:00
Chris Cummer
5bbbda22aa Remove stray grid: key from dynamic_config.yml
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-09 14:11:36 -08:00
Chris Cummer
a18fce88ac
WTF-718 Fixes missing grid issue when running CmdRunner (#740)
Closes #718 and closes #730.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-09 14:09:13 -08:00
Chris Cummer
7c22408636 Tidy go.mod
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-09 11:30:00 -08:00
dependabot-preview[bot]
e8bc58043f Bump github.com/xanzy/go-gitlab from 0.21.0 to 0.22.0 (#739)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.21.0...v0.22.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-09 11:26:59 -08:00
dependabot-preview[bot]
867576c249 Bump github.com/olekukonko/tablewriter from 0.0.1 to 0.0.2 (#737)
Bumps [github.com/olekukonko/tablewriter](https://github.com/olekukonko/tablewriter) from 0.0.1 to 0.0.2.
- [Release notes](https://github.com/olekukonko/tablewriter/releases)
- [Commits](https://github.com/olekukonko/tablewriter/compare/v0.0.1...v0.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-09 11:26:41 -08:00
dependabot-preview[bot]
d81891f6cc Bump github.com/shirou/gopsutil (#736)
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.19.9+incompatible to 2.19.10+incompatible.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v2.19.9...v2.19.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-09 11:26:24 -08:00
dependabot-preview[bot]
777bcd08b6 Bump gopkg.in/yaml.v2 from 2.2.4 to 2.2.5 (#735)
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.4 to 2.2.5.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.4...v2.2.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-09 11:25:55 -08:00
Chris Cummer
c16560decd Merge branch 'dependabot/go_modules/github.com/alecthomas/chroma-0.6.9' 2019-11-09 11:25:14 -08:00
Chris Cummer
5bed417faa Fix merge conflict in go.mod
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-09 11:24:59 -08:00
Chris Cummer
e081222531
Update CHANGELOG.md 2019-11-09 11:22:53 -08:00
Chris Cummer
200dbcc03c
WTF-730 Fix missing color key config error (#738)
* WTF-730 Fix missing color key config error

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-730 Add Subheading color formatting to modules

Users can now set a `subheading` color in their config to change the
color of subheadings in widget display.

Defaults to `red`.

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-730 Fix oustanding color issues

Clean up missing color config changes not addressed in earlier commits.

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Remove unused dependency

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-730 Base cleanup

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-730 Fix a few bugs related to color config changes

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-730 Fix issues with PagerDuty subheading display

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-730 Fix bug with Todo list colour rendering

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-09 11:21:45 -08:00
dependabot-preview[bot]
11b174288b
Bump github.com/alecthomas/chroma from 0.6.8 to 0.6.9
Bumps [github.com/alecthomas/chroma](https://github.com/alecthomas/chroma) from 0.6.8 to 0.6.9.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v0.6.8...v0.6.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-05 07:25:53 +00:00
Chris Cummer
1bfca29d17
WTF-657 Add spec coverage for cfg/common_settings.go (#728)
* WTF-657 Add spec coverage for cfg/common_settings.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for cfg/position_validation.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for cfg/validations.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for checklist/checklist.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for checklist/checklist_item.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for utils/conversions.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Get rid of utils.Home() function

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for utils/homedir.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for utils/text.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Clean up utils/utils.go

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-10-30 17:35:00 -07:00
Chris Cummer
837dc92cfc
Remove Hacktoberfest message 2019-10-30 06:58:59 -07:00
dependabot-preview[bot]
83b98e4a03 Bump google.golang.org/api from 0.11.0 to 0.13.0 (#726)
* Bump google.golang.org/api from 0.11.0 to 0.13.0

Bumps [google.golang.org/api](https://github.com/google/google-api-go-client) from 0.11.0 to 0.13.0.
- [Release notes](https://github.com/google/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/google/google-api-go-client/compare/v0.11.0...v0.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Tidy go.sum

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-10-30 06:30:45 -07:00
Chris Cummer
b36cb5cf5e
Update CHANGELOG.md 2019-10-29 18:08:05 -07:00
Chris Cummer
0d11940004
Update CHANGELOG.md 2019-10-29 18:03:35 -07:00
Chris Cummer
ada434b3c3
Merge pull request #715 from Ameobea/twitterstats
Twitterstats
2019-10-29 17:55:57 -07:00
Casey Primozic
a99af9a091
Support both bearer + consumer tokens for Twitter modules
* Add support to both the twitter and twitterstats modules for authenticating using both bearer tokens as well as consumer key + secret.
  * A bearer token is defaulted to if it's supplied
  * Add this support to both the twitterstats module as well as to the existing twitter module, modifying its functionality to re-use the same HTTP client and handle authentication upfront via oauth2
2019-10-29 03:15:57 -07:00
Chris Cummer
41c301fd7c
Update CHANGELOG.md 2019-10-25 08:01:52 -07:00
Chris Cummer
516a8b3da7
Update CHANGELOG.md 2019-10-25 08:01:30 -07:00
Chris Cummer
263d3ec994 Add @madepolli as a contributor 2019-10-25 07:59:43 -07:00
Chris Cummer
59501353e7
Merge pull request #724 from madepolli/modded_resourceusage
modded resourceusage
2019-10-25 07:58:11 -07:00
Chris Cummer
90321636c3
Update CHANGELOG.md 2019-10-25 07:53:59 -07:00
Chris Cummer
663de7d37f Add @C123R as a contributor 2019-10-25 07:52:54 -07:00
Chris Cummer
7030eecbdd
Merge pull request #720 from C123R/master
Adds football fixtures/standings widget
2019-10-25 07:52:06 -07:00
Matjaž Depolli
900d0d0ea5 modded resourceusage 2019-10-25 12:54:16 +02:00
Cizer Pereira
5261325771 fix: resolve PR commits 2019-10-25 08:27:14 +02:00
Chris Cummer
c230853364
Merge pull request #723 from wtfutil/20191024-go-mod-tidy
Tidy go.mod
2019-10-24 10:41:10 -07:00
Cizer Pereira
47941026f2 fix: validation build issues 2019-10-24 18:44:24 +02:00
Cizer Pereira
22b40ff0ec fix: mark favorite with 2019-10-24 18:37:16 +02:00
C123R
6a3a5ea7ec
Merge branch 'master' into master 2019-10-24 15:34:26 +02:00
Cizer Pereira
e7e1463181 feat: Add new widget for football scores and standings 2019-10-24 15:28:01 +02:00
Chris Cummer
f3839d6cca Tidy go.mod
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-10-24 04:12:59 -07:00
Chris Cummer
a8fae544c4
Merge pull request #722 from wtfutil/dependabot/go_modules/github.com/xanzy/go-gitlab-0.21.0
Bump github.com/xanzy/go-gitlab from 0.20.1 to 0.21.0
2019-10-24 04:11:55 -07:00
Chris Cummer
581a28f6ec
Merge pull request #721 from wtfutil/dependabot/go_modules/github.com/alecthomas/chroma-0.6.8
Bump github.com/alecthomas/chroma from 0.6.7 to 0.6.8
2019-10-24 04:10:12 -07:00
Chris Cummer
dd4438d4a9
Merge pull request #717 from hemu/add-view-tests
Add keyboard widget tests
2019-10-24 04:09:02 -07:00
dependabot-preview[bot]
3c21afef6d
Bump github.com/xanzy/go-gitlab from 0.20.1 to 0.21.0
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.20.1 to 0.21.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.20.1...v0.21.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-24 06:46:25 +00:00
dependabot-preview[bot]
54c0739674
Bump github.com/alecthomas/chroma from 0.6.7 to 0.6.8
Bumps [github.com/alecthomas/chroma](https://github.com/alecthomas/chroma) from 0.6.7 to 0.6.8.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v0.6.7...v0.6.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-24 06:45:56 +00:00
Casey Primozic
d82eda1933
Improvements to twitterstats code from review
* Unmarshal directly into a `TwitterStats` struct by using json struct annotations
 * Pull stats fetching for a single user out into its own function so that closing the request body is done after each request and the HTTP request can be re-used for multiple usernames' stats
 * Improve type casting code used in settings parsing logic
2019-10-23 11:49:33 -07:00
hmuar
20e30fdefc rename tests to be consistent with other test files 2019-10-22 23:53:21 -07:00
hmuar
b934096832 add tests for keyboard_widget 2019-10-22 23:52:58 -07:00
Casey Primozic
3c95d8e39d
Improve styling + remove unused code
* Got rid of unused struct fields, unused settings, added some comments to functions + structs
2019-10-22 13:23:17 -07:00
Casey Primozic
0be63a404c
Implement Twitter API fetching for twitterstats
* Create Oauth2 client configured for Twitter and create a HTTP client out of that
 * Fetch user stats for each of the users, parse out of JSON, and return stats as stats structs
2019-10-22 12:42:11 -07:00
Casey Primozic
4c9990bafd
Implement initial twitterstats module
* Create module skeleton based off of the existing twitter module
  * Strip out unused pieces and try to make it as minimal as possible
 * Implement settings parsing, converting the untyped `screenNames` slice into an slice of strings
 * Implement initial minimal display, showing a table with all usernames and their follower count + # of tweets (using dummy metrics for now)
2019-10-22 11:58:20 -07:00
Chris Cummer
d7b0669796 Add @Daanikus as a contributor 2019-10-21 21:19:48 -07:00
Chris Cummer
97bf42045b
Merge pull request #712 from Daanikus/close-file
Close unclosed file
2019-10-21 21:19:11 -07:00
Chris Cummer
7f89620225 Add @hemu as a contributor 2019-10-21 21:15:40 -07:00
Chris Cummer
d5478af03a
Merge pull request #710 from hemu/add-bargraph-test
Add tests for bargraph view
2019-10-21 21:14:58 -07:00
Chris Cummer
be3ad2d769
Update CHANGELOG.md 2019-10-21 21:13:45 -07:00
Chris Cummer
8c328f01e7 Merge branch 'indradhanush-indradhanush/add-vendor-check-to-builds' 2019-10-21 21:12:18 -07:00
Chris Cummer
e9cd22f082 Merge branch 'indradhanush/add-vendor-check-to-builds' of github.com:indradhanush/wtf into indradhanush-indradhanush/add-vendor-check-to-builds 2019-10-21 21:11:04 -07:00
Chris Cummer
a64e026b4b
Update CHANGELOG.md 2019-10-21 21:10:23 -07:00
Chris Cummer
a8d11390fe Add @3mard as a contributor 2019-10-21 21:09:13 -07:00
Chris Cummer
cb636881c3 Merge branch 'master' of github.com:wtfutil/wtf 2019-10-21 21:08:14 -07:00
Chris Cummer
f6871385f5
Merge pull request #706 from caalberts/improve-gitlab-calls
Improve gitlab calls
2019-10-21 21:05:19 -07:00
Daanikus
db9f3c7b99 close unclosed file 2019-10-22 17:00:43 +13:00
hmuar
0fd763805a Add tests for bargraph view for full coverage 2019-10-20 18:15:22 -07:00
Indradhanush Gupta
80539def51 Update go.mod and go.sum
Running `go mod tidy` results in these changes
2019-10-20 17:06:33 +05:30
Indradhanush Gupta
d399073695 Add script to check for uncommitted vendor changes in build 2019-10-20 16:47:36 +05:30
Omar
e7a42e05b5
chore: adjust ToDo to use ScrollableWidget 2019-10-20 13:10:15 +02:00
Albert Salim
f1303bcc2f Rename "Approval Requests" to "Assigned Merge Requests" 2019-10-19 10:15:38 +08:00
Albert Salim
fa1bdade76 Add user context to GitLab project
- Get MergeRequests and Issues with user's ID
2019-10-19 10:13:54 +08:00
Chris Cummer
9a1b350f4e
Merge pull request #705 from felicianotech/fix-default-config
Remove blank line from default config.
2019-10-17 17:09:17 -04:00
Chris Cummer
9e71c782e1 Add @felicianotech as a contributor 2019-10-17 17:07:21 -04:00
Chris Cummer
40657d78a2 Merge branch 'felicianotech-fix-gomod' 2019-10-17 17:05:30 -04:00
Ricardo N Feliciano
b90ae573c3 Remove blank line from default config. 2019-10-16 19:21:55 -04:00
Ricardo N Feliciano
946e79509d Remake/fix go.mod. 2019-10-16 18:51:58 -04:00
Chris Cummer
26cd4f775f Fix typo in readme
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-10-15 15:52:57 -04:00
Chris Cummer
1dab3746b6 Update readme
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-10-15 15:51:32 -04:00
Chris Cummer
b0a114da8a
Update CHANGELOG.md 2019-10-15 15:41:22 -04:00
Chris Cummer
c2ba8d40d3 Add @caalberts as a contributor 2019-10-15 15:39:52 -04:00
Chris Cummer
031ecf0a76 Merge branch 'caalberts-gitlab-issues' 2019-10-15 15:39:09 -04:00
Chris Cummer
6f632292cb Merge branch 'gitlab-issues' of github.com:caalberts/wtf into caalberts-gitlab-issues 2019-10-15 15:36:33 -04:00
Chris Cummer
2918e49346 Fix failing specs
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-10-15 15:33:03 -04:00
Chris Cummer
e43430e7ad Merge branch 'openutilupdate' of github.com:Seanstoppable/wtf into Seanstoppable-openutilupdate 2019-10-15 15:27:56 -04:00
Chris Cummer
9a8771d66a Add docker target back to .goreleaser.yml
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-10-15 15:25:29 -04:00
Chris Cummer
90287c657d
Update CHANGELOG.md 2019-10-15 15:23:27 -04:00
Chris Cummer
8008e108e6
Merge pull request #696 from Boot-Error/feature-docker
Run wtf inside docker container
2019-10-15 12:21:53 -07:00
Chris Cummer
2fa69d1895 Merge branch 'noxer-master' 2019-10-15 15:05:22 -04:00
Chris Cummer
b97cb8dd05 Merge branch 'master' of github.com:noxer/wtf into noxer-master 2019-10-15 15:03:51 -04:00
Chris Cummer
8937fa2f45
Merge pull request #701 from noxer/patch-1
Removed Go 1.11 from the tested versions
2019-10-15 10:17:11 -07:00
Albert Salim
149228dd1c Add lists of authored and assigned issues in GitLab project 2019-10-15 23:46:55 +08:00
Tim Scheuermann
ed9ef3268e Readme update for the Go 1.12 requirement 2019-10-15 13:37:14 +02:00
Tim Scheuermann
91cbe0c2df
Removed Go 1.11 from the tested versions 2019-10-15 13:30:18 +02:00
Tim Scheuermann
226796099c Revert "Revert "Call the os.UserHomeDir in Home""
This reverts commit 270daf31ea007147e1b04770e501688472750a7e.
2019-10-15 11:09:03 +02:00
Sean Smith
6b67baa65f Update CHANGELOG 2019-10-12 17:53:39 -04:00
Alex Fornuto
419d43670c remove pull request count from issue count (#694) 2019-10-12 17:51:53 -04:00
Sean Smith
68e56eaa10 Add new urlutil option, and have these be reloadable
Handles #897 and part of #593
2019-10-12 17:44:28 -04:00
Boot-Error
f5e0aec6b6 Updated README.md with instruction to run in docker 2019-10-12 06:34:52 +05:30
Boot-Error
9e53aed174 Run wtf inside docker container
To build the container

    docker build -t wtfutil .

To run wtf

    docker run -it wtfutil
2019-10-12 05:29:18 +05:30
Tim Scheuermann
270daf31ea Revert "Call the os.UserHomeDir in Home"
This reverts commit d3b6bc503a583bd2d841a9fba439b9f7e4056ff0.
2019-10-11 23:36:21 +02:00
Tim Scheuermann
d3b6bc503a Call the os.UserHomeDir in Home 2019-10-11 23:18:08 +02:00
Tim Scheuermann
cdf37f053c Optimized ParseJson and ExecuteCommand 2019-10-11 23:17:01 +02:00
Tim Scheuermann
5b4a49d11f Preallocate slice 2019-10-11 23:13:38 +02:00
Tim Scheuermann
ca18a14d43 Preallocate slices and remove double type assertion 2019-10-11 23:13:18 +02:00
Chris Cummer
25234e03da
Update CHANGELOG.md 2019-10-11 12:20:00 -07:00
Chris Cummer
e98b15ca2c
Merge pull request #690 from wtfutil/20191011-transmission-race-conditions
Fix some of the transmission module race conditions
2019-10-11 12:16:00 -07:00
Chris Cummer
189c667928 Fix some of the transmission module race conditions
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-10-11 06:19:05 -07:00
Chris Cummer
6266ed883a Remove dead comment
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-10-11 05:34:40 -07:00
Chris Cummer
c6c56a1a83 Add @jdenoy-saagie as a contributor 2019-10-11 05:08:43 -07:00
Chris Cummer
1b608759ec Add @stevenwhitehead as a contributor 2019-10-11 05:07:13 -07:00
Chris Cummer
4b8ae6cce9 Update @alexfornuto as a contributor 2019-10-11 05:05:32 -07:00
Chris Cummer
c9eff660f6
Merge pull request #584 from alexfornuto/netman-agnostic
Find SSID regardless of network manager
2019-10-11 05:02:48 -07:00
Chris Cummer
b99a451e1d
Merge pull request #687 from wtfutil/20191010-fix-go-mod
An attempt to fix Dependabot's parsing issue
2019-10-10 20:48:10 -07:00
Chris Cummer
9e1b660e61 An attempt to fix Dependabot's parsing issue
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-10-10 20:41:52 -07:00
Chris Cummer
2afbf682e4
Update CHANGELOG.md 2019-10-10 20:32:04 -07:00
Chris Cummer
5937dcc645 Add @Boot-Error as a contributor 2019-10-10 20:29:33 -07:00
Chris Cummer
3e84dc2b6e
Merge pull request #685 from Boot-Error/master
Fix Errors in azuredevops and devto modules
2019-10-10 20:28:13 -07:00
Chris Cummer
d87a597e3f
Merge pull request #686 from jmks/buildkite-follow-apikey-conventions
Rename token to apiKey
2019-10-10 20:20:32 -07:00
Chris Cummer
b352cc3df7
Update README.md 2019-10-10 16:13:56 -07:00
Chris Cummer
c13c21b340
Update README.md 2019-10-10 16:13:41 -07:00
Jason Schweier
016bef7f79 Rename token to apiKey 2019-10-10 18:36:45 -04:00
Vighnesh SK
260ad3e968
Merge branch 'master' into master 2019-10-11 03:36:22 +05:30
Boot-Error
a1526b97e8 Fix Errors in azuredevops and devto modules
azuredevops had a error due to cli being a pointer to interface rather
than interface.

devto module's `widget.articles` and `displayArticles` data type changed
to `devto.ListedArticles`.
2019-10-11 03:30:11 +05:30
Alex Fornuto
cf3cda3b13 simplify iwgetid use 2019-10-10 14:41:14 -05:00
Chris Cummer
02a39915dd Add @massa1240 as a contributor 2019-10-09 18:22:36 -07:00
Chris Cummer
cd893736ee Update todoist dependency
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-10-09 18:21:22 -07:00
Chris Cummer
1fa73fc3ba
Update CHANGELOG.md 2019-10-09 18:20:48 -07:00
Chris Cummer
fc95a6c1a0
Update CHANGELOG.md 2019-10-09 18:20:26 -07:00
Chris Cummer
895b33ccdd
Merge pull request #683 from noxer/master
Expose the widget dimensions in cmdrunner
2019-10-09 18:13:02 -07:00
Tim Scheuermann
4e529b49e6 Expose the widget dimensions to commands in cmdrunner 2019-10-09 14:55:23 +02:00
Tim Scheuermann
4ef6eb76c6 Added utils.CalculateDimensions 2019-10-09 14:54:47 +02:00
Chris Cummer
6b2a53e7a7 Clean up go.mod
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-10-08 17:33:50 -07:00
Chris Cummer
a340aa6fa0
Update CHANGELOG.md 2019-10-08 17:31:16 -07:00
Chris Cummer
abfdad01fe
Merge pull request #680 from noxer/master
Make the cmdrunner more interactive
2019-10-08 17:29:51 -07:00
Chris Cummer
f91e2c3fb0
Merge pull request #679 from jmks/buildkite-stable-pipelines-ordering
Sort Buildkite pipelines and branches alphabetically
2019-10-08 17:18:04 -07:00
Tim Scheuermann
0629e28105 Set a proper default line limit 2019-10-07 22:15:14 +02:00
Tim Scheuermann
45b9555633 CmdRunner now updates view while running 2019-10-07 22:10:51 +02:00
Jason Schweier
61bfd97939 Sort Buildkite pipelines and branches alphabetically 2019-10-07 12:03:36 -04:00
Chris Cummer
c5b36d8f6d Merge branch 'master' of github.com:wtfutil/wtf 2019-10-05 20:48:02 -07:00
Chris Cummer
0bc29fee35 Add @jmks as a contributor 2019-10-05 20:46:49 -07:00
Chris Cummer
9a21a2c314
Update CHANGELOG.md 2019-10-05 20:46:24 -07:00
Chris Cummer
0306ecd746 Merge branch 'add-buildkite-widget' of github.com:jmks/wtf into jmks-add-buildkite-widget 2019-10-05 20:41:53 -07:00
Chris Cummer
aca0ff6a74
Update README.md 2019-10-04 14:14:49 -07:00
Chris Cummer
a2fc558e93
Merge pull request #678 from wtfutil/20191004-hacktoberfest
Hacktoberfest message in readme
2019-10-04 07:49:53 -07:00
Chris Cummer
99e3f1008d Hacktoberfest message in readme 2019-10-04 07:49:08 -07:00
Chris Cummer
35742da1da
Update README.md 2019-10-04 07:38:42 -07:00
Chris Cummer
0be50f33ac Add @Tardog as a contributor 2019-10-04 07:35:38 -07:00
Chris Cummer
0a019f60d7
Update CHANGELOG.md 2019-10-04 07:34:58 -07:00
Chris Cummer
07ed1ea60e
Merge pull request #677 from Tardog/spotify-theming
Support theming for Spotify widget
2019-10-04 07:33:54 -07:00
Chris Cummer
00ce724e53
Update CHANGELOG.md 2019-10-04 07:32:39 -07:00
Chris Cummer
90575dddd2
Merge pull request #676 from wtfutil/dependabot/go_modules/gopkg.in/yaml.v2-2.2.4
Bump gopkg.in/yaml.v2 from 2.2.3 to 2.2.4
2019-10-04 07:32:05 -07:00
krassnigg@babymarkt.de
1a13bc2420 Provide Spotify color customization settings 2019-10-04 11:48:47 +02:00
dependabot-preview[bot]
c6d929c674
Bump gopkg.in/yaml.v2 from 2.2.3 to 2.2.4
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.3 to 2.2.4.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.3...v2.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-04 07:43:31 +00:00
Chris Cummer
658718d166
Update README.md 2019-10-03 09:03:27 -07:00
Chris Cummer
6015698171
Update README.md 2019-10-03 09:02:56 -07:00
Jason Schweier
f56cc483b4 Add Buildkite widget 2019-10-03 10:44:48 -04:00
Chris Cummer
e16e63f46a
Update CHANGELOG.md 2019-10-02 19:50:14 -07:00
Chris Cummer
15d2e2edb1 Merge branch 'master' into dependabot/go_modules/github.com/shirou/gopsutil-2.19.9+incompatible 2019-10-02 19:48:41 -07:00
Chris Cummer
df035ee313
Update CHANGELOG.md 2019-10-02 19:45:22 -07:00
Chris Cummer
7f5d09c508
Merge pull request #674 from Seanstoppable/checkboxoverride
Have checkbox config work as intended
2019-10-02 19:43:52 -07:00
Chris Cummer
cee6bd94bd
Update CHANGELOG.md 2019-10-02 19:42:25 -07:00
Chris Cummer
47651fb102 Merge branch 'respectordering' of github.com:Seanstoppable/wtf into Seanstoppable-respectordering 2019-10-02 19:40:13 -07:00
Chris Cummer
5af3ad471f Merge branch 'master' of github.com:wtfutil/wtf 2019-10-02 19:39:31 -07:00
Chris Cummer
3c01065bd6 Add @aviaviavi as a contributor 2019-10-02 19:39:24 -07:00
Chris Cummer
54bffb6291
Update CHANGELOG.md 2019-10-02 19:38:49 -07:00
Chris Cummer
4837413fbc
Merge pull request #667 from scarf-sh/master
Scarf install instructions
2019-10-02 19:37:44 -07:00
Chris Cummer
8434b4c892
Update CHANGELOG.md 2019-10-02 19:36:27 -07:00
Chris Cummer
acf6785bba
Merge pull request #671 from wtfutil/WTF-661-tranismission-blocker
WTF-661 Fix tranmission module to no longer block on initialization
2019-10-02 19:35:25 -07:00
Chris Cummer
110afdad01
Update CHANGELOG.md 2019-10-02 19:35:05 -07:00
Chris Cummer
7823d1d2e8
Merge pull request #669 from wtfutil/WTF-658-clocks-row-color
WTF-658 Clocks obeys global row color settings
2019-10-02 19:34:36 -07:00
Chris Cummer
410dca728c
Update CHANGELOG.md 2019-10-02 19:33:03 -07:00
Chris Cummer
336e11959d
Merge pull request #668 from wtfutil/WTF-665-gcal-time-support
WTF-665 Add time format setting for gCal module
2019-10-02 19:31:24 -07:00
Sean Smith
2c1e7fc2c9 Have checkbox config work as intended
Support checkedIcon
Also support uncheckedIcon
Addresses the end of #616
2019-10-02 17:41:04 -04:00
Sean Smith
b7bd6e3817 Respect list ordering for trello
Ordering not respected because of the use of a map
Switch to using slice
Resolves #664
2019-10-02 17:26:34 -04:00
dependabot-preview[bot]
617a702441
Bump github.com/shirou/gopsutil
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.18.12+incompatible to 2.19.9+incompatible.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v2.18.12...v2.19.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-02 15:47:56 +00:00
Chris Cummer
4aa0f4e43b WTF-661 Fix tranmission module to no longer block on initialization
Fixes #661.
2019-10-02 05:59:33 -07:00
Chris Cummer
ef71ad2ced WTF-658 Clocks obeys global row color settings
Fixes #658.
2019-10-02 05:43:16 -07:00
Chris Cummer
ca0345a0b4 Fix a bug with subreddit module row colour
Even and odd rows now display as different colours when row colour is
explicitly defined in the module config.
2019-10-02 05:37:31 -07:00
Chris Cummer
8290988213
Merge pull request #670 from wtfutil/WTF-573-fullscreen-layout
WTF-573 Add padding value to default row and col setting
2019-10-02 05:24:25 -07:00
Chris Cummer
596825ec1e
Merge pull request #666 from wtfutil/dependabot/go_modules/gopkg.in/yaml.v2-2.2.3
Bump gopkg.in/yaml.v2 from 2.2.2 to 2.2.3
2019-10-02 05:23:10 -07:00
Chris Cummer
aeba4fad4b
Merge pull request #662 from wtfutil/dependabot/go_modules/github.com/gdamore/tcell-1.3.0
Bump github.com/gdamore/tcell from 1.2.0 to 1.3.0
2019-10-02 05:22:57 -07:00
Chris Cummer
bacb661573 WTF-573 Add padding value to default row and col setting
Fixes #573.
2019-10-01 22:52:37 -07:00
Chris Cummer
7c2d6b4c42 WTF-665 Add time format setting for gCal module
Allows the user to specify either "12" or "24" to set whether or not to
display times in AM/PM format or 24-hour format.

Example:

      gcal:
        enabled: true
        timeFormat: "12"
        refreshInterval: 360

Fixes #665
2019-10-01 21:37:03 -07:00
aviaviavi
fae38e8e64 Scarf install instructions 2019-10-01 12:58:54 -07:00
dependabot-preview[bot]
711908971c
Bump gopkg.in/yaml.v2 from 2.2.2 to 2.2.3
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.2...v2.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-01 12:27:41 +00:00
dependabot-preview[bot]
c08c937efe
Bump github.com/gdamore/tcell from 1.2.0 to 1.3.0
Bumps [github.com/gdamore/tcell](https://github.com/gdamore/tcell) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/gdamore/tcell/releases)
- [Commits](https://github.com/gdamore/tcell/compare/v1.2.0...v1.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-30 08:31:39 +00:00
Chris Cummer
301eddafd4 Merge branch 'master' of github.com:wtfutil/wtf 2019-09-28 08:13:59 -04:00
Chris Cummer
b29e06076b Add @lawrencecraft as a contributor 2019-09-28 08:13:41 -04:00
Chris Cummer
e289c3194a
Update CHANGELOG.md 2019-09-28 08:13:01 -04:00
Chris Cummer
36607f43ad Merge branch 'master' of github.com:lawrencecraft/wtf into lawrencecraft-master 2019-09-28 07:57:53 -04:00
Chris Cummer
f934f21638 Attempt to fix the HIBP index out of range bug 2019-09-27 20:06:58 -07:00
Chris Cummer
7b9dbdc943 Tidy up go.mod 2019-09-27 03:49:53 -07:00
Chris Cummer
92139d1ba7 Revert the tcell upgrade
Reverts back from 1.3.0 to 1.2.0. The later version seems to have some
rendering issues, particularly after putting a laptop to sleep and
waking it back up again.
2019-09-27 03:47:19 -07:00
Chris Cummer
11a8f396b7 Minor cleanup in HIBP module 2019-09-26 18:10:44 -07:00
Lawrence Craft
02bdb405fa Bit more on the subreddit module - fixing comments and adding options for top sort 2019-09-26 23:18:38 +01:00
Lawrence Craft
b0d6790abe Adding subreddit module 2019-09-26 22:58:43 +01:00
Chris Cummer
555a1c6def
Update CHANGELOG.md 2019-09-26 14:28:15 -07:00
Chris Cummer
f5e8011906
Update CHANGELOG.md 2019-09-25 14:33:45 -07:00
Chris Cummer
c366fbb017
Merge pull request #647 from wtfutil/dependabot/go_modules/github.com/adlio/trello-1.4.0
Bump github.com/adlio/trello from 1.0.0 to 1.4.0
2019-09-25 14:33:15 -07:00
dependabot-preview[bot]
8d84f9b7f0
Bump github.com/adlio/trello from 1.0.0 to 1.4.0
Bumps [github.com/adlio/trello](https://github.com/adlio/trello) from 1.0.0 to 1.4.0.
- [Release notes](https://github.com/adlio/trello/releases)
- [Commits](https://github.com/adlio/trello/compare/v1.0.0...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-25 13:03:17 +00:00
Chris Cummer
3b30fd6abe Tidy up go.mod 2019-09-25 05:59:39 -07:00
Chris Cummer
6a3708383f
Update CHANGELOG.md 2019-09-25 05:57:27 -07:00
Chris Cummer
771026cc7d Merge branch 'dependabot/go_modules/github.com/xanzy/go-gitlab-0.20.1' 2019-09-25 05:50:19 -07:00
Chris Cummer
be6eb016af Merge branch 'dependabot/go_modules/github.com/zorkian/go-datadog-api-2.24.0+incompatible' 2019-09-25 05:46:09 -07:00
dependabot-preview[bot]
7ef9fa0ffe
Bump github.com/xanzy/go-gitlab from 0.18.0 to 0.20.1
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.18.0 to 0.20.1.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.18.0...v0.20.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-25 12:45:01 +00:00
Chris Cummer
71db72d205 Merge branch 'master' into dependabot/go_modules/google.golang.org/api-0.10.0 2019-09-25 05:42:58 -07:00
Chris Cummer
35ee67faa5 Merge branch 'dependabot/go_modules/github.com/alecthomas/chroma-0.6.7' 2019-09-25 05:41:37 -07:00
Chris Cummer
90dd200dc8 Merge branch 'master' into dependabot/go_modules/github.com/alecthomas/chroma-0.6.7 2019-09-25 05:40:13 -07:00
Chris Cummer
e720bc7812 Merge branch 'master' into dependabot/go_modules/github.com/gdamore/tcell-1.3.0 2019-09-25 05:39:04 -07:00
Chris Cummer
1b8ba1ac7b Merge branch 'dependabot/go_modules/github.com/radovskyb/watcher-1.0.7' 2019-09-25 05:38:11 -07:00
Chris Cummer
f1533ad391 Merge branch 'master' into dependabot/go_modules/github.com/radovskyb/watcher-1.0.7 2019-09-25 05:36:58 -07:00
Chris Cummer
96132632e9 Merge branch 'master' into dependabot/go_modules/github.com/google/go-github/v26-26.1.3 2019-09-25 05:35:33 -07:00
Chris Cummer
42137fef2e
Update CHANGELOG.md 2019-09-24 08:00:13 -07:00
Chris Cummer
d913936970 Add @scw007 as a contributor 2019-09-24 07:58:37 -07:00
dependabot-preview[bot]
c8f294129c
Bump github.com/alecthomas/chroma from 0.6.3 to 0.6.7
Bumps [github.com/alecthomas/chroma](https://github.com/alecthomas/chroma) from 0.6.3 to 0.6.7.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v0.6.3...v0.6.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-24 07:48:06 +00:00
dependabot-preview[bot]
f4ab8cd5e2
Bump google.golang.org/api from 0.9.0 to 0.10.0
Bumps [google.golang.org/api](https://github.com/google/google-api-go-client) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/google/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/google/google-api-go-client/compare/v0.9.0...v0.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-24 07:46:46 +00:00
Steven Whitehead
9de738362a support enterprise Travis endpoints 2019-09-23 21:50:06 -04:00
dependabot-preview[bot]
9b89215e50
Bump github.com/gdamore/tcell from 1.2.0 to 1.3.0
Bumps [github.com/gdamore/tcell](https://github.com/gdamore/tcell) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/gdamore/tcell/releases)
- [Commits](https://github.com/gdamore/tcell/compare/v1.2.0...v1.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 07:39:07 +00:00
dependabot-preview[bot]
c25a3a7d59
Bump github.com/radovskyb/watcher from 1.0.6 to 1.0.7
Bumps [github.com/radovskyb/watcher](https://github.com/radovskyb/watcher) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/radovskyb/watcher/releases)
- [Commits](https://github.com/radovskyb/watcher/compare/v1.0.6...v1.0.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 07:38:42 +00:00
dependabot-preview[bot]
b914e3879b
Bump github.com/google/go-github/v26 from 26.0.9 to 26.1.3
Bumps [github.com/google/go-github/v26](https://github.com/google/go-github) from 26.0.9 to 26.1.3.
- [Release notes](https://github.com/google/go-github/releases)
- [Commits](https://github.com/google/go-github/compare/v26.0.9...v26.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 07:38:20 +00:00
dependabot-preview[bot]
08a81914ed
Bump github.com/zorkian/go-datadog-api
Bumps [github.com/zorkian/go-datadog-api](https://github.com/zorkian/go-datadog-api) from 2.21.0+incompatible to 2.24.0+incompatible.
- [Release notes](https://github.com/zorkian/go-datadog-api/releases)
- [Commits](https://github.com/zorkian/go-datadog-api/compare/v2.21.0...v2.24.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 07:36:48 +00:00
Chris Cummer
00f56a5f3a
Merge pull request #639 from wtfutil/20190831-focusable-override
Add a focusable over-ride setting for modules
2019-09-22 18:19:26 -07:00
Chris Cummer
bf877f5fa7 Constantize the defaultFocus value for each module 2019-09-22 18:12:29 -07:00
Chris Cummer
d6208b4730 Add a focusable over-ride setting for widgets that are non-focusable by
default

For widgets that are non-focusable by default, you can now specify

    focusable: true

in their config to over-ride the default 'false' value.
2019-09-22 17:51:06 -07:00
Chris Cummer
248fddf3f4 Merge branch 'master' of github.com:wtfutil/wtf 2019-09-22 17:49:35 -07:00
Chris Cummer
98afcb7a9e Add @VictorAvelar as a contributor 2019-09-22 17:49:25 -07:00
Chris Cummer
85e31e17f6
Update CHANGELOG.md 2019-09-22 17:48:27 -07:00
Chris Cummer
e13e82a2b4 Merge branch 'add-devto-modules' of github.com:VictorAvelar/wtf into VictorAvelar-add-devto-modules 2019-09-22 17:44:07 -07:00
Chris Cummer
bb10669b09 Add env var defaults to AzureDevops module 2019-09-21 04:13:13 -07:00
Chris Cummer
2f9025ae2d
Update CHANGELOG.md 2019-09-21 04:06:55 -07:00
Chris Cummer
93ef3ea429 Update dependencies 2019-09-21 04:04:22 -07:00
Chris Cummer
1bfd26a55c Merge branch 'feature/azure-dev-ops-module' of github.com:v-braun/wtf into v-braun-feature/azure-dev-ops-module 2019-09-21 03:47:30 -07:00
vavelar
425a08522e Implementation of WTF devto module 2019-09-20 17:31:11 +02:00
Chris Cummer
330035b107 Update go.mod to point to vendored newrelic module 2019-09-20 06:07:10 -07:00
Chris Cummer
a13a284fb4 Remove stale glog dependency. Fixes #642 2019-09-19 04:08:25 -07:00
Viktor Braun (v_b)
64985c3beb implemented azure devops widget 2019-09-19 10:11:59 +02:00
Chris Cummer
f61f66841b
Update CHANGELOG.md 2019-09-18 20:12:45 -07:00
Chris Cummer
6fea40dc9b Merge branch 'feature/gcal-event-time-color' of github.com:indradhanush/wtf into indradhanush-feature/gcal-event-time-color 2019-09-18 20:08:01 -07:00
Indradhanush Gupta
9e2bc00b15 modules/gcal: Use colors.eventTime for timestamp of event
Color of description should not change the color of event time. This
commit uses the independent setting color.eventTime instead. This
defaults to "white" and is consistent with the current behaviour when
a value for colors.description is not set.

Fixes #638
2019-09-18 02:18:22 +05:30
Indradhanush Gupta
1ce29f4930 modules/gcal: Add property colors.eventTime
This will let the user set a fixed color for the event time
irrespective of colors used in highlights.
2019-09-18 02:18:21 +05:30
Chris Cummer
37ef3e0f62
Update README.md 2019-09-17 11:36:49 -07:00
Chris Cummer
86bb78d16b
Update README.md 2019-09-17 11:36:09 -07:00
Chris Cummer
d76db44b72
Merge pull request #635 from indradhanush/feature/add-support-go-1.13
travis: Add builds for go 1.13.x
2019-09-15 15:44:39 -07:00
Chris Cummer
979c7294eb Add forked version of Todoist 2019-09-15 15:43:40 -07:00
Chris Cummer
d735047e09 Add @indradhanush as a contributor 2019-09-15 15:35:35 -07:00
Chris Cummer
7d0aae1465 Merge branch 'bugfix/fix-vendor-errors' of github.com:indradhanush/wtf into indradhanush-bugfix/fix-vendor-errors 2019-09-15 15:33:42 -07:00
Chris Cummer
78166d3cda Merge branch 'improvecfgerror' of github.com:Seanstoppable/wtf into Seanstoppable-improvecfgerror 2019-09-14 13:30:46 -07:00
Chris Cummer
00acaa2165 Merge branch 'betterbarcolor' of github.com:Seanstoppable/wtf into Seanstoppable-betterbarcolor 2019-09-14 13:29:05 -07:00
Sean Smith
e28bdac0ee Make default color sub. Also use default as defaults 2019-09-14 14:00:09 -04:00
Indradhanush Gupta
e9c6f904b2 travis: Add builds for go 1.13.x 2019-09-14 17:00:22 +05:30
Indradhanush Gupta
f737c53864 Update go.mod, go.sum and vendor
Running `go mod vendor` generates new additions and deletions.
2019-09-14 16:33:39 +05:30
Indradhanush Gupta
1ee3e6d213 go.mod: Comment out line to replace github.com/darkSasori/todist
This line is producing the following error:

```
$ go mod vendor
go mod vendor: open /home/dhanush/go/src/github.com/wtfutil/wtf/vendor/github.com/darkSasori/todoist: no such file or directory
```

Commenting it out fixes the error and produces new changes to go.mod,
go.sum and the vendor directory.
2019-09-14 16:20:51 +05:30
Sean Smith
9fccd721e0 Expand and fix test
Add an extra color
Fix empty case. This shows up as white/whatever color the rest of the widget is like
2019-09-13 19:22:20 -04:00
Chris Cummer
4c3abf5aca
Merge pull request #630 from Seanstoppable/removepanicfromkube
Remove panic from kubernetes client
2019-09-13 03:51:09 -07:00
Chris Cummer
78057fc8df
Merge pull request #629 from noxer/patch-1
Added info for using Jira with Basic-Auth
2019-09-13 03:38:07 -07:00
Sean Smith
9f81207037 Clean up cfg error handling a bit
Pass in the actual file being used, rather than hardcoded `config.yaml`
Differences between two error messages are not that distinct
Centralize on one and clean up all the `isCustomConfig` tracking
2019-09-12 20:28:24 -04:00
Sean Smith
56975bc80a Improve bargraph view so bar colors are configurable
Inspired by #624
Update the view object so that widget developers can configure bar color
2019-09-12 20:01:08 -04:00
Sean Smith
e9014ecb19 Remove panic from kubernetes client
Rather than panic, just grab and display the error
2019-09-12 18:48:16 -04:00
Tim Scheuermann
8d3763d0a6
Added info for using Jira with Basic-Auth 2019-09-12 13:35:52 +02:00
Chris Cummer
8cf50fe92c
Update CHANGELOG.md 2019-09-12 03:05:44 -07:00
Chris Cummer
bb59d527eb Remove docker from the build pipeline 2019-09-12 03:04:09 -07:00
Chris Cummer
5e1abc1ad9 Update go.sum 2019-09-12 03:00:22 -07:00
Chris Cummer
b1aba81cd1 Add @noxer as a contributor 2019-09-11 10:43:57 -07:00
Chris Cummer
842a24ed1e
Merge pull request #622 from noxer/patch-1
Disable the GOSUMDB in the compilation instructions
2019-09-11 10:43:15 -07:00
Chris Cummer
c83618143e
Merge pull request #627 from wtfutil/20190910-catch-watcher-error
Don't die if the watcher can't find the file. Continue trying
2019-09-11 10:42:28 -07:00
Chris Cummer
18859ed41e
Update CHANGELOG.md 2019-09-11 10:42:09 -07:00
Chris Cummer
cfc7a8c092 Add @ibaum as a contributor 2019-09-11 10:40:46 -07:00
Chris Cummer
35b7c97791
Merge pull request #615 from ibaum/fix-kubernetes-client
Update kubernetes client to connect to various kubernetes providers
2019-09-11 10:39:36 -07:00
Chris Cummer
79bc78a5f7 Don't die if the watcher can't find the file. Continue trying 2019-09-10 21:48:33 -07:00
Chris Cummer
33ea383046 Merge branch 'fixjsonparse' of github.com:Seanstoppable/wtf into Seanstoppable-fixjsonparse 2019-09-10 21:44:56 -07:00
Sean Smith
26ca1618ab Fix config reload race
Race condition is around the usage of `enabled`
Wrap access in a mutex to eliminate race
Fixes #422
2019-09-10 21:49:40 -04:00
Sean Smith
bb3c24df73
Normalize coloring (#620)
Allow all colors to be configurable on a module level
2019-09-10 21:22:11 -04:00
Chris Cummer
9b23da07ba
Merge pull request #625 from wtfutil/20190910-no-title
Add the ability to display no title
2019-09-10 16:22:25 -07:00
Chris Cummer
e059eeb625 Add the ability to display no title 2019-09-10 16:18:00 -07:00
Chris Cummer
04616ddff5
Update CHANGELOG.md 2019-09-10 10:14:42 -07:00
Chris Cummer
a620d4fc4c Add @Narengowda as a contributor 2019-09-10 09:56:21 -07:00
Tim Scheuermann
8ca807ee57
Disable the GOSUMDB in the compilation instructions 2019-09-09 14:55:07 +02:00
Narendra L
7756df16bb
Merge branch 'master' into add_digitalclock_module 2019-09-09 10:11:51 +02:00
Narendra L
3ad04c4969 Cleanup unwanted comments 2019-09-09 09:29:16 +02:00
Chris Cummer
ba7645a732
Update CHANGELOG.md 2019-09-08 17:08:20 -07:00
Chris Cummer
8ababedab1
Update CHANGELOG.md 2019-09-08 17:07:33 -07:00
Chris Cummer
89020c7581
Merge pull request #617 from wtfutil/WTF-566-gitlab-projects-as-list
WTF-566 Support GitLab projects as list
2019-09-08 17:02:39 -07:00
Narendra L
348b2ffa5d Adds support for digital clock 2019-09-08 23:58:45 +02:00
Narendra L
6de3f0f5b9 modules/digitalclock/ 2019-09-08 23:58:25 +02:00
Chris Cummer
074bd6a803
Update README.md 2019-09-08 09:41:27 -07:00
Chris Cummer
a6466449b1
Update CHANGELOG.md 2019-09-08 05:15:06 -07:00
Chris Cummer
4ff64532b2 Add @ChrisDBrown as a contributor 2019-09-08 05:12:56 -07:00
Chris Cummer
7dd4e4909b Merge branch 'feat/nr-multi' of github.com:Seanstoppable/wtf into Seanstoppable-feat/nr-multi 2019-09-08 05:11:05 -07:00
Sean Smith
36fbad54d8 Fix JSON parsing
Issue #600 points out Jenkins module panics occasionally
I noticed that a number of places panic because of JSON parsing
Centralize JSON parsing, have it return an error, and have widgets
report the error
2019-09-07 15:14:33 -04:00
Chris Cummer
32884e5de4 Add default label color to docker module 2019-09-07 07:23:41 -07:00
Chris Cummer
0cd9605a5e
Update CHANGELOG.md 2019-09-07 07:04:25 -07:00
Chris Cummer
78db4fec85 Add @v-braun as a contributor 2019-09-07 07:03:15 -07:00
Chris Cummer
e441e7ebf1 Fix go.mod merge conflicts 2019-09-07 07:01:56 -07:00
Chris Cummer
f83e57c0b7 WTF-566 Support GitLab projects as list 2019-09-06 20:52:26 -07:00
Ian Baum
6662c7f18e
Update kubernetes client to connect to various kubernetes providers
* Import k8s.io/client-go/plugin/pkg/client/auth to include
authentication libraries
* Update calls to panic to include the error message
2019-09-06 11:00:44 -05:00
Chris Cummer
921d5d1753
Merge pull request #613 from Midnight-Conqueror/fix-github-icon-size
fix: reducing the size of the cross
2019-09-06 04:38:16 -07:00
Joel Valentine
9f7ff56f46 reducing the size of the cross 2019-09-06 12:20:36 +01:00
Chris Cummer
001fde13df
Update README.md 2019-09-06 04:17:33 -07:00
Chris Cummer
3fd1651726
Update CHANGELOG.md 2019-09-06 04:07:41 -07:00
Chris Cummer
ef20be2eee Merge branch 'Midnight-Conqueror-fix-github-selection-lint' 2019-09-06 04:05:55 -07:00
Chris Cummer
27ecabfb18 Merge branch 'fix-github-selection-lint' of github.com:Midnight-Conqueror/wtf into Midnight-Conqueror-fix-github-selection-lint 2019-09-06 04:04:45 -07:00
Chris Cummer
5a0b9dfb88
Update CHANGELOG.md 2019-09-06 03:54:38 -07:00
Chris Cummer
7d99c12220
Merge pull request #608 from Seanstoppable/fixgitordering
Fix git ordering
2019-09-06 03:50:21 -07:00
Chris Cummer
7056a4489a
Update CHANGELOG.md 2019-09-06 03:40:59 -07:00
Chris Cummer
7fed7577ea
Merge pull request #612 from wtfutil/WTF-611-gcal-color-highlighting
WTF-611 Fix gCal color highlighting
2019-09-06 03:39:38 -07:00
Chris Cummer
66ae65cea4 Merge branch 'fixcolorconfig' of github.com:Seanstoppable/wtf into Seanstoppable-fixcolorconfig 2019-09-06 03:34:40 -07:00
Chris Cummer
2c673ae616 WTF-611 Fix gCal color highlighting 2019-09-06 03:32:45 -07:00
Joel Valentine
d4e0b0956f add unicode for exclamation mark 2019-09-06 02:50:53 +01:00
Joel Valentine
596bfbac02 fix: fixing linting for the github module
adding documentation to github module
fixing malformed icon causing display errors
2019-09-06 02:42:06 +01:00
Chris Cummer
e8881ef715
Merge pull request #606 from Seanstoppable/updategoreleaser
Update goreleaser config
2019-09-05 05:38:03 -07:00
Chris Cummer
886d9d931f
Update CHANGELOG.md 2019-09-05 05:28:13 -07:00
Chris Cummer
bbf5b12057 Add @Midnight-Conqueror as a contributor 2019-09-05 05:26:30 -07:00
Chris Cummer
993853a8bc Merge branch 'Midnight-Conqueror-github-selection' 2019-09-05 05:25:12 -07:00
Chris Cummer
faa2098912 Merge branch 'github-selection' of github.com:Midnight-Conqueror/wtf into Midnight-Conqueror-github-selection 2019-09-05 05:23:59 -07:00
Chris Cummer
37c614245f Update go.sum httpmock 2019-09-05 05:22:30 -07:00
Sean Smith
e213e6b337 Fix git ordering
This is due to us sorting
It doesn't look like there is a need to sort here, so remove it
2019-09-05 08:02:12 -04:00
Chris Cummer
bc0d79df7b
Update CHANGELOG.md 2019-09-04 22:06:30 -07:00
Chris Cummer
aef3286769
Merge pull request #605 from Seanstoppable/supporthexcolor
Support hex colors
2019-09-04 22:04:50 -07:00
Chris Cummer
a781c20088
Merge pull request #603 from Seanstoppable/handlegithubclienterr
Pass through github client errors to display
2019-09-04 21:59:54 -07:00
Chris Cummer
3d25caabca
Update CHANGELOG.md 2019-09-04 21:58:19 -07:00
Chris Cummer
237a05d056
Merge pull request #602 from Seanstoppable/hotfixtodoist
Hotfix todoist
2019-09-04 21:57:18 -07:00
Sean Smith
1c1ce4893a Updates to make this work after refactors 2019-09-04 23:46:36 -04:00
Chris D Brown
3758ade094 feat(newrelic): Display deploy information from multiple apps 2019-09-04 22:52:01 -04:00
Sean Smith
5979564483 Update test case for default color
Tcell's default is default, so using that changes the tests
2019-09-04 22:20:48 -04:00
Sean Smith
e8f38ffda6 Support hex colors
Closes #546
Though only support full hex, not short hex
This limitation is from tcell
2019-09-04 22:17:34 -04:00
Sean Smith
23bd900204 Update goreleaser config
Removes deprecation warning
2019-09-04 22:12:23 -04:00
Sean Smith
0c8c1989b7 Fix module color config
Make sure we use `moduleConfig` with appropriate path
And `colorsConfig` for appropriate fallback
2019-09-04 21:42:34 -04:00
Sean Smith
12a006f5a8 Pass through github client errors to display
Per #598, we crash on occasion.
We are swallowing errors incorrectly, and should catch/render
2019-09-04 21:26:28 -04:00
Sean Smith
b184c8ae9f Hotfix todoist
While waiting for upstream todoist to work, patch locally
Use 'replace' to use locally vendored version, with modifications
2019-09-04 21:15:08 -04:00
Chris Cummer
34d6d03b43 Update the oauth2 package 2019-09-04 14:59:16 -07:00
Joel Valentine
bd2f73aea5 unselecting correctly 2019-09-04 18:39:23 +01:00
Joel Valentine
c21b7c32a8 appending to a slice and referencing items within that using the currently selected 2019-09-04 17:55:32 +01:00
Chris Cummer
87f029a1a3
Merge pull request #599 from wtfutil/20190904-experimental-term-definitions
Include in extended tcell terminal descriptions
2019-09-04 05:38:51 -07:00
Chris Cummer
85fc8f28a1 Include in extended tcell terminal descriptions 2019-09-04 05:37:54 -07:00
Chris Cummer
3faefc1051 Upgrade tview and tcell dependencies 2019-09-03 21:09:21 -07:00
Chris Cummer
3a3394e240 Add @andor-pierdelacabeza as a contributor 2019-09-03 20:30:53 -07:00
Chris Cummer
42843b1798
Merge pull request #597 from andor-pierdelacabeza/patch-1
Update bin file name in flags
2019-09-03 20:29:57 -07:00
Alvaro [Andor]
e1e620a573
Update bin file name in flags 2019-09-03 19:36:03 +02:00
Viktor Braun (v_b)
8bd0bf722c implemented docker module 2019-09-03 17:33:51 +02:00
Chris Cummer
b783e6bf78
Update CHANGELOG.md 2019-09-02 16:20:15 -07:00
Chris Cummer
e56731a404 Add @Ameobea as a contributor 2019-09-02 16:18:52 -07:00
Chris Cummer
2bd7c43006
Merge pull request #582 from Ameobea/google-analytics-realtime
Add support for pulling realtime Google Analytics data
2019-09-02 16:18:08 -07:00
Chris Cummer
b4a65a3e4d Merge branch 'master' of github.com:wtfutil/wtf 2019-09-02 16:07:21 -07:00
Chris Cummer
ecdeac7d90 Add @nyourchuck as a contributor 2019-09-02 16:07:08 -07:00
Chris Cummer
b7639f5460
Update CHANGELOG.md 2019-09-02 16:06:34 -07:00
Chris Cummer
ac63b5bb8a
Merge pull request #580 from nyourchuck/nyourchuck-travisci-updates
Add more configuration options to travisci module
2019-09-02 16:05:37 -07:00
Chris Cummer
b471d585ed
Update CHANGELOG.md 2019-09-02 16:05:03 -07:00
Chris Cummer
d0095f9e62
Merge pull request #591 from lesteenman/WTF-574-change-jira-status-layout
WTF-574: Change display of Jira columns.
2019-09-02 16:03:00 -07:00
Chris Cummer
03733084e6
Merge pull request #590 from Seanstoppable/errtidy
Refactor a number of widgets to display client errors
2019-09-02 15:28:32 -07:00
Sean Smith
8835f532cc Refactor a number of widgets to display client errors
Rather than swallowing or crashing, display appropriate errors
2019-09-01 13:19:07 -04:00
Chris Cummer
ff77a3deb0 Merge branch 'master' of github.com:wtfutil/wtf 2019-09-01 08:49:48 -07:00
Chris Cummer
01d82e3745 Add @lesteenman as a contributor 2019-09-01 08:49:43 -07:00
Chris Cummer
42f6a4e171
Update CHANGELOG.md 2019-09-01 08:48:47 -07:00
Chris Cummer
fcda904e1b
Merge pull request #589 from lesteenman/WTF-575-url-decode-jenkins-job-names
WTF-575: URL-Decode Jenkins branch names
2019-09-01 08:46:53 -07:00
Chris Cummer
fd95a0f2a6
Update CHANGELOG.md 2019-09-01 08:27:42 -07:00
Chris Cummer
0206fd6baf
Merge pull request #587 from Seanstoppable/capturetodoisterrors
Capture API exceptions from todoist API
2019-09-01 08:26:50 -07:00
Chris Cummer
2d739959f9
Merge pull request #583 from Seanstoppable/kubeconfigerr
Catch and throw error when trying to get kube config
2019-09-01 08:25:37 -07:00
Chris Cummer
2886e58b0d
Update CHANGELOG.md 2019-09-01 08:23:57 -07:00
Chris Cummer
46a4c82e1a
Merge pull request #588 from Seanstoppable/fixscrollableandtodoist
Fix delete/close of todoist
2019-09-01 08:20:58 -07:00
Chris Cummer
471687543c
Update CHANGELOG.md 2019-09-01 08:17:33 -07:00
Chris Cummer
2fce7a129a Add @mikkeljuhl as a contributor 2019-09-01 08:16:21 -07:00
Chris Cummer
f1c2a4248f
Merge pull request #576 from mikkeljuhl/mjuhl/feature/addPermissionReadingToGCal
Google Calendar Read Level
2019-09-01 08:12:20 -07:00
Erik Steenman
1365b6023b WTF-575: URL-Decode Jenkins branch names 2019-09-01 11:44:44 +02:00
Sean Smith
f2c10902b3 Fix delete/close of todoist
Currently, when deleting, we jump 2 positions, since we are calling next.
However, the next item becomes the current selected position, so handle better
Properly set selected in some edge cases where we may go from a list to 0
2019-08-31 19:02:56 -04:00
Sean Smith
0f9e07259e Capture API exceptions from todoist API
Rather than silently swallow, capture them and use them in rendering
2019-08-31 18:03:48 -04:00
Erik Steenman
35797d2db6 WTF-574: Change display of Jira columns.
- Single-word status is now shown
- All columns are now of equal width
- Issue type and issue status columns are now trimmed to
  a certain max length (7 and 14 characters, respectively).
2019-08-31 22:47:34 +02:00
Joel Valentine
cbae7449b0 adding back padding 2019-08-31 19:24:24 +01:00
Joel Valentine
b98ce54750 scroll to top when unselecting 2019-08-31 19:01:29 +01:00
Joel Valentine
74d2fbe833 using the correct order and maintaining scroll position when changing source 2019-08-31 18:58:25 +01:00
Joel Valentine
5740b689be adding back mergedString 2019-08-31 17:27:49 +01:00
Joel Valentine
925930f76f addressing performance 2019-08-31 17:24:13 +01:00
Joel Valentine
10f020405f instead of resetting the selected each refresh now setting the max each refresh 2019-08-31 17:08:27 +01:00
Joel Valentine
70c5e02ca9 fixing an issue where after a refresh the maxItems would be greater than the actual amount 2019-08-31 16:39:33 +01:00
Joel Valentine
d212037ff5 cleaning up 2019-08-31 16:05:52 +01:00
Joel Valentine
d0308142a3 changing keybind 2019-08-31 15:47:28 +01:00
Joel Valentine
ccaca4f1c0 using just the pr/issue number as highlighted 2019-08-31 15:47:28 +01:00
Joel Valentine
55937c4c40 added highlighting and opening of pull requests 2019-08-31 15:47:28 +01:00
alexfornuto
56067aef86 Find SSID regardless of network manager 2019-08-31 03:23:53 -05:00
Sean Smith
c3115237a4 Catch and throw error when trying to get kube config
Handle error when building config to debug
2019-08-30 22:23:42 -04:00
Casey Primozic
a56c1fa923
Improve real time data fetch error message
* Provide link to enroll in the real time data beta
2019-08-30 18:46:43 -07:00
Casey Primozic
d5e06fe0c2
Add support for pulling realtime Google Analytics metrics
* Add config option `enableRealtime` that, if set to true, will cause realtime metrics to be displayed above the historicaly view counts for all view IDs
 * Add in the v3 Google API client and construct a service for it conditionally if realtime metrics are enabled
 * Update google analytics data pulling code to retrieve realtime metrics using the v3 client if realtime metrics are enabled in settings
 * Update table generation code to display fetched realtime metrics if they are available
2019-08-30 18:34:31 -07:00
Nate Yourchuck
5545e4f220 Add more configuration options to travisci module 2019-08-30 15:30:13 -05:00
mikkeljuhl
869269c4e8 [Google Calendar]: Calendar Read Level 2019-08-30 19:36:51 +02:00
Chris Cummer
c3a54de181
Update README.md 2019-08-30 03:49:19 -07:00
Chris Cummer
68a7553648
Update README.md 2019-08-30 03:48:51 -07:00
Chris Cummer
02b0be0b22 Add @jeffz as a contributor 2019-08-30 03:47:27 -07:00
Chris Cummer
52aba305b4
Update CHANGELOG.md 2019-08-30 03:46:42 -07:00
Chris Cummer
9d4609e0c2
Merge pull request #570 from jeffz/arpansagovau
add arpansagovau module for displaying UV data from Australian cities
2019-08-30 03:44:13 -07:00
Chris Cummer
db5d50c9af Set the text wrap of the clocks module to false 2019-08-30 03:24:18 -07:00
Chris Cummer
e1da955893
Update README.md 2019-08-29 22:36:26 -07:00
Chris Cummer
68b64a3ae7
Update CONTRIBUTING.md
Make the process for deciding which modules to create less onerous.
2019-08-29 22:34:23 -07:00
Chris Cummer
022de7804b
Update CHANGELOG.md 2019-08-29 21:47:25 -07:00
Chris Cummer
2612194f46
Update CHANGELOG.md 2019-08-29 21:41:46 -07:00
Chris Cummer
68eb640f1e
Merge pull request #571 from wtfutil/WTF-553-config-file-creation
WTF-553 Fix config.yml creation issue on first run
2019-08-29 21:40:10 -07:00
Chris Cummer
a8bde9ecbe WTF-553 Fix config.yml creation issue on first run 2019-08-29 21:29:28 -07:00
Chris Cummer
d08a5baf60
Update CHANGELOG.md 2019-08-29 20:47:49 -07:00
Chris Cummer
265cacf3dc
Merge pull request #569 from Seanstoppable/transmissionport
Use port value for transmission client. Fixes #565
2019-08-29 20:46:51 -07:00
Jeff Zaroyko
4bc92bcce8 add arpansagovau module for displaying UV data from Australian cities 2019-08-30 11:33:34 +10:00
Sean Smith
ed50751518 Use port value for transmission client 2019-08-29 21:26:00 -04:00
Chris Cummer
7b514fbd7e
Merge pull request #564 from wtfutil/20190829-case-insensitive-config-keys
Support case-insensitive 'apiKey' config keys
2019-08-29 06:40:55 -07:00
Chris Cummer
fce8b69459 Support case-insensitive 'apiKey' config keys
'apiKey' is one that people are likely to spell wrong in their configs
as 'apikey'. Given that there's no sanity-checking around required
config values yet, and a missing API key can cause silent failures in
some modules, be liberal in accepting spelling.
2019-08-29 06:34:52 -07:00
Chris Cummer
17935970fb
Update CHANGELOG.md 2019-08-29 06:13:10 -07:00
Chris Cummer
1e3b54d1f4
Merge pull request #559 from hxw/master
add FreeBSD support to power module
2019-08-29 06:11:56 -07:00
Chris Cummer
69d44d5ea0
Merge pull request #563 from wtfutil/WTF-560-feedreader-wrap
WTF-560 Set FeedReader line wrap to false
2019-08-29 06:05:21 -07:00
Chris Cummer
21c444c8a4 WTF-560 Set FeedReader line wrap to false
Fixes #560
2019-08-29 05:58:20 -07:00
Christopher Hall
51b4d42e8d add FreeBSD support to power module
uses the FreeBSD apm command to get charge status
and battery percentage

Signed-off-by: Christopher Hall <hsw@ms2.hinet.net>
2019-08-29 15:19:55 +08:00
Chris Cummer
bc80b9f60b Merge branch 'renormalizedraw' of github.com:Seanstoppable/wtf into Seanstoppable-renormalizedraw 2019-08-28 20:18:34 -07:00
Chris Cummer
d4a6e7189c Add @brudil as a contributor 2019-08-28 20:17:13 -07:00
Chris Cummer
fa77db52b6 Add @herbygillot as a contributor 2019-08-28 20:09:39 -07:00
Chris Cummer
767e49f27c
Merge pull request #555 from herbygillot/install-via-macports
Add README instructions on installing via MacPorts
2019-08-28 20:08:53 -07:00
Herby Gillot
3407968a32 Add README instructions on installing via MacPorts 2019-08-28 20:51:37 -04:00
Chris Cummer
4c5bda4858 Add @hneiva as a contributor 2019-08-28 09:22:46 -07:00
Chris Cummer
720a51ff82
Merge pull request #548 from hneiva/patch-1
Fix sample config
2019-08-28 09:21:32 -07:00
Heitor Neiva
3bd7041426
Fix sample config
- Fixed spelling
- Fixed indentation
2019-08-28 08:48:31 -07:00
Chris Cummer
c930aaf0b2
Update CHANGELOG.md 2019-08-28 07:52:21 -07:00
Chris Cummer
f43285e0bb Add @hxw as a contributor 2019-08-28 07:51:02 -07:00
Chris Cummer
7e022fe132
Merge pull request #541 from hxw/master
use xdg-open as default open method for http/https
2019-08-28 07:50:04 -07:00
Chris Cummer
da2f21c0f6
Merge pull request #545 from wtfutil/WTF-539-vendored-deps-back-2
WTF-539 Add missing vendored dependencies back
2019-08-28 07:34:06 -07:00
Chris Cummer
8df08c4b1f WTF-539 Add missing vendored dependencies back 2019-08-28 07:17:07 -07:00
Christopher Hall
e8bb4070d9 use xdg-open as default open method for http/https
This should be available on all BSD and similar OSs

Signed-off-by: Christopher Hall <hsw@ms2.hinet.net>
2019-08-28 11:33:28 +08:00
Sean Smith
14e7619075 Renormalize the redraw function
Have all instances take a function
Update the remaining modules to take this into account
Numerous smaller refactors to make some widgets work more or less the same
2019-08-27 21:51:37 -04:00
Chris Cummer
67658e172c
Merge pull request #538 from Seanstoppable/fixhighlightrace
Fix a bunch of race conditions
2019-08-27 09:19:57 -07:00
Sean Smith
3a716bcf9a Convert the bulk of modules over to RedrawFunc 2019-08-26 23:07:02 -04:00
Sean Smith
51e4325f0b Handle all the widgets that use GetRect 2019-08-24 23:20:38 -04:00
Sean Smith
264f49fd2c Fix race with HighlightableHelper
GetRect can lead to a race condition
Add a RenderFunc method so that we can call try to
wrap even more of our rendering in the thread safe
`QueueUpdateDraw` method
2019-08-24 22:15:35 -04:00
Chris Cummer
3f5fe6f3e5
Update CHANGELOG.md 2019-08-24 10:03:26 -07:00
Chris Cummer
250eff740e
Merge pull request #537 from wtfutil/20190823-universal-info-modal
20190823 universal info modal
2019-08-23 21:25:13 -07:00
Chris Cummer
523a0bec2c Remove the need for every module to define a widget.Refresh keyboard control 2019-08-23 21:18:51 -07:00
Chris Cummer
5337656c58 Remove the need for every module to define a widget.ShowHelp keyboard control
This common functionality is moved up to KeyboardWidget. Modules now
include widget.InitializeCommonControls() instead.
2019-08-23 21:18:51 -07:00
Chris Cummer
5270501fac
Update CHANGELOG.md 2019-08-23 20:11:52 -07:00
Chris Cummer
f05c36c29e
Merge pull request #536 from Seanstoppable/linuxtransparency
Attempt to offer linux transparency
2019-08-23 20:10:59 -07:00
Chris Cummer
44b5e36905
Update CHANGELOG.md 2019-08-21 15:56:05 -07:00
Chris Cummer
c6caffcdf8 Merge branch 'Seanstoppable-fixfullycharged' 2019-08-21 15:52:52 -07:00
Sean Smith
81a7fc52a8 Fix fully charged indicator
pmset shows `0:00` when charged. Nothing when charging/discharging
Handle this edge case
2019-08-20 22:33:49 -04:00
Sean Smith
146cbb598a Attempt to offer linux transparency
Add 'transparent' as a color option
Default to 'transparent'
Make sure to set color to appropriate things, so transparency is achieved
2019-08-20 22:28:14 -04:00
Chris Cummer
c832db9ddb Add utils.Includes() helper function 2019-08-20 16:39:15 -07:00
Chris Cummer
faf365baa1
Update CHANGELOG.md 2019-08-20 07:48:17 -07:00
1682 changed files with 18759 additions and 243830 deletions

View File

@ -553,9 +553,535 @@
"name": "Bob 'Wombat' Hogg",
"avatar_url": "https://avatars3.githubusercontent.com/u/2373856?v=4",
"profile": "https://github.com/rwhogg",
"contributions": []
},
{
"login": "hxw",
"name": "Christopher Hall",
"avatar_url": "https://avatars0.githubusercontent.com/u/143462?v=4",
"profile": "https://github.com/hxw",
"contributions": []
},
{
"login": "hneiva",
"name": "Heitor Neiva",
"avatar_url": "https://avatars1.githubusercontent.com/u/3451557?v=4",
"profile": "https://github.com/hneiva",
"contributions": []
},
{
"login": "herbygillot",
"name": "Herby Gillot",
"avatar_url": "https://avatars3.githubusercontent.com/u/618376?v=4",
"profile": "https://github.com/herbygillot",
"contributions": []
},
{
"login": "brudil",
"name": "James Canning",
"avatar_url": "https://avatars3.githubusercontent.com/u/382352?v=4",
"profile": "http://brudil.com",
"contributions": []
},
{
"login": "jeffz",
"name": "jeffz",
"avatar_url": "https://avatars1.githubusercontent.com/u/45892?v=4",
"profile": "https://twitter.com/jeffz4000",
"contributions": []
},
{
"login": "mikkeljuhl",
"name": "Mikkel Jeppesen Juhl",
"avatar_url": "https://avatars0.githubusercontent.com/u/1764035?v=4",
"profile": "https://mikkeljuhl.com",
"contributions": []
},
{
"login": "lesteenman",
"name": "Erik",
"avatar_url": "https://avatars1.githubusercontent.com/u/963290?v=4",
"profile": "https://github.com/lesteenman",
"contributions": []
},
{
"login": "nyourchuck",
"name": "Nate Yourchuck",
"avatar_url": "https://avatars1.githubusercontent.com/u/155574?v=4",
"profile": "https://github.com/nyourchuck",
"contributions": []
},
{
"login": "Ameobea",
"name": "Casey Primozic",
"avatar_url": "https://avatars3.githubusercontent.com/u/4335849?v=4",
"profile": "https://cprimozic.net/",
"contributions": []
},
{
"login": "andor-pierdelacabeza",
"name": "Alvaro [Andor]",
"avatar_url": "https://avatars3.githubusercontent.com/u/2430915?v=4",
"profile": "http://pierdelacabeza.com/maruja",
"contributions": []
},
{
"login": "Midnight-Conqueror",
"name": "Joel Valentine",
"avatar_url": "https://avatars1.githubusercontent.com/u/17101621?v=4",
"profile": "https://github.com/Midnight-Conqueror",
"contributions": []
},
{
"login": "v-braun",
"name": "Viktor Braun",
"avatar_url": "https://avatars0.githubusercontent.com/u/4738210?v=4",
"profile": "https://www.viktor-braun.de",
"contributions": []
},
{
"login": "ChrisDBrown",
"name": "ChrisDBrown",
"avatar_url": "https://avatars3.githubusercontent.com/u/3877652?v=4",
"profile": "https://www.chrisdbrown.co.uk/",
"contributions": []
},
{
"login": "Narengowda",
"name": "Narendra L",
"avatar_url": "https://avatars2.githubusercontent.com/u/582821?v=4",
"profile": "https://narengowda.github.io/",
"contributions": []
},
{
"login": "ibaum",
"name": "ibaum",
"avatar_url": "https://avatars1.githubusercontent.com/u/24609103?v=4",
"profile": "https://github.com/ibaum",
"contributions": []
},
{
"login": "noxer",
"name": "Tim Scheuermann",
"avatar_url": "https://avatars3.githubusercontent.com/u/566185?v=4",
"profile": "https://github.com/noxer",
"contributions": []
},
{
"login": "indradhanush",
"name": "Indradhanush Gupta",
"avatar_url": "https://avatars0.githubusercontent.com/u/2682729?v=4",
"profile": "https://indradhanush.github.io/",
"contributions": []
},
{
"login": "VictorAvelar",
"name": "Victor Hugo Avelar Ossorio",
"avatar_url": "https://avatars3.githubusercontent.com/u/7926849?v=4",
"profile": "https://victoravelar.com",
"contributions": []
},
{
"login": "scw007",
"name": "Steven Whitehead",
"avatar_url": "https://avatars3.githubusercontent.com/u/4001640?v=4",
"profile": "https://github.com/scw007",
"contributions": []
},
{
"login": "lawrencecraft",
"name": "Lawrence Craft",
"avatar_url": "https://avatars0.githubusercontent.com/u/660580?v=4",
"profile": "https://github.com/lawrencecraft",
"contributions": []
},
{
"login": "aviaviavi",
"name": "Avi Press",
"avatar_url": "https://avatars1.githubusercontent.com/u/1388071?v=4",
"profile": "http://avi.press",
"contributions": []
},
{
"login": "Tardog",
"name": "Sarah Kraßnigg",
"avatar_url": "https://avatars0.githubusercontent.com/u/22562624?v=4",
"profile": "https://github.com/Tardog",
"contributions": []
},
{
"login": "jmks",
"name": "Jason Schweier",
"avatar_url": "https://avatars1.githubusercontent.com/u/4923990?v=4",
"profile": "http://jmks.ca",
"contributions": []
},
{
"login": "massa1240",
"name": "Massa",
"avatar_url": "https://avatars2.githubusercontent.com/u/8268483?v=4",
"profile": "https://github.com/massa1240",
"contributions": []
},
{
"login": "Boot-Error",
"name": "Vighnesh SK",
"avatar_url": "https://avatars3.githubusercontent.com/u/8546140?v=4",
"profile": "http://boot-error.github.io",
"contributions": []
},
{
"login": "alexfornuto",
"name": "Alex Fornuto",
"avatar_url": "https://avatars3.githubusercontent.com/u/2349184?v=4",
"profile": "http://alexfornuto.com",
"contributions": []
},
{
"login": "stevenwhitehead",
"name": "stevenwhitehead",
"avatar_url": "https://avatars0.githubusercontent.com/u/30630257?v=4",
"profile": "https://github.com/stevenwhitehead",
"contributions": []
},
{
"login": "jdenoy-saagie",
"name": "Johan Denoyer",
"avatar_url": "https://avatars2.githubusercontent.com/u/55875303?v=4",
"profile": "https://github.com/jdenoy-saagie",
"contributions": []
},
{
"login": "caalberts",
"name": "Albert Salim",
"avatar_url": "https://avatars1.githubusercontent.com/u/4749355?v=4",
"profile": "https://albertsalim.dev",
"contributions": []
},
{
"login": "felicianotech",
"name": "Ricardo N Feliciano",
"avatar_url": "https://avatars1.githubusercontent.com/u/6017470?v=4",
"profile": "https://Feliciano.Tech",
"contributions": []
},
{
"login": "3mard",
"name": "Omer Davutoglu",
"avatar_url": "https://avatars3.githubusercontent.com/u/42009880?v=4",
"profile": "https://github.com/3mard",
"contributions": []
},
{
"login": "hemu",
"name": "Hemu",
"avatar_url": "https://avatars0.githubusercontent.com/u/1871299?v=4",
"profile": "https://github.com/hemu",
"contributions": []
},
{
"login": "Daanikus",
"name": "Dan Bent",
"avatar_url": "https://avatars0.githubusercontent.com/u/18027087?v=4",
"profile": "https://github.com/Daanikus",
"contributions": []
},
{
"login": "C123R",
"name": "C123R",
"avatar_url": "https://avatars3.githubusercontent.com/u/20225764?v=4",
"profile": "https://cizer.dev",
"contributions": []
},
{
"login": "madepolli",
"name": "Matjaž Depolli",
"avatar_url": "https://avatars1.githubusercontent.com/u/7237000?v=4",
"profile": "https://github.com/madepolli",
"contributions": []
},
{
"login": "schoentoon",
"name": "Toon Schoenmakers",
"avatar_url": "https://avatars1.githubusercontent.com/u/417618?v=4",
"profile": "https://blog.schoentoon.blue",
"contributions": []
},
{
"login": "TDHTTTT",
"name": "TDHTTTT",
"avatar_url": "https://avatars2.githubusercontent.com/u/24703459?v=4",
"profile": "http://tdhttt.com",
"contributions": []
},
{
"login": "jottr",
"name": "jottr",
"avatar_url": "https://avatars0.githubusercontent.com/u/2744198?v=4",
"profile": "https://github.com/jottr",
"contributions": []
},
{
"login": "NickyMateev",
"name": "Nikolay Mateev",
"avatar_url": "https://avatars3.githubusercontent.com/u/15074116?v=4",
"profile": "https://www.linkedin.com/in/nikolay-mateev-79187b167/",
"contributions": []
},
{
"login": "Gibstick",
"name": "Charlie Wang",
"avatar_url": "https://avatars1.githubusercontent.com/u/1320418?v=4",
"profile": "https://charliewang.io",
"contributions": []
},
{
"login": "liyiheng",
"name": "liyiheng",
"avatar_url": "https://avatars3.githubusercontent.com/u/16461061?v=4",
"profile": "https://github.com/liyiheng",
"contributions": []
},
{
"login": "bjoernw",
"name": "Bjoern Weidlich",
"avatar_url": "https://avatars1.githubusercontent.com/u/1467156?v=4",
"profile": "https://bjoern.svbtle.com",
"contributions": []
},
{
"login": "firecat53",
"name": "Scott Hansen",
"avatar_url": "https://avatars1.githubusercontent.com/u/568113?v=4",
"profile": "https://github.com/firecat53",
"contributions": []
},
{
"login": "davidsbond",
"name": "David Bond",
"avatar_url": "https://avatars3.githubusercontent.com/u/6227720?v=4",
"profile": "https://davidsbond.github.io",
"contributions": []
},
{
"login": "yesnault",
"name": "Yvonnick Esnault",
"avatar_url": "https://avatars3.githubusercontent.com/u/395454?v=4",
"profile": "https://github.com/yesnault",
"contributions": []
},
{
"login": "leterio",
"name": "Vinícius Letério",
"avatar_url": "https://avatars0.githubusercontent.com/u/15060358?v=4",
"profile": "https://github.com/leterio",
"contributions": []
},
{
"login": "acaloiaro",
"name": "Adriano",
"avatar_url": "https://avatars3.githubusercontent.com/u/3331648?v=4",
"profile": "https://adriano.fyi",
"contributions": []
},
{
"login": "jonhadfield",
"name": "Jon Hadfield",
"avatar_url": "https://avatars1.githubusercontent.com/u/843944?v=4",
"profile": "https://github.com/jonhadfield",
"contributions": []
},
{
"login": "Tdnshah",
"name": "Tejas Shah",
"avatar_url": "https://avatars2.githubusercontent.com/u/13272752?v=4",
"profile": "https://github.com/Tdnshah",
"contributions": []
},
{
"login": "mogensen",
"name": "Frederik Mogensen",
"avatar_url": "https://avatars2.githubusercontent.com/u/592710?v=4",
"profile": "https://github.com/mogensen",
"contributions": []
},
{
"login": "rsaarelm",
"name": "Risto Saarelma",
"avatar_url": "https://avatars1.githubusercontent.com/u/41840?v=4",
"profile": "https://github.com/rsaarelm",
"contributions": []
},
{
"login": "sam-github",
"name": "Sam Roberts",
"avatar_url": "https://avatars2.githubusercontent.com/u/17607?v=4",
"profile": "https://sam-github.github.io/",
"contributions": []
},
{
"login": "gerchardon",
"name": "gerchardon",
"avatar_url": "https://avatars0.githubusercontent.com/u/5973160?v=4",
"profile": "https://github.com/gerchardon",
"contributions": []
},
{
"login": "mryanmurphy",
"name": "Matt",
"avatar_url": "https://avatars2.githubusercontent.com/u/641427?v=4",
"profile": "https://github.com/mryanmurphy",
"contributions": []
},
{
"login": "ripienaar",
"name": "R.I.Pienaar",
"avatar_url": "https://avatars0.githubusercontent.com/u/82342?v=4",
"profile": "http://devco.net/",
"contributions": []
},
{
"login": "fmotrifork",
"name": "Frederik Mogensen",
"avatar_url": "https://avatars3.githubusercontent.com/u/18327738?v=4",
"profile": "https://github.com/fmotrifork",
"contributions": []
},
{
"login": "aeter",
"name": "aeter",
"avatar_url": "https://avatars0.githubusercontent.com/u/238607?v=4",
"profile": "https://github.com/aeter",
"contributions": []
},
{
"login": "timhwang21",
"name": "Tim Hwang",
"avatar_url": "https://avatars3.githubusercontent.com/u/5831434?v=4",
"profile": "http://timhwang21.gitbook.io",
"contributions": []
},
{
"login": "cyingfan",
"name": "Ying Fan Chong",
"avatar_url": "https://avatars1.githubusercontent.com/u/10404961?v=4",
"profile": "http://about.me/yingfan",
"contributions": []
},
{
"login": "MartinJohns",
"name": "Martin Johns",
"avatar_url": "https://avatars1.githubusercontent.com/u/5269069?v=4",
"profile": "https://github.com/MartinJohns",
"contributions": []
},
{
"login": "jamietanna",
"name": "Jamie Tanna",
"avatar_url": "https://avatars0.githubusercontent.com/u/3315059?v=4",
"profile": "https://www.jvt.me",
"contributions": []
},
{
"login": "trimble",
"name": "Todd Trimble",
"avatar_url": "https://avatars3.githubusercontent.com/u/371317?v=4",
"profile": "https://github.com/trimble",
"contributions": []
},
{
"login": "mhanberg",
"name": "Mitchell Hanberg",
"avatar_url": "https://avatars2.githubusercontent.com/u/5523984?v=4",
"profile": "https://www.mitchellhanberg.com",
"contributions": []
},
{
"login": "franga2000",
"name": "Miha Frangež",
"avatar_url": "https://avatars3.githubusercontent.com/u/3891092?v=4",
"profile": "https://franga2000.com",
"contributions": []
},
{
"login": "sahilister",
"name": "Sahil Dhiman",
"avatar_url": "https://avatars0.githubusercontent.com/u/52946452?v=4",
"profile": "https://blog.sahilister.in/",
"contributions": []
},
{
"login": "applegreengrape",
"name": "Pingzhou | 平舟",
"avatar_url": "https://avatars2.githubusercontent.com/u/17727004?v=4",
"profile": "https://pzoo.netlify.app/",
"contributions": []
},
{
"login": "YuviGold",
"name": "Yuval Goldberg",
"avatar_url": "https://avatars0.githubusercontent.com/u/29873449?v=4",
"profile": "https://github.com/YuviGold",
"contributions": []
},
{
"login": "dabcoder",
"name": "David Bouchare",
"avatar_url": "https://avatars3.githubusercontent.com/u/5034531?v=4",
"profile": "https://github.com/dabcoder",
"contributions": []
},
{
"login": "stone",
"name": "Fredrik Steen",
"avatar_url": "https://avatars3.githubusercontent.com/u/29077?v=4",
"profile": "https://github.com/stone",
"contributions": []
},
{
"login": "zye1996",
"name": "zye1996",
"avatar_url": "https://avatars2.githubusercontent.com/u/28901953?v=4",
"profile": "https://github.com/zye1996",
"contributions": []
},
{
"login": "pgaxatte",
"name": "Pierre Gaxatte",
"avatar_url": "https://avatars.githubusercontent.com/u/30696904?v=4",
"profile": "https://github.com/pgaxatte",
"contributions": []
},
{
"login": "xntrik",
"name": "Christian Frichot",
"avatar_url": "https://avatars.githubusercontent.com/u/678260?v=4",
"profile": "https://xntrik.wtf",
"contributions": []
},
{
"login": "LKaemmerling",
"name": "Lukas Kämmerling",
"avatar_url": "https://avatars.githubusercontent.com/u/4281581?v=4",
"profile": "https://lukas-kaemmerling.de",
"contributions": []
},
{
"login": "inetAnt",
"name": "Antoine Meillet",
"avatar_url": "https://avatars.githubusercontent.com/u/1765366?v=4",
"profile": "https://inetant.net/",
"contributions": []
},
{
"login": "cclauss",
"name": "Christian Clauss",
"avatar_url": "https://avatars.githubusercontent.com/u/3709715?v=4",
"profile": "https://www.patreon.com/cclauss",
"contributions": [
]
}
],
"contributorsPerLine": 7
"contributorsPerLine": 7,
"commitConvention": "none"
}

2
.github/FUNDING.yml vendored
View File

@ -1 +1 @@
patreon: wtfutil
github: senorprogrammer

11
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
reviewers:
- senorprogrammer
assignees:
- senorprogrammer

51
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,51 @@
name: "Code scanning - action"
on:
push:
pull_request:
schedule:
- cron: '0 3 * * 3,6'
jobs:
CodeQL-Build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

22
.github/workflows/golangci-lint.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- master
pull_request:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be
# specified without patch version: we always use the latest patch version.
# https://github.com/golangci/golangci-lint/releases
version: v1.39
args: ./...

30
.github/workflows/goreleaser.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: goreleaser
on:
push:
tags:
- '*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

70
.github/workflows/staticcheck.yml vendored Normal file
View File

@ -0,0 +1,70 @@
name: static check
on: pull_request
jobs:
imports:
name: Imports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/golang-github-actions@4356d0458ea4bfdb55fcb296437812acef970f9b
with:
run: imports
token: ${{ secrets.GITHUB_TOKEN }}
errcheck:
name: Errcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/golang-github-actions@4356d0458ea4bfdb55fcb296437812acef970f9b
with:
run: errcheck
token: ${{ secrets.GITHUB_TOKEN }}
#lint:
#name: Lint
#runs-on: ubuntu-latest
#steps:
#- uses: actions/checkout@master
#- name: check
#uses: grandcolline/golang-github-actions@4356d04
#with:
#run: lint
#token: ${{ secrets.GITHUB_TOKEN }}
shadow:
name: Shadow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/golang-github-actions@4356d0458ea4bfdb55fcb296437812acef970f9b
with:
run: shadow
token: ${{ secrets.GITHUB_TOKEN }}
staticcheck:
name: StaticCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/golang-github-actions@4356d0458ea4bfdb55fcb296437812acef970f9b
with:
run: staticcheck
token: ${{ secrets.GITHUB_TOKEN }}
#sec:
#name: Sec
#runs-on: ubuntu-latest
#steps:
#- uses: actions/checkout@master
#- name: check
#uses: grandcolline/golang-github-actions@4356d04
#with:
#run: sec
#token: ${{ secrets.GITHUB_TOKEN }}
#flags: "-exclude=G104"

18
.golangci.yml Normal file
View File

@ -0,0 +1,18 @@
run:
timeout: 2m
linters:
enable:
- vet
- errcheck
- staticcheck
# - dupl
# - funlen
# - goconst
# - gocritic
- gofmt
# - golint
# - misspell
# - stylecheck
- unconvert
# - whitespace

View File

@ -1,9 +1,10 @@
env:
- GO111MODULE=on
- GOPROXY="https://gocenter.io"
- GOPROXY="https://proxy.golang.org,direct"
archive:
wrap_in_directory: true
archives:
- id: default
wrap_in_directory: true
builds:
- binary: wtfutil
@ -11,7 +12,6 @@ builds:
- darwin
- linux
goarch:
- 386
- amd64
- arm
- arm64
@ -21,14 +21,10 @@ before:
- make install
brews:
- github:
owner: wtfutil
name: homebrew-wtfutil
-
name: wtfutil
homepage: 'https://wtfutil.com'
description: 'The personal information dashboard for your terminal.'
dockers:
- image_templates:
- wtfutil/wtf
tap:
owner: wtfutil
name: homebrew-wtfutil

View File

@ -1,14 +1,14 @@
language: go
go:
- "1.11.x"
- "1.12.x"
sudo: false
- "1.16.x"
before_install:
# Make sure travis builds work for forks
- mkdir -p $TRAVIS_BUILD_DIR $GOPATH/src/github.com/wtfutil
- test ! -d $GOPATH/src/github.com/wtfutil/wtf && mv $TRAVIS_BUILD_DIR $GOPATH/src/github.com/wtfutil/wtf || true
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/wtfutil/wtf
- cd $HOME/gopath/src/github.com/wtfutil/wtf
- export GOPROXY="https://gocenter.io" && export GO111MODULE=on
- export GOPROXY="https://proxy.golang.org,direct"
script: go get ./... && go test -v github.com/wtfutil/wtf/...
script: go get ./... && ./scripts/check-uncommitted-vendor-files.sh && go test -v github.com/wtfutil/wtf/...

View File

@ -4,7 +4,380 @@
### ⚡️ Added
* Kubernetes module, [#142](https://github.com/wtfutil/wtf/issues/142) by [@sudermanjr](https://github.com/sudermanjr)
* Yahoo Finance module added, by [@inetAnt](https://github.com/inetAnt)
### 🐞 Fixed
* Fixed error closing the Jira module response body, [#1070](https://github.com/wtfutil/wtf/issues/1070) by [@senorprogrammer](https://github.com/senorprogrammer)
## v0.36.0
### ⚡️ Added
* HealthChecks module added, by [@stone](https://github.com/stone)
* Asana module added, by [@xntrik](https://github.com/xntrik)
* Kubernetes module now displays the Ready Replicas and Total Replicas count, by [@LKaemmerling](https://github.com/LKaemmerling)
* Now builds using Go 1.16, which provides support for Apple's M1 ARM hardware, by [@LKaemmerling](https://github.com/LKaemmerling)
### 🐞 Fixed
* Numerous dangling response bodies closed, by [@dabcoder](https://github.com/dabcoder)
* HackerNews read-on-response error fixed, by [@LKaemmerling](https://github.com/LKaemmerling)
* CircleCI read-on-response error fixed, by [@dabcoder](https://github.com/dabcoder)
## v0.35.0
### ⚡️ Added
* CircleCI module now supports `numberOfBuilds` setting defining how many builds to display, [#1020](https://github.com/wtfutil/wtf/issues/1020) by [@dabcoder](https://github.com/dabcoder)
* The <kbd>\\</kbd> key now opens module documentation in the browser for the currently-focused module, by [@senorprogrammer](https://github.com/senorprogrammer)
* Krisinformation module added, by [@stone](https://github.com/stone)
* Covid module has been added, by [@dabcoder](https://github.com/dabcoder)
* Support for a "Language" configuration key added. Supports any BCP 47 tag for identifying a langauge, by [@senorprogrammer](https://github.com/senorprogrammer)
### 🐞 Fixed
* CryptoLive prices update again, [#1041](https://github.com/wtfutil/wtf/issues/1041) by [@zye1996](https://github.com/zye1996)
## v0.34.0
2020-11-08
### ⚡️ Added
* DigitalOcean module now supports custom column definitions in the default layout. See [the docs](https://wtfutil.com/modules/digitalocean/) for details, [#986](https://github.com/wtfutil/wtf/issues/986) by [@senorprogrammer](https://github.com/senorprogrammer)
* Finnhub stock quotes module added, [#930](https://github.com/wtfutil/wtf/issues/930) by [@applegreengrape](https://github.com/applegreengrape)
* Grafana Alerts module added, by [@schoentoon](https://github.com/schoentoon)
### 👍 Updated
* Updated `google.golang.org/api` from 0.30.0 to 0.33.0
* Updated `github.com/digitalocean/godo` from 1.46.0 to 1.52.0
* Updated `github.com/xanzy/go-gitlab` from 0.38.1 to 0.39.0
* Updated `github.com/zorkian/go-datadog-api` from 2.29.0+incompatible to 2.30.0+incompatible
* Updated `golang.org/x/text` from 0.3.3 to 0.3.4
## v0.33.0
2020-10-13
### ⚡️ Added
* FeedReader module supports [display mode switching](https://github.com/wtfutil/wtf/pull/976) via the `t` key, by [@cyingfan](https://github.com/cyingfan)
* Clocks module now supports `natural` ordering option, [#896](https://github.com/wtfutil/wtf/issues/896) by [@seanstoppable](https://github.com/Seanstoppable)
* Exit banner message added, by [@senorprogrammer](https://github.com/senorprogrammer)
* [UptimeRobot module added](https://github.com/wtfutil/wtf/pull/983), by [@franga2000](https://github.com/franga2000)
* Gitlab module now defaults the domain to `https://gitlab.com`, by [@jmks](https://github.com/jmks)
### 🐞 Fixed
* Exchange Rates module now displays rates in alphabetical order, sorted by the base rate, by [@senorprogrammer](https://github.com/senorprogrammer)
* Feed Reader module no longer crashes on feeds that don't have a published date, [#958](https://github.com/wtfutil/wtf/issues/958) by [@cyingfan](https://github.com/cyingfan)
* Stray blank lines no longer appear at the end of highlightable lists, [#977](https://github.com/wtfutil/wtf/pull/977) by [@cyingfan](https://github.com/cyingfan)
* `config.yml` now properly set to `0600` instead of `0666`, by [@cyingfan](https://github.com/cyingfan)
* Now blank-imports the `time/tzinfo` package to provide timezone support for Windows users, [#994](https://github.com/wtfutil/wtf/issues/994) by [@trimble](https://github.com/trimble)
### 👍 Updated
* Updated `github.com/gdamore/tcell` from 1.3.0 to 1.4.0
* Updated `github.com/shirou/gopsutil` from 2.20.7+incompatible to 2.20.9+incompatible
* Updated `github.com/mmcdole/gofeed` from 1.0.0 to 1.1.0
* Updated `github.com/digitalocean/godo` from 1.42.1 to 1.46.0
* Updated `github.com/xanzy/go-gitlab` from 0.33.0 to 0.38.1
* Updated `github.com/adlio/trello` from 1.7.0 to 1.8.0
* Updated `github.com/alecthomas/chroma` from 0.8.0 to 0.8.1
* Updated `github.com/nicklaw5/helix` from 0.5.9 to 0.7.0
* Now requires Go 1.15 for compilation in Dockerfiles and go.mod, by [@seanstoppable](https://github.com/Seanstoppable)
## v0.32.0
### ⚡️ Added
* PagerDuty module now supports `showOncallEnd` setting, which determines whether or not to display the oncall rotation end date, by [@senorprogrammer](https://github.com/senorprogrammer)
* Exchange Rates module now supports `precision` setting, which determines how many decimal places to display, [#897](https://github.com/wtfutil/wtf/issues/897) by [@senorprogrammer](https://github.com/senorprogrammer)
### 🐞 Fixed
* Todo module's edit modal now shows up quickly, [#876](https://github.com/wtfutil/wtf/issues/876) by [@aeter](https://github.com/aeter)
* Jira module title now displays properly, [#942](https://github.com/wtfutil/wtf/issues/942) by [@timhwang21](https://github.com/timhwang21)
### 👍 Updated
* Updated `alecthomas/chroma` from 0.7.3 to 0.8.0
* Updated `digitalocean/godo` from 1.38.0 to 1.42.1
* Updated `google.golang.org/api` from 0.29.0 to 0.30.0
* Updated `shirou/gopsutil` from 2.20.6+incompatible to 2.20.7+incompatible
## v0.31.0
### ⚡️ Added
* [docker-credential-helpers](https://github.com/docker/docker-credential-helpers) support added to provide optional securing of module secrets, [#517](https://github.com/wtfutil/wtf/issues/517) by [@sam-github](https://github.com/sam-github)
* `make lint` now uses [golangci-lint](https://github.com/golangci/golangci-lint-action), by [@sam-github](https://github.com/sam-github)
* GitHub module now supports per-section configuration, [#864](https://github.com/wtfutil/wtf/issues/864) by [@mryanmurphy](https://github.com/mryanmurphy)
* PagerDuty module now accepts Team ID and User ID as filters, by [@mryanmurphy](https://github.com/mryanmurphy)
* Weather module now supports a `useEmoji` setting, toggling the use of emoji characters in the title, by [@jonhadfield](https://github.com/jonhadfield)
* Pocket documentation added, by [@3mard](https://github.com/3mard)
### 🐞 Fixed
* GitLab Todo module now allows domain to be set, defaults to `https://gitlab.com`, by [@gerchardon](https://github.com/gerchardon)
* Pi-hole module now works with Pi-hole v4 and v5, by [@jonhadfield](https://github.com/jonhadfield)
* Null pointer exception fixed in VictorOps module, by [@ripienaar](https://github.com/ripienaar)
### 👍 Updated
* Updated `google.golang.org/api` from 0.25.0 to 0.29.0
* Updated `pkg/profile` from 1.4.0 to 1.5.0
* Updated `nicklaw5/helix` from 0.5.8 to 0.5.9
* Updated `digitalocean/godo` from 1.37.0 to 1.38.0
* Updated `gopkg.in/yaml.v2` from 2.2.8 to 2.3.0
* Updated `xanzy/go-gitlab` from 0.31.0 to 0.33.0
* Updated `stretchr/testify` from 1.5.1 to 1.6.1
* Updated `golang.org/x/text` from 0.3.2 to 0.3.3
* Updated `shirou/gopsutil` from 2.20.4+incompatible to 2.20.6+incompatible
## v0.30.0
### ⚡️ Added
* Expansive keyboard controls for the [GitLab](https://wtfutil.com/modules/gitlab/) module, by [@mogensen](https://github.com/mogensen)
* [IPInfo](https://wtfutil.com/modules/ipaddress/ipinfo/) module now supports IPv6 lookup, by [@acaloiaro](https://github.com/acaloiaro)
* The GitHub repo now runs a set of actions that lint PRs for code quality and conformity and comment in-line on the PRs. See here for action details https://github.com/wtfutil/wtf/actions
### 🐞 Fixed
* Random capital letters around display, [#811](https://github.com/wtfutil/wtf/issues/811) by [@jonhadfield](https://github.com/jonhadfield)
* [Feed Reader](https://wtfutil.com/modules/feedreader/) module now properly sorts multi-feed items by date, by [@rsaarelm](https://github.com/rsaarelm)
### 👍 Updated
* Updated `zorkian/go-datadog-api` from 2.28.0+incompatible to 2.29.0+incompatible
* Updated `shirou/gopsutil` from 2.20.3+incompatible to 2.20.4+incompatible
* Updated `google.golang.org/api` from 0.22.0 to 0.23.0
## 0.29.0
### ⚡️ Added
* gCal module now has a `showEndTime` boolean option for displaying meeting end times, by [@acaloiaro](https://github.com/acaloiaro)
* [Pi-hole](https://wtfutil.com/modules/pihole/) module added, by [@jonhadfield](https://github.com/jonhadfield)
### 🐞 Fixed
* Docker module subheading display, [#847](https://github.com/wtfutil/wtf/issues/847) by [@senorprogrammer](https://github.com/senorprogrammer)
* Improved display of currencies for the Exchange Rate module, by [@indradhanush](https://github.com/indradhanush)
### 👍 Updated
* Updated `nicklaw5/helix` from 0.5.7 to 0.5.8
* Updated `digitalocean/godo` from 1.34.0 to 1.35.1
* Updated `xanzy/go-gitlab` from 0.28.0 to 0.31.0
* Updated `shirou/gopsutil` from 2.20.2+incompatible to 2.20.3+incompatible
* Updated `alecthomas/chroma` from 0.7.1 to 0.7.2
* Updated `google.golang.org/api` from 0.21.0 to 0.22.0
## v0.28.0
### ⚡️ Added
* Support for customizing CPU, Mem, and Swap display in ResourceUsage, by [@leterio](https://github.com/leterio)
### 👍 Updated
* Now prefers Go 1.14 for compilation (should still work under 1.13 however)
* Updated `shirou/gopsutil` from 2.20.1+incompatible to 2.20.2+incompatible
* Updated `google.golang.org/api` from 0.17.0 to 0.20.0
* Updated `digitalocean/godo` from 1.30.0 to 1.32.0
* Updated `xanzy/go-gitlab` from 0.26.0 to 0.28.0
* Updated `adlio/trello` from 1.6.0 to 1.7.0
* Updated `zorkian/go-datadog-api` from 2.27.0+incompatible to 2.28.0+incompatible
## 0.27.0
### ⚡️ Added
* GitLab Todo module added, by [@elliotrushton](https://github.com/elliotrushton)
* [CDS](https://wtfutil.com/modules/cds/) module added, by [@yesnault](https://github.com/yesnault)
### 🐞 Fixed
* The `vendor` directory has been removed, [#792](https://github.com/wtfutil/wtf/issues/792) by [@bjoernw](https://github.com/bjoernw)
### 👍 Updated
* Updated `zorkian/go-datadog-api` from 2.26.0+incompatible to 2.27.0+incompatible
* Updated `google.golang.org/api` from 0.15.0 to 0.17.0
* Updated `github.com/nicklaw5/helix` from 0.5.5 to 0.5.7
* Updated `xanzy/go-gitlab` from 0.23.0 to 0.26.0
* Updated `stretchr/testify` from o.4.0 to 0.5.1
## 0.26.0
### ⚡️ Added
* `myName` config setting added to PagerDuty module, by [@senorprogrammer](https://github.com/senorprogrammer)
* `withDate` config setting added to Digital Clock module, by [@senorprogrammer](https://github.com/senorprogrammer)
* Twitch module added, by [@bjoernw](https://github.com/bjoernw)
* HackerNews module now opens HN comments when there is no alternative external link, [#758](https://github.com/wtfutil/wtf/issues/758) by [@senorprogrammer](https://github.com/senorprogrammer)
* gCal module now now allows users to hide all-day events, [#733](https://github.com/wtfutil/wtf/issues/733) by [@senorprogrammer](https://github.com/senorprogrammer)
* SpaceX module added, by [@bjoernw](https://github.com/bjoernw)
* Support for obeying `XDG_CONFIG_HOME` when set, [#699](https://github.com/wtfutil/wtf/issues/699) by [@Seanstoppable](https://github.com/Seanstoppable)
### 🐞 Fixed
* Module templating working again, [#748](https://github.com/wtfutil/wtf/issues/748) by [@senorprogrammer](https://github.com/senorprogrammer)
* CmdRunner title spacing issue fixed, [#784](https://github.com/wtfutil/wtf/issues/784) by [@senorprogrammer](https://github.com/senorprogrammer)
* Colors in cmdrunner fixed when using nodejs chalk et al., [#618](https://github.com/wtfutil/wtf/issues/618) by [@Seanstoppable](https://github.com/Seanstoppable)
* Docker buid instructions updated and improved, by [@firecat53](https://github.com/firecat53)
* Kubernetes module can now be used with multiple contexts, [#809](https://github.com/wtfutil/wtf/issues/809) by [@davidsbond](https://github.com/davidsbond)
### 👍 Updated
* Updated `digitalocean/godo` from 1.22.0 to 1.30.0
* Updated `google.golang.org/api` from 0.14.0 to 0.15.0
* Updated `alecthomas/chroma` from 0.7.0 to 0.7.1
* Updated `pkg/errors` from 0.8.1 to 0.9.1
* Updated `xanzy/go-gitlab` from 0.22.2 to 0.23.0
* Updated `shirou/gopsutil` from 2.19.11 to 2.20.1
* Updated `zorkian/go-datadog-api` from 2.25.0 to 2.26.0
* Updated `gopkg.in/yaml.v2` from 2.2.7 to 2.2.8
* Updated `nicklaw5/helix` from 0.5.4 to 0.5.5
## 0.25.0
### ⚡️ Added
* [DigitalOcean](https://wtfutil.com/modules/digitalocean/) module added, by [@senorprogrammer](https://github.com/senorprogrammer)
* [Transmission](https://wtfutil.com/modules/transmission/) module now supports a `hideComplete` configuration setting, by [@schoentoon](https://github.com/schoentoon)
* Pocket module added, [#742] by [@3mard](https://github.com/3mard)
* [Exchange Rates](https://wtfutil.com/modules/exchange_rates/) module added, by [@schoentoon](https://github.com/schoentoon)
* [GitHub](https://wtfutil.com/modules/github/) modules supports 'p' keyboard command to open **p**ull requests, by [@NickyMateev](https://github.com/NickyMateev)
* [GitHub](https://wtfutil.com/modules/github/) modules supports 'i' keyboard command to open **i**ssues, by [@NickyMateev](https://github.com/NickyMateev)
* [Jenkins](https://wtfutil.com/modules/jenkins/) module now supports multi-configuration projects, by [@NickyMateev](https://github.com/NickyMateev)
### 🐞 Fixed
* Subreddit out of bounds error fixed, [#753](https://github.com/wtfutil/wtf/issues/753) by [@TDHTTTT](https://github.com/TDHTTTT)
* Homebrew builds now contain version information, [#557](https://github.com/wtfutil/wtf/issues/557) by [@jottr](https://github.com/jottr)
* CmdRunner flicker problem, [#732](https://github.com/wtfutil/wtf/issues/732) by [@Gibstick](https://github.com/Gibstick)
### 👍 Updated
* Switched from `gocenter.io` as the Go proxy to `proxy.golang.org`, by [@chenrui333](https://github.com/chenrui333)
* Updated `go-datadog-api` to version 2.25.0+incompatible
* Updated `adlio/trello` to version 1.6.0
* Updated `alecthomas/chroma` to version 0.7.0
* Updated `olekukonko/tablewriter` to version 0.0.3
* Updated `pkg/profile` to version 1.4.0
* Updated `yaml.v2` to 2.2.7
* Updated `google.golang.org/api` to 0.14.0
* Updated `xanzy/go-gitlab` to 0.22.2
* Uodated `shirou/gopsutil` to 2.19.11+incompatible
## v0.24.0
### ⚡️ Added
* Proper, usable [Docker file](https://github.com/wtfutil/wtf/blob/master/Dockerfile) added, by [@Boot-Error](https://github.com/Boot-Error)
* [GitLab](https://wtfutil.com/modules/gitlab/) module displays issues assigned to, and opened by, the user, by [@caalberts](https://github.com/caalberts)
* [TravisCI](https://wtfutil.com/modules/travisci/) now checks for uncommitted vendor changes, by [@indradhanush](https://github.com/indradhanush)
* Football module added, by [@C123R](https://github.com/C123R)
* [resourceuseage](https://wtfutil.com/modules/resourceusage/) now supports a `cpuCombined` setting, by [@madepolli](https://github.com/madepolli)
* [Twitter Stats](https://wtfutil.com/modules/twitter/twittertweets/) module added, by [@Ameobea](https://github.com/Ameobea)
### 🐞 Fixed
* Github PRs do not count against issues, by [@alexfornuto](https://github.com/alexfornuto)
* Todo scrolling now works properly, [#707](https://github.com/wtfutil/wtf/issues/707) by [3mard](https://github.com/3mard)
* Configs with a missing `color` key now load properly, [#718](https://github.com/wtfutil/wtf/issues/718) and [#730](https://github.com/wtfutil/wtf/issues/730) by [@senorprogrammer](https://github.com/senorprogrammer)
## 0.23.0
### ⚡️ Added
* [Azure DevOps](https://wtfutil.com/modules/azure-devops/) module added, by [@v-braun](https://github.com/v-braun)
* [Dev.to](https://wtfutil.com/modules/devto/) module added, by [@VictorAvelar](https://github.com/VictorAvelar)
* [TravisCI]() module now supports enterprise endpoints, [#652](https://github.com/wtfutil/wtf/issues/652) by [@scw007](https://github.com/scw007)
* [Subreddit](https://wtfutil.com/modules/subreddit/) module added, by [@lawrencecraft](https://github.com/lawrencecraft)
* [gCal](https://wtfutil.com/modules/google/gcal/) module now supports a `hourFormat` setting for defining whether to display 12 or 24-hour times, [#665](https://github.com/wtfutil/wtf/issues/665) by [@senorprogrammer](https://github.com/senorprogrammer)
* [Scarf](https://scarf.sh) installation instructions added to README, by [@aviaviavi](https://github.com/aviaviavi)
* Spotify widget now supports colour themes, [#659](https://github.com/wtfutil/wtf/issues/659) by [@Tardog](https://github.com/Tardog)
* [Buildkite](https://wtfutil.com/modules/buildkite/) module added, by [@jmks](https://github.com/jmks)
* [Improvements](https://github.com/wtfutil/wtf/pull/680) to the [CmdRunner](https://wtfutil.com/modules/cmdrunner/) module, by [@noxer](https://github.com/noxer)
### 🐞 Fixed
* gCal calendar event time colour can now be changed by setting the `eventTime` configuration setting, [#638](https://github.com/wtfutil/wtf/issues/638) by [@indradhanush](https://github.com/indradhanush)
* [Clocks](https://wtfutil.com/modules/clocks/) now obeys global row colour settings, [#658](https://github.com/wtfutil/wtf/issues/658) by [@senorprogrammer](https://github.com/senorprogrammer)
* [Transmission](https://wtfutil.com/modules/transmission/) module no longer blocks rendering when a Transmission daemon cannot be found, [#661](https://github.com/wtfutil/wtf/issues/661) by [@senorprogrammer](https://github.com/senorprogrammer)
* [Trello](https://wtfutil.com/modules/trello/) module now respects project list order, [#664](https://github.com/wtfutil/wtf/issues/664) by [@Seanstoppable](https://github.com/Seanstoppable)
* [Todo](https://wtfutil.com/modules/todo/) module now respects checkbox settings, [#616](https://github.com/wtfutil/wtf/issues/616) by [@Seanstoppable](https://github.com/Seanstoppable)
* [Todoist](https://wtfutil.com/modules/todoist/) module now properly handles todo items with due date and times, [#645](https://github.com/wtfutil/wtf/issues/645) by [@massa1240](https://github.com/massa1240)
* Invalid pointer error in [Azure DevOps](https://wtfutil.com/modules/azure-devops/) fixed by [@Boot-Error](https://github.com/Boot-Error)
* Renamed slice error in [Dev](https://wtfutil.com/modules/devto/) fixed by [@Boot-Error](https://github.com/Boot-Error)
### 👍 Updated
* Updated `go-datadog-api` to version v2.24.0
* Updated `go-github` to version 26.13
* Updated `watcher` to version 1.0.7
* Updated `google-api-go-client` to version 0.10.0
* Updated `chroma` to version 0.6.7
* Updated `go-gitlab` to version 0.20.1
* Updated `trello` to version 1.4.0
* Updated `tcell` to version 1.3.0
* Updated `gopsutil` to version 2.19.9+incompatible
* Updated `yaml` to version 2.2.4
## v0.22.0
### ⚡️ Added
* [Arpansagovau](https://wtfutil.com/modules/weather_services/arpansagovau/) (arpansa.gov.au) module added, by [@jeffz](https://github.com/jeffz)
* 'calendarReadLevel' setting added to gCal module, by [@mikkeljuhl](https://github.com/mikkeljuhl)
* Todoist module now catches and displays API errors, by [@Seanstoppable](https://github.com/Seanstoppable)
* TravisCI sort orders now configurable, by [@nyourchuck](https://github.com/nyourchuck)
* Google Analytics module now supports real-time metrics, [#581](https://github.com/wtfutil/wtf/issues/581) by [@Ameobea](https://github.com/Ameobea)
* Colors in configuration can now be defined using long-form hex, i.e.: #ff0000, by [@Seanstoppable](https://github.com/Seanstoppable)
* GitHub module pull requests are now selectable and openable via keyboard, [#547](https://github.com/wtfutil/wtf/issues/547) by [@Midnight-Conqueror](https://github.com/Midnight-Conqueror)
* [Docker](https://wtfutil.com/modules/docker/) module added, [#594](https://github.com/wtfutil/wtf/issues/594) by [@v-braun](https://github.com/v-braun)
* NewRelic module now supports displaying data from multiple apps, [#471](https://github.com/wtfutil/wtf/issues/471) by [@ChrisDBrown](https://github.com/ChrisDBrown) and [@Seanstoppable](https://github.com/Seanstoppable)
* [Digital Clock](https://wtfutil.com/modules/digitalclock/) module added, by [@Narengowda](https://github.com/Narengowda)
### 🐞 Fixed
* ScrollableWidget bounds checking error fixed, [#578](https://github.com/wtfutil/wtf/issues/578) by [@Seanstoppable](https://github.com/Seanstoppable)
* Now properly URL-decodes Jenkins branch names, [#575](https://github.com/wtfutil/wtf/issues/575) by [@lesteenman](https://github.com/lesteenman)
* Jira column sizes render properly, [#574](https://github.com/wtfutil/wtf/issues/574) by [@lesteenman](https://github.com/lesteenman)
* Todoist module updated to latest API version, by [@Seanstoppable](https://github.com/Seanstoppable)
* gCal colour highlighting working again, [#611](https://github.com/wtfutil/wtf/issues/611) by [@senorprogrammer](https://github.com/senorprogrammer)
* Per-module background and text colour settings working again, [#568](https://github.com/wtfutil/wtf/issues/568) by [@Seanstoppable](https://github.com/Seanstoppable)
* Git module no longer forces sorting of repositories, [#608](https://github.com/wtfutil/wtf/pull/608) by [@Seanstoppable](https://github.com/Seanstoppable)
* GitHub PR icons render properly without phantom characters, by [@Midnight-Conqueror](https://github.com/Midnight-Conqueror)
* GitLab configuration now takes a list of project paths, [#566](https://github.com/wtfutil/wtf/issues/566) by [@senorprogrammer](https://github.com/senorprogrammer)
* Kubernetes configuration segfault fixed, [#549](https://github.com/wtfutil/wtf/issues/549) by [@ibaum](https://github.com/ibaum)
## v0.21.0
### ⚡️ Added
* Power Soure module support added for FreeBSD, by [@hxw](https://github.com/hxw)
### 🐞 Fixed
* Power indicator displays ∞ on Linux when fully-charged and on AC power, [#534](https://github.com/wtfutil/wtf/issues/534) by [@Seanstoppable](https://github.com/Seanstoppable)
* Default background color is now the terminal background color, making transparency support possible in MacOS and Linux, by [@Seanstoppable](https://github.com/Seanstoppable)
* `xdg-open` now used as the opener for HTTP/HTTPS by default, by [@hxw](https://github.com/hxw)
* Transmission port over-ride now working, [#565](https://github.com/wtfutil/wtf/issues/565) by [@Seanstoppable](https://github.com/Seanstoppable)
* Default config is now created on first run, [#553](https://github.com/wtfutil/wtf/issues/553) by [@senorprogrammer](https://github.com/senorprogrammer)
## v0.20.0
### ⚡️ Added
* Kubernetes module added, [#142](https://github.com/wtfutil/wtf/issues/142) by [@sudermanjr](https://github.com/sudermanjr)
### 🐞 Fixed
@ -165,7 +538,7 @@
### ⚡️ Added
* Dependencies are now managed and installed using Go modules. See README.md for details, [#406](https://github.com/wtfutil/wtf/issues/406) by [@retgits](https://github.com/retgits)
* Dependencies are now managed and installed using Go modules. See README.md for details, [#406](https://github.com/wtfutil/wtf/issues/406) by [@retgits](https://github.com/retgits)
## 0.7.2
@ -214,7 +587,7 @@
### ⚡️ Added
* Resource Usage module added by [@nicholas-eden](https://github.com/nicholas-eden)
* Recursive repo search in Git module ([#126](https://github.com/wtfutil/wtf/issues/126) by [@anandsudhir](http://github.com/anandsudhir))
* Recursive repo search in Git module ([#126](https://github.com/wtfutil/wtf/issues/126) by [@anandsudhir](http://github.com/anandsudhir))
* HTTP/HTTPS handling in OpenFile() util function by [@jdenoy](https://github.com/jdenoy)
* Honor system http proxies when using non-default transport by [@skymeyer](https://github.com/skymeyer)
* VictorOps module added by [ImDevinC](https://github.com/ImDevinC)

View File

@ -1,16 +1,12 @@
# Contributing
When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.
Note that we have a code of conduct. Please follow it in all your interactions with the project.
## Pull Request Process
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the static documentation with details of changes to the interface, this includes new environment
variables, useful file locations and configuration parameters.
Documentation lives at [wtfdocs](https://github.com/wtfutil/wtfdocs) and is a [Hugo](https://gohugo.io) app. See Hugo's documentation for usage.
## Code of Conduct

View File

@ -1,3 +1,26 @@
FROM scratch
COPY wtfutil /
ENTRYPOINT ["/wtfutil"]
FROM golang:1.16-alpine as build
ARG version=master
RUN apk add git make ncurses && \
git clone https://github.com/wtfutil/wtf.git $GOPATH/src/github.com/wtfutil/wtf && \
cd $GOPATH/src/github.com/wtfutil/wtf && \
git checkout $version
ENV GOPROXY=https://proxy.golang.org,direct
ENV GO111MODULE=on
ENV GOSUMDB=off
WORKDIR $GOPATH/src/github.com/wtfutil/wtf
ENV PATH=$PATH:./bin
RUN make build
FROM alpine
COPY --from=build /go/src/github.com/wtfutil/wtf/bin/wtfutil /usr/local/bin/
RUN adduser -h /config -DG users -u 20000 wtf
USER wtf
ENTRYPOINT ["wtfutil"]

18
Dockerfile.build Normal file
View File

@ -0,0 +1,18 @@
FROM golang:1.16 as build
ARG version=master
RUN git clone https://github.com/wtfutil/wtf.git $GOPATH/src/github.com/wtfutil/wtf && \
cd $GOPATH/src/github.com/wtfutil/wtf && \
git checkout $version
ENV GOPROXY=https://proxy.golang.org,direct
ENV GO111MODULE=on
ENV GOSUMDB=off
WORKDIR $GOPATH/src/github.com/wtfutil/wtf
ENV PATH=$PATH:./bin
RUN make build && \
cp bin/wtfutil /usr/local/bin/

View File

@ -1,6 +1,8 @@
Copyright 2018, Chris Cummer
*Mozilla Public License, version 2.0*
Mozilla Public License, version 2.0 1. Definitions 1.1. “Contributor” means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.
1. Definitions
1.1. “Contributor” means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.
1.2. “Contributor Version” means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributors Contribution.
@ -24,9 +26,9 @@ that the Covered Software was made available under the terms of version 1.1 or e
1.10. “Modifications” means any of the following:
any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or
any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or
any new file in Source Code Form that contains any Covered Software.
any new file in Source Code Form that contains any Covered Software.
1.11. “Patent Claims” of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.
@ -36,7 +38,9 @@ any new file in Source Code Form that contains any Covered Software.
1.14. “You” (or “Your”) means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
2. License Grants and Conditions 2.1. Grants Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
2. License Grants and Conditions
2.1. Grants Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and
@ -62,7 +66,9 @@ This License does not grant any rights in the trademarks, service marks, or logo
2.7. Conditions Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.
3. Responsibilities 3.1. Distribution of Source Form All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients rights in the Source Code Form.
3. Responsibilities
3.1. Distribution of Source Form All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients rights in the Source Code Form.
3.2. Distribution of Executable Form If You distribute Covered Software in Executable Form then:
@ -76,23 +82,37 @@ You may distribute such Executable Form under the terms of this License, or subl
3.5. Application of Additional Terms You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction.
4. Inability to Comply Due to Statute or Regulation If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
4. Inability to Comply Due to Statute or Regulation
5. Termination 5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.
If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
5. Termination
5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.
6. Disclaimer of Warranty Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.
6. Disclaimer of Warranty
7. Limitation of Liability Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such partys negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.
Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.
8. Litigation Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a partys ability to bring cross-claims or counter-claims.
7. Limitation of Liability
9. Miscellaneous This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.
Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such partys negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.
10. Versions of the License 10.1. New Versions Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.
8. Litigation
Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a partys ability to bring cross-claims or counter-claims.
9. Miscellaneous
This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.
10. Versions of the License
10.1. New Versions Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.
10.2. Effect of New Versions You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.
@ -100,10 +120,14 @@ You may distribute such Executable Form under the terms of this License, or subl
10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Exhibit A - Source Code Form License Notice
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - “Incompatible With Secondary Licenses” Notice This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0.
Exhibit B - “Incompatible With Secondary Licenses” Notice
This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0.

170
Makefile
View File

@ -1,58 +1,164 @@
.PHONY: build contrib_check install binary_msg lint run size test uninstall
.PHONY: build clean contrib_check coverage docker-build docker-install help install isntall lint run size test uninstall
# detect GOPATH if not set
ifndef $(GOPATH)
$(info GOPATH is not set, autodetecting..)
TESTPATH := $(dir $(abspath ../../..))
DIRS := bin pkg src
# create a ; separated line of tests and pass it to shell
MISSING_DIRS := $(shell $(foreach entry,$(DIRS),test -d "$(TESTPATH)$(entry)" || echo "$(entry)";))
ifeq ($(MISSING_DIRS),)
$(info Found GOPATH: $(TESTPATH))
export GOPATH := $(TESTPATH)
else
$(info ..missing dirs "$(MISSING_DIRS)" in "$(TESTDIR)")
$(info GOPATH autodetection failed)
endif
$(info GOPATH is not set, autodetecting..)
TESTPATH := $(dir $(abspath ../../..))
DIRS := bin pkg src
# create a ; separated line of tests and pass it to shell
MISSING_DIRS := $(shell $(foreach entry,$(DIRS),test -d "$(TESTPATH)$(entry)" || echo "$(entry)";))
ifeq ($(MISSING_DIRS),)
$(info Found GOPATH: $(TESTPATH))
export GOPATH := $(TESTPATH)
else
$(info ..missing dirs "$(MISSING_DIRS)" in "$(TESTDIR)")
$(info GOPATH autodetection failed)
endif
endif
# Set go modules to on and use GoCenter for immutable modules
export GO111MODULE = on
export GOPROXY = https://gocenter.io
export GOPROXY = https://proxy.golang.org,direct
# Determines the path to this Makefile
THIS_FILE := $(lastword $(MAKEFILE_LIST))
build:
go build -o bin/wtfutil
@$(MAKE) -f $(THIS_FILE) binary_msg
APP=wtfutil
contrib_check:
define HEADER
____ __ ____ .___________. _______
\ \ / \ / / | || ____|
\ \/ \/ / `---| |----`| |__
\ / | | | __|
\ /\ / | | | |
\__/ \__/ |__| |__|
endef
export HEADER
# -------------------- Actions -------------------- #
## build: builds a local version
build:
@echo "$$HEADER"
@echo "Building..."
go build -o bin/${APP}
@echo "Done building"
## clean: removes old build cruft
clean:
rm -rf ./dist
rm -rf ./bin/${APP}
@echo "Done cleaning"
## contrib-check: checks for any contributors who have not been given due credit
contrib-check:
npx all-contributors-cli check
## coverage: figures out and displays test code coverage
coverage:
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out
## docker-build: builds in docker
docker-build:
@echo "Building ${APP} in Docker..."
docker build -t wtfutil:build --build-arg=version=master -f Dockerfile.build .
@echo "Done with docker build"
## docker-install: installs a local version of the app from docker build
docker-install:
@echo "Installing..."
docker create --name wtf_build wtfutil:build
docker cp wtf_build:/usr/local/bin/wtfutil ~/.local/bin/
$(eval INSTALLPATH = $(shell which ${APP}))
@echo "${APP} installed into ${INSTALLPATH}"
docker rm wtf_build
## gosec: runs the gosec static security scanner against the source code
gosec:
gosec -tests ./...
## help: prints this help message
help:
@echo "Usage: \n"
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
## isntall: an alias for 'install'
isntall:
@$(MAKE) -f $(THIS_FILE) install
## install: installs a local version of the app
install:
@echo "Installing wtfutil..."
$(eval GOVERS = $(shell go version))
@echo "$$HEADER"
@echo "Installing ${APP} with ${GOVERS}..."
@go clean
@go install -ldflags="-s -w -X main.version=$(shell git describe --always --abbrev=6) -X main.date=$(shell date +%FT%T%z)"
@mv ~/go/bin/wtf ~/go/bin/wtfutil
@$(MAKE) -f $(THIS_FILE) binary_msg
binary_msg:
@echo "Install path: "
@which wtfutil || echo "Could not find wtfutil in PATH" && exit 0
@mv ~/go/bin/wtf ~/go/bin/${APP}
$(eval INSTALLPATH = $(shell which ${APP}))
@echo "${APP} installed into ${INSTALLPATH}"
## lint: runs a number of code quality checks against the source code
lint:
structcheck ./...
varcheck ./...
golangci-lint cache clean
golangci-lint run
# lint:
# @echo "\033[35mhttps://github.com/kisielk/errcheck\033[0m"
# errcheck ./app
# errcheck ./cfg
# errcheck ./flags
# errcheck ./help
# errcheck ./logger
# errcheck ./modules/...
# errcheck ./utils
# errcheck ./view
# errcheck ./wtf
# errcheck ./main.go
# @echo "\033[35mhttps://golang.org/cmd/vet/k\033[0m"
# go vet ./app
# go vet ./cfg
# go vet ./flags
# go vet ./help
# go vet ./logger
# go vet ./modules/...
# go vet ./utils
# go vet ./view
# go vet ./wtf
# go vet ./main.go
# @echo "\033[35m# https://staticcheck.io/docs/k\033[0m"
# staticcheck ./app
# staticcheck ./cfg
# staticcheck ./flags
# staticcheck ./help
# staticcheck ./logger
# staticcheck ./modules/...
# staticcheck ./utils
# staticcheck ./view
# staticcheck ./wtf
# staticcheck ./main.go
# @echo "\033[35m# https://github.com/mdempsky/unconvert\033[0m"
# unconvert ./...
## loc: displays the lines of code (LoC) count
loc:
@loc --exclude _sample_configs/ _site/ docs/ Makefile *.md
## run: executes the locally-installed version
run: build
bin/wtfutil
size:
loc --exclude _sample_configs/ _site/ docs/ Makefile *.md
@echo "$$HEADER"
bin/${APP}
## test: runs the test suite
test: build
@echo "$$HEADER"
go test ./...
## uninstall: uninstals a locally-installed version
uninstall:
@rm ~/go/bin/wtfutil
@rm ~/go/bin/${APP}

350
README.md
View File

@ -1,39 +1,51 @@
<p align="center">
<img src="./images/logo_transparent.png?raw=true" title="WTF" alt="WTF" width="560" height="560" />
</p>
[![All Contributors](https://img.shields.io/badge/all_contributors-78-orange.svg?style=flat-square)](#contributors)
[![Build Status](https://travis-ci.com/wtfutil/wtf.svg?branch=master)](https://travis-ci.com/wtfutil/wtf)
[![Twitter](https://img.shields.io/badge/follow-on%20twitter-blue.svg)](https://twitter.com/wtfutil)
[![Go Report Card](https://goreportcard.com/badge/github.com/wtfutil/wtf)](https://goreportcard.com/report/github.com/wtfutil/wtf)
<p align="center">
<a href="#contributors"><img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-114-orange.svg?style=flat-square"></a>
<a href="https://travis-ci.com/wtfutil/wtf"><img alt="Travis Status" src="https://img.shields.io/travis/com/wtfutil/wtf/master.svg?label=travis&maxAge=43200"></a>
<a href="https://goreportcard.com/report/github.com/wtfutil/wtf"><img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/wtfutil/wtf"></a>
<a href="https://twitter.com/wtfutil"><img alt="Twitter" src="https://img.shields.io/badge/follow-on%20twitter-blue.svg"></a>
</p>
# WTF
WTF (aka 'wtfutil') is the personal information dashboard for your terminal, providing at-a-glance access to your very important but infrequently-needed stats and data.
A personal terminal-based dashboard utility, designed for
displaying infrequently-needed, but very important, daily data.
Used by thousands of developers and tech people around the world, WTF is free and open-source. To support the continued use and development of WTF, please consider sponsoring WTF via [GitHub Sponsors](https://github.com/sponsors/senorprogrammer).
* [Screenshot](#screenshot)
* [Quick Start](#quick-start)
* [Install via Homebrew](#install-via-homebrew)
* [Install the Binary](#install-the-binary)
* [Install from Source](#install-from-source)
### Are you a contributor or sponsor?
Awesome! [See here](https://wtfutil.com/#exit-message) for how you can change the exit message, the message WTF shows when quitting, to something special just for you.
#
<p></p>
* [Installation](#installation)
* [Installing via Homebrew](#installing-via-homebrew)
* [Installing via MacPorts](#installing-via-macports)
* [Installing a Binary](#installing-a-binary)
* [Installing from Source](#installing-from-source)
* [Running via Docker](#running-via-docker)
* [Communication](#communication)
* [Slack](#slack)
* [Twitter](#twitter)
* [Documentation](#documentation)
* [Modules](#modules)
* [Getting Bugs Fixed or Features Added](#getting-bugs-fixed-or-features-added)
* [Contributing to the Source Code](#contributing-to-the-source-code)
* [Adding Dependencies](#adding-dependencies)
* [Contributing to the Documentation](#contributing-to-the-documentation)
* [Contributors](#contributors)
* [Acknowledgements](#acknowledgments)
## Screenshot
<p align="center">
<img src="./images/screenshot.jpg" title="screenshot" width="720" height="420" />
</p>
## Quick Start
## Installation
### Install via Homebrew
### Installing via Homebrew
The simplest way from Homebrew:
@ -52,7 +64,18 @@ brew install wtfutil
wtfutil
```
### Install the Binary
### Installing via MacPorts
You can also install via [MacPorts](https://www.macports.org/):
```console
sudo port selfupdate
sudo port install wtfutil
wtfutil
```
### Installing a Binary
[Download the latest binary](https://github.com/wtfutil/wtf/releases) from GitHub.
@ -64,13 +87,16 @@ chmod a+x /usr/local/bin/wtfutil
and you should be good to go.
### Install from Source
### Installing from Source
If you want to run the build command from within your `$GOPATH`:
```bash
# Set the Go proxy variable to GoCenter
export GOPROXY="https://gocenter.io"
# Set the Go proxy
export GOPROXY="https://proxy.golang.org,direct"
# Disable the Go checksum database
export GOSUMDB=off
# Enable Go modules
export GO111MODULE=on
@ -84,8 +110,8 @@ make run
If you want to run the build command from a folder that is not in your `$GOPATH`:
```bash
# Set the Go proxy variable to GoCenter
export GOPROXY="https://gocenter.io"
# Set the Go proxy
export GOPROXY="https://proxy.golang.org,direct"
go get -u github.com/wtfutil/wtf
cd $GOPATH/src/github.com/wtfutil/wtf
@ -93,7 +119,45 @@ make install
make run
```
**Note:** WTF is _only_ compatible with Go versions **1.11.0** or later (due to the use of Go modules). If you would like to use `gccgo` to compile, you _must_ use `gccgo-9` or later which introduces support for Go modules.
### Installing from Source using Docker
All building is done inside a docker container. You can then copy the binary to
your local machine.
```bash
curl -o Dockerfile.build https://raw.githubusercontent.com/wtfutil/wtf/master/Dockerfile.build
docker build -f Dockerfile.build -t wtfutil --build-arg=version=master .
docker create --name wtf_build wtfutil
docker cp wtf_build:/usr/local/bin/wtfutil ~/.local/bin
docker rm wtf_build
```
**Note:** WTF is _only_ compatible with Go versions **1.16.0** or later (due to the use of Go modules and newer standard library functions). If you would like to use `gccgo` to compile, you _must_ use `gccgo-9` or later which introduces support for Go modules.
### Installing via Arch User Repository
Arch Linux users can utilise the [wtfutil](https://aur.archlinux.org/packages/wtfutil) package to build it from source, or [wtfutil-bin](https://aur.archlinux.org/packages/wtfutil-bin/) to install pre-built binaries.
## Running via Docker
You can run `wtf` inside a docker container:
```bash
# download or create the Dockerfile
curl -o Dockerfile https://raw.githubusercontent.com/wtfutil/wtf/master/Dockerfile
# build the docker container
docker build -t wtfutil .
# or for a particular tag or branch
docker build --build-arg=version=v0.25.0 -t wtfutil .
# run the container
docker run -it wtfutil
# run container with a local config file
docker run -it -v path/to/config.yml:/config/config.yml wtfutil --config=/config/config.yml
```
## Communication
@ -105,15 +169,15 @@ Find #wtfutil on https://gophers.slack.com/ and join us.
### Twitter
Also, follow [on Twitter](https://twitter.com/wtfutil) for news and latest updates.
Also, follow [on Twitter](https://twitter.com/wtfutil) for news and latest updates.
## Documentation
See [https://wtfutil.com](https://wtfutil.com) for the definitive
documentation. Here's some short-cuts:
* [Installation](https://wtfutil.com/getting_started/installation/)
* [Configuration](https://wtfutil.com/configuration/)
* [Installation](https://wtfutil.com/quick_start/)
* [Configuration](https://wtfutil.com/configuration/files/)
* [Module Documentation](https://wtfutil.com/modules/)
## Modules
@ -122,6 +186,7 @@ Modules are the chunks of functionality that make WTF useful. Modules are added
Some interesting modules you might consider adding to get you started:
* [DigitalOcean](https://wtfutil.com/modules/digitalocean/)
* [GitHub](https://wtfutil.com/modules/github/)
* [Google Calendar](https://wtfutil.com/modules/google/gcal/)
* [HackerNews](https://wtfutil.com/modules/hackernews/)
@ -132,15 +197,21 @@ Some interesting modules you might consider adding to get you started:
* [Transmission](https://wtfutil.com/modules/transmission/)
* [Trello](https://wtfutil.com/modules/trello/)
## Getting Bugs Fixed or Features Added
WTF is open-source software, informally maintained by a small collection of volunteers who come and go at their leisure. There are absolutely no guarantees that, even if an issue is opened for them, bugs will be fixed or features added.
If there is a bug that you really need to have fixed or a feature you really want to have implemented, you can greatly increase your chances of that happening by creating a bounty on [BountySource](https://www.bountysource.com) to provide an incentive for someone to tackle it.
## Contributing to the Source Code
First, please read [Talk, then code](https://dave.cheney.net/2019/02/18/talk-then-code) by Dave Cheney. It's great advice and will often save a lot of time and effort.
First, kindly read [Talk, then code](https://dave.cheney.net/2019/02/18/talk-then-code) by Dave Cheney. It's great advice and will often save a lot of time and effort.
Next, please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests.
Next, kindly read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests.
Then create your branch, write your code, submit your PR, and join the rest of the awesome people who've contributed their time and effort towards WTF. Without their contributors, WTF wouldn't be possible.
And don't worry if you've never written Go before, or never contributed to an open source project before, or that your code won't be good enough. For a surprising number of people WTF has been their first Go project, or first open source contribution. If you're here, and you've read this far, you're the right stuff.
Don't worry if you've never written Go before, or never contributed to an open source project before, or that your code won't be good enough. For a surprising number of people WTF has been their first Go project, or first open source contribution. If you're here, and you've read this far, you're the right stuff.
## Contributing to the Documentation
@ -155,20 +226,210 @@ Dependency management in WTF is handled by [Go modules](https://github.com/golan
## Contributors
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
| [<img src="https://avatars0.githubusercontent.com/u/6413?v=4" width="48px;" alt="Chris Cummer"/><br /><sub><b>Chris Cummer</b></sub>](https://twitter.com/senorprogrammer)<br /> | [<img src="https://avatars2.githubusercontent.com/u/3252403?v=4" width="48px;" alt="Anand Sudhir Prayaga"/><br /><sub><b>Anand Sudhir Prayaga</b></sub>](https://github.com/anandsudhir)<br /> | [<img src="https://avatars1.githubusercontent.com/u/34973359?v=4" width="48px;" alt="Hossein Mehrabi"/><br /><sub><b>Hossein Mehrabi</b></sub>](https://github.com/jeangovil)<br /> | [<img src="https://avatars0.githubusercontent.com/u/11779018?v=4" width="48px;" alt="FengYa"/><br /><sub><b>FengYa</b></sub>](https://github.com/Fengyalv)<br /> | [<img src="https://avatars2.githubusercontent.com/u/17337753?v=4" width="48px;" alt="deltax"/><br /><sub><b>deltax</b></sub>](https://fluxionnetwork.github.io/fluxion/)<br /> | [<img src="https://avatars0.githubusercontent.com/u/1319630?v=4" width="48px;" alt="Bill Keenan"/><br /><sub><b>Bill Keenan</b></sub>](https://github.com/BillKeenan)<br /> | [<img src="https://avatars2.githubusercontent.com/u/118081?v=4" width="48px;" alt="June S"/><br /><sub><b>June S</b></sub>](http://blog.sapara.com)<br /> |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars3.githubusercontent.com/u/16461061?v=4" width="48px;" alt="liyiheng"/><br /><sub><b>liyiheng</b></sub>](https://github.com/XanthusL)<br /> | [<img src="https://avatars2.githubusercontent.com/u/9014288?v=4" width="48px;" alt="baustinanki"/><br /><sub><b>baustinanki</b></sub>](https://github.com/baustinanki)<br /> | [<img src="https://avatars0.githubusercontent.com/u/371475?v=4" width="48px;" alt="lucus lee"/><br /><sub><b>lucus lee</b></sub>](https://github.com/lixin9311)<br /> | [<img src="https://avatars1.githubusercontent.com/u/7537841?v=4" width="48px;" alt="Mike Lloyd"/><br /><sub><b>Mike Lloyd</b></sub>](https://github.com/mxplusb)<br /> | [<img src="https://avatars3.githubusercontent.com/u/10998?v=4" width="48px;" alt="Sergio Rubio"/><br /><sub><b>Sergio Rubio</b></sub>](http://rubiojr.rbel.co)<br /> | [<img src="https://avatars3.githubusercontent.com/u/17374492?v=4" width="48px;" alt="Farhad Farahi"/><br /><sub><b>Farhad Farahi</b></sub>](https://github.com/FarhadF)<br /> | [<img src="https://avatars1.githubusercontent.com/u/634604?v=4" width="48px;" alt="Lasantha Kularatne"/><br /><sub><b>Lasantha Kularatne</b></sub>](http://lasantha.blogspot.com/)<br /> |
| [<img src="https://avatars1.githubusercontent.com/u/823331?v=4" width="48px;" alt="Mark Old"/><br /><sub><b>Mark Old</b></sub>](https://github.com/dlom)<br /> | [<img src="https://avatars0.githubusercontent.com/u/5546718?v=4" width="48px;" alt="flw"/><br /><sub><b>flw</b></sub>](http://flw.tools/)<br /> | [<img src="https://avatars0.githubusercontent.com/u/6024927?v=4" width="48px;" alt="David Barda"/><br /><sub><b>David Barda</b></sub>](https://github.com/davebarda)<br /> | [<img src="https://avatars2.githubusercontent.com/u/4261980?v=4" width="48px;" alt="Geoff Lee"/><br /><sub><b>Geoff Lee</b></sub>](https://github.com/matrinox)<br /> | [<img src="https://avatars3.githubusercontent.com/u/1022918?v=4" width="48px;" alt="George Opritescu"/><br /><sub><b>George Opritescu</b></sub>](http://international.github.io)<br /> | [<img src="https://avatars3.githubusercontent.com/u/497310?v=4" width="48px;" alt="Grazfather"/><br /><sub><b>Grazfather</b></sub>](https://twitter.com/Grazfather)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1691120?v=4" width="48px;" alt="Michael Cordell"/><br /><sub><b>Michael Cordell</b></sub>](http://www.mikecordell.com/)<br /> |
| [<img src="https://avatars2.githubusercontent.com/u/1215497?v=4" width="48px;" alt="Patrick José Pereira"/><br /><sub><b>Patrick José Pereira</b></sub>](http://patrick.ibexcps.com)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1483092?v=4" width="48px;" alt="sherod taylor"/><br /><sub><b>sherod taylor</b></sub>](https://github.com/sherodtaylor)<br /> | [<img src="https://avatars2.githubusercontent.com/u/3062663?v=4" width="48px;" alt="Andrew Scott"/><br /><sub><b>Andrew Scott</b></sub>](http://cogentia.io)<br /> | [<img src="https://avatars1.githubusercontent.com/u/12018440?v=4" width="48px;" alt="Lassi Piironen"/><br /><sub><b>Lassi Piironen</b></sub>](https://github.com/lsipii)<br /> | [<img src="https://avatars0.githubusercontent.com/u/14799210?v=4" width="48px;" alt="BlackWebWolf"/><br /><sub><b>BlackWebWolf</b></sub>](https://github.com/BlackWebWolf)<br /> | [<img src="https://avatars0.githubusercontent.com/u/1894885?v=4" width="48px;" alt="andrewzolotukhin"/><br /><sub><b>andrewzolotukhin</b></sub>](https://github.com/andrewzolotukhin)<br /> | [<img src="https://avatars1.githubusercontent.com/u/8568280?v=4" width="48px;" alt="Leon Stigter"/><br /><sub><b>Leon Stigter</b></sub>](https://retgits.github.io)<br /> |
| [<img src="https://avatars3.githubusercontent.com/u/21756?v=4" width="48px;" alt="Amr Tamimi"/><br /><sub><b>Amr Tamimi</b></sub>](https://tamimi.se)<br /> | [<img src="https://avatars3.githubusercontent.com/u/3717137?v=4" width="48px;" alt="Jagdeep Singh"/><br /><sub><b>Jagdeep Singh</b></sub>](https://jagdeep.me)<br /> | [<img src="https://avatars0.githubusercontent.com/u/889171?v=4" width="48px;" alt="Lineu Felipe"/><br /><sub><b>Lineu Felipe</b></sub>](https://github.com/darkSasori)<br /> | [<img src="https://avatars2.githubusercontent.com/u/159124?v=4" width="48px;" alt="Konstantin"/><br /><sub><b>Konstantin</b></sub>](https://github.com/kvj)<br /> | [<img src="https://avatars2.githubusercontent.com/u/6044920?v=4" width="48px;" alt="Brendan O'Leary"/><br /><sub><b>Brendan O'Leary</b></sub>](http://www.brendanoleary.com)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1226441?v=4" width="48px;" alt="bertl4398"/><br /><sub><b>bertl4398</b></sub>](https://github.com/bertl4398)<br /> | [<img src="https://avatars2.githubusercontent.com/u/6553695?v=4" width="48px;" alt="Ferenc-"/><br /><sub><b>Ferenc-</b></sub>](https://github.com/Ferenc-)<br /> |
| [<img src="https://avatars1.githubusercontent.com/u/952036?v=4" width="48px;" alt="Rohan Verma"/><br /><sub><b>Rohan Verma</b></sub>](http://rohanverma.net)<br /> | [<img src="https://avatars1.githubusercontent.com/u/19293566?v=4" width="48px;" alt="Tim Fitzgerald"/><br /><sub><b>Tim Fitzgerald</b></sub>](https://github.com/fimtitzgerald)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1081051?v=4" width="48px;" alt="Federico Ruggi"/><br /><sub><b>Federico Ruggi</b></sub>](https://github.com/ruggi)<br /> | [<img src="https://avatars2.githubusercontent.com/u/7293328?v=4" width="48px;" alt="Craig Woodward"/><br /><sub><b>Craig Woodward</b></sub>](https://github.com/ctwoodward)<br /> | [<img src="https://avatars3.githubusercontent.com/u/15367484?v=4" width="48px;" alt="ReadmeCritic"/><br /><sub><b>ReadmeCritic</b></sub>](https://twitter.com/ReadmeCritic)<br /> | [<img src="https://avatars0.githubusercontent.com/u/141402?v=4" width="48px;" alt="Eugene"/><br /><sub><b>Eugene</b></sub>](https://github.com/jdevelop)<br /> | [<img src="https://avatars1.githubusercontent.com/u/12983705?s=460&v=4" width="48px;" alt="Kenny Wu"/><br /><sub><b>Kenny Wu</b></sub>](https://github.com/Trinergy)<br /> |
| [<img src="https://avatars0.githubusercontent.com/u/538234?v=4" width="48px;" alt="Renán Romero"/><br /><sub><b>Renán Romero</b></sub>](http://www.romeroruiz.com)<br /> | [<img src="https://avatars1.githubusercontent.com/u/5031240?v=4" width="48px;" alt="Bastian Groß"/><br /><sub><b>Bastian Groß</b></sub>](https://github.com/sticreations)<br /> | [<img src="https://avatars1.githubusercontent.com/u/2496835?v=4" width="48px;" alt="nicholas-eden"/><br /><sub><b>nicholas-eden</b></sub>](https://github.com/nicholas-eden)<br /> | [<img src="https://avatars1.githubusercontent.com/u/279390?v=4" width="48px;" alt="Dan Rabinowitz"/><br /><sub><b>Dan Rabinowitz</b></sub>](https://github.com/danrabinowitz)<br /> | [<img src="https://avatars1.githubusercontent.com/u/6897575?v=4" width="48px;" alt="David Missmann"/><br /><sub><b>David Missmann</b></sub>](https://github.com/dvdmssmnn)<br /> | [<img src="https://avatars2.githubusercontent.com/u/882006?v=4" width="48px;" alt="Mathias Weber"/><br /><sub><b>Mathias Weber</b></sub>](https://github.com/mweb)<br /> | [<img src="https://avatars1.githubusercontent.com/u/32081703?v=4" width="48px;" alt="TheRedSpy15"/><br /><sub><b>TheRedSpy15</b></sub>](https://github.com/TheRedSpy15)<br /> |
| [<img src="https://avatars0.githubusercontent.com/u/9569897?v=4" width="48px;" alt="Harald Nordgren"/><br /><sub><b>Harald Nordgren</b></sub>](https://www.linkedin.com/in/harald-nordgren-44778192)<br /> | [<img src="https://avatars0.githubusercontent.com/u/11583824?v=4" width="48px;" alt="Matei Alexandru Gardus"/><br /><sub><b>Matei Alexandru Gardus</b></sub>](http://stormfirefox1.github.io)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1523955?v=4" width="48px;" alt="Sean Smith"/><br /><sub><b>Sean Smith</b></sub>](https://github.com/Seanstoppable)<br /> | [<img src="https://avatars1.githubusercontent.com/u/1646238?v=4" width="48px;" alt="Halil Kaskavalci"/><br /><sub><b>Halil Kaskavalci</b></sub>](http://kaskavalci.com)<br /> | [<img src="https://avatars2.githubusercontent.com/u/246715?v=4" width="48px;" alt="Johan Denoyer"/><br /><sub><b>Johan Denoyer</b></sub>](http://www.johandenoyer.fr)<br /> | [<img src="https://avatars1.githubusercontent.com/u/593516?v=4" width="48px;" alt="Jelle Vink"/><br /><sub><b>Jelle Vink</b></sub>](https://skymeyer.be)<br /> | [<img src="https://avatars1.githubusercontent.com/u/3997333?v=4" width="48px;" alt="Devin Collins"/><br /><sub><b>Devin Collins</b></sub>](http://imdevinc.com)<br /> |
| [<img src="https://avatars3.githubusercontent.com/u/18333?v=4" width="48px;" alt="Danne Stayskal"/><br /><sub><b>Danne Stayskal</b></sub>](http://danne.stayskal.com/)<br /> | [<img src="https://avatars1.githubusercontent.com/u/2006658?v=4" width="48px;" alt="Max Beizer"/><br /><sub><b>Max Beizer</b></sub>](https://www.maxbeizer.com)<br /> | [<img src="https://avatars1.githubusercontent.com/u/194392?v=4" width="48px;" alt="E:V:A"/><br /><sub><b>E:V:A</b></sub>](http://tinyurl.com/nwmj4as)<br /> | [<img src="https://avatars0.githubusercontent.com/u/1425500?v=4" width="48px;" alt="Gabriel"/><br /><sub><b>Gabriel</b></sub>](https://github.com/GaboFDC)<br /> | [<img src="https://avatars2.githubusercontent.com/u/10111411?v=4" width="48px;" alt="Andrew Scibek"/><br /><sub><b>Andrew Scibek</b></sub>](https://github.com/AndrewScibek)<br /> | [<img src="https://avatars0.githubusercontent.com/u/29709822?v=4" width="48px;" alt="FriedCosey"/><br /><sub><b>FriedCosey</b></sub>](https://github.com/FriedCosey)<br /> | [<img src="https://avatars1.githubusercontent.com/u/3891?v=4" width="48px;" alt="Michele Gerarduzzi"/><br /><sub><b>Michele Gerarduzzi</b></sub>](https://michelegera.dev/)<br /> |
| [<img src="https://avatars3.githubusercontent.com/u/13438569?v=4" width="48px;" alt="Jack Morris"/><br /><sub><b>Jack Morris</b></sub>](https://github.com/rudolphjacksonm)<br /> | [<img src="https://avatars0.githubusercontent.com/u/14993807?v=4" width="48px;" alt="foorb"/><br /><sub><b>foorb</b></sub>](https://github.com/foorb)<br /> | [<img src="https://avatars0.githubusercontent.com/u/5819098?v=4" width="48px;" alt="Levi Baber"/><br /><sub><b>Levi Baber</b></sub>](http://researchit.las.iastate.edu)<br /> | [<img src="https://avatars0.githubusercontent.com/u/38514?v=4" width="48px;" alt="Graham Anderson"/><br /><sub><b>Graham Anderson</b></sub>](https://github.com/gnanderson)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1936828?v=4" width="48px;" alt="Romain Bossart"/><br /><sub><b>Romain Bossart</b></sub>](https://github.com/bosr)<br /> | [<img src="https://avatars0.githubusercontent.com/u/969838?v=4" width="48px;" alt="Kirill Motkov"/><br /><sub><b>Kirill Motkov</b></sub>](http://eonix.ru)<br /> | [<img src="https://avatars1.githubusercontent.com/u/3665694?v=4" width="48px;" alt="Brian Choromanski"/><br /><sub><b>Brian Choromanski</b></sub>](http://www.BrianChoromanski.com)<br /> |
| [<img src="https://avatars0.githubusercontent.com/u/1302304?v=4" width="48px;" alt="Sean DuBois"/><br /><sub><b>Sean DuBois</b></sub>](http://siobud.com)<br /> | [<img src="https://avatars1.githubusercontent.com/u/47195730?v=4" width="48px;" alt="Gary Kim"/><br /><sub><b>Gary Kim</b></sub>](https://github.com/gary-kim)<br /> | [<img src="https://avatars1.githubusercontent.com/u/6660171?v=4" width="48px;" alt="Dylan"/><br /><sub><b>Dylan</b></sub>](https://dylanbartels.com)<br /> | [<img src="https://avatars0.githubusercontent.com/u/1990354?v=4" width="48px;" alt="Dmytro Prokhorenkov"/><br /><sub><b>Dmytro Prokhorenkov</b></sub>](http://liet.me)<br /> | [<img src="https://avatars1.githubusercontent.com/u/590442?v=4" width="48px;" alt="Elliot"/><br /><sub><b>Elliot</b></sub>](https://github.com/elliotrushton)<br /> | [<img src="https://avatars3.githubusercontent.com/u/1580956?v=4" width="48px;" alt="chenrui"/><br /><sub><b>chenrui</b></sub>](http://chenrui.dev)<br /> | [<img src="https://avatars0.githubusercontent.com/u/7624765?v=4" width="48px;" alt="Andrew Suderman"/><br /><sub><b>Andrew Suderman</b></sub>](https://github.com/sudermanjr)<br /> |
| [<img src="https://avatars3.githubusercontent.com/u/2373856?v=4" width="48px;" alt="Bob 'Wombat' Hogg"/><br /><sub><b>Bob 'Wombat' Hogg</b></sub>](https://github.com/rwhogg)<br /> |
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://twitter.com/senorprogrammer"><img src="https://avatars0.githubusercontent.com/u/6413?v=4" width="48px;" alt=""/><br /><sub><b>Chris Cummer</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/anandsudhir"><img src="https://avatars2.githubusercontent.com/u/3252403?v=4" width="48px;" alt=""/><br /><sub><b>Anand Sudhir Prayaga</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/jeangovil"><img src="https://avatars1.githubusercontent.com/u/34973359?v=4" width="48px;" alt=""/><br /><sub><b>Hossein Mehrabi</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/Fengyalv"><img src="https://avatars0.githubusercontent.com/u/11779018?v=4" width="48px;" alt=""/><br /><sub><b>FengYa</b></sub></a><br /></td>
<td align="center"><a href="https://fluxionnetwork.github.io/fluxion/"><img src="https://avatars2.githubusercontent.com/u/17337753?v=4" width="48px;" alt=""/><br /><sub><b>deltax</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/BillKeenan"><img src="https://avatars0.githubusercontent.com/u/1319630?v=4" width="48px;" alt=""/><br /><sub><b>Bill Keenan</b></sub></a><br /></td>
<td align="center"><a href="http://blog.sapara.com"><img src="https://avatars2.githubusercontent.com/u/118081?v=4" width="48px;" alt=""/><br /><sub><b>June S</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/XanthusL"><img src="https://avatars3.githubusercontent.com/u/16461061?v=4" width="48px;" alt=""/><br /><sub><b>liyiheng</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/baustinanki"><img src="https://avatars2.githubusercontent.com/u/9014288?v=4" width="48px;" alt=""/><br /><sub><b>baustinanki</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/lixin9311"><img src="https://avatars0.githubusercontent.com/u/371475?v=4" width="48px;" alt=""/><br /><sub><b>lucus lee</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/mxplusb"><img src="https://avatars1.githubusercontent.com/u/7537841?v=4" width="48px;" alt=""/><br /><sub><b>Mike Lloyd</b></sub></a><br /></td>
<td align="center"><a href="http://rubiojr.rbel.co"><img src="https://avatars3.githubusercontent.com/u/10998?v=4" width="48px;" alt=""/><br /><sub><b>Sergio Rubio</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/FarhadF"><img src="https://avatars3.githubusercontent.com/u/17374492?v=4" width="48px;" alt=""/><br /><sub><b>Farhad Farahi</b></sub></a><br /></td>
<td align="center"><a href="http://lasantha.blogspot.com/"><img src="https://avatars1.githubusercontent.com/u/634604?v=4" width="48px;" alt=""/><br /><sub><b>Lasantha Kularatne</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/dlom"><img src="https://avatars1.githubusercontent.com/u/823331?v=4" width="48px;" alt=""/><br /><sub><b>Mark Old</b></sub></a><br /></td>
<td align="center"><a href="http://flw.tools/"><img src="https://avatars0.githubusercontent.com/u/5546718?v=4" width="48px;" alt=""/><br /><sub><b>flw</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/davebarda"><img src="https://avatars0.githubusercontent.com/u/6024927?v=4" width="48px;" alt=""/><br /><sub><b>David Barda</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/matrinox"><img src="https://avatars2.githubusercontent.com/u/4261980?v=4" width="48px;" alt=""/><br /><sub><b>Geoff Lee</b></sub></a><br /></td>
<td align="center"><a href="http://international.github.io"><img src="https://avatars3.githubusercontent.com/u/1022918?v=4" width="48px;" alt=""/><br /><sub><b>George Opritescu</b></sub></a><br /></td>
<td align="center"><a href="https://twitter.com/Grazfather"><img src="https://avatars3.githubusercontent.com/u/497310?v=4" width="48px;" alt=""/><br /><sub><b>Grazfather</b></sub></a><br /></td>
<td align="center"><a href="http://www.mikecordell.com/"><img src="https://avatars2.githubusercontent.com/u/1691120?v=4" width="48px;" alt=""/><br /><sub><b>Michael Cordell</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="http://patrick.ibexcps.com"><img src="https://avatars2.githubusercontent.com/u/1215497?v=4" width="48px;" alt=""/><br /><sub><b>Patrick José Pereira</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/sherodtaylor"><img src="https://avatars2.githubusercontent.com/u/1483092?v=4" width="48px;" alt=""/><br /><sub><b>sherod taylor</b></sub></a><br /></td>
<td align="center"><a href="http://cogentia.io"><img src="https://avatars2.githubusercontent.com/u/3062663?v=4" width="48px;" alt=""/><br /><sub><b>Andrew Scott</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/lsipii"><img src="https://avatars1.githubusercontent.com/u/12018440?v=4" width="48px;" alt=""/><br /><sub><b>Lassi Piironen</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/BlackWebWolf"><img src="https://avatars0.githubusercontent.com/u/14799210?v=4" width="48px;" alt=""/><br /><sub><b>BlackWebWolf</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/andrewzolotukhin"><img src="https://avatars0.githubusercontent.com/u/1894885?v=4" width="48px;" alt=""/><br /><sub><b>andrewzolotukhin</b></sub></a><br /></td>
<td align="center"><a href="https://retgits.github.io"><img src="https://avatars1.githubusercontent.com/u/8568280?v=4" width="48px;" alt=""/><br /><sub><b>Leon Stigter</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://tamimi.se"><img src="https://avatars3.githubusercontent.com/u/21756?v=4" width="48px;" alt=""/><br /><sub><b>Amr Tamimi</b></sub></a><br /></td>
<td align="center"><a href="https://jagdeep.me"><img src="https://avatars3.githubusercontent.com/u/3717137?v=4" width="48px;" alt=""/><br /><sub><b>Jagdeep Singh</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/darkSasori"><img src="https://avatars0.githubusercontent.com/u/889171?v=4" width="48px;" alt=""/><br /><sub><b>Lineu Felipe</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/kvj"><img src="https://avatars2.githubusercontent.com/u/159124?v=4" width="48px;" alt=""/><br /><sub><b>Konstantin</b></sub></a><br /></td>
<td align="center"><a href="http://www.brendanoleary.com"><img src="https://avatars2.githubusercontent.com/u/6044920?v=4" width="48px;" alt=""/><br /><sub><b>Brendan O'Leary</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/bertl4398"><img src="https://avatars2.githubusercontent.com/u/1226441?v=4" width="48px;" alt=""/><br /><sub><b>bertl4398</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/Ferenc-"><img src="https://avatars2.githubusercontent.com/u/6553695?v=4" width="48px;" alt=""/><br /><sub><b>Ferenc-</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="http://rohanverma.net"><img src="https://avatars1.githubusercontent.com/u/952036?v=4" width="48px;" alt=""/><br /><sub><b>Rohan Verma</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/fimtitzgerald"><img src="https://avatars1.githubusercontent.com/u/19293566?v=4" width="48px;" alt=""/><br /><sub><b>Tim Fitzgerald</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/ruggi"><img src="https://avatars2.githubusercontent.com/u/1081051?v=4" width="48px;" alt=""/><br /><sub><b>Federico Ruggi</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/ctwoodward"><img src="https://avatars2.githubusercontent.com/u/7293328?v=4" width="48px;" alt=""/><br /><sub><b>Craig Woodward</b></sub></a><br /></td>
<td align="center"><a href="https://twitter.com/ReadmeCritic"><img src="https://avatars3.githubusercontent.com/u/15367484?v=4" width="48px;" alt=""/><br /><sub><b>ReadmeCritic</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/jdevelop"><img src="https://avatars0.githubusercontent.com/u/141402?v=4" width="48px;" alt=""/><br /><sub><b>Eugene</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/Trinergy"><img src="https://avatars1.githubusercontent.com/u/12983705?s=460&v=4" width="48px;" alt=""/><br /><sub><b>Kenny Wu</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="http://www.romeroruiz.com"><img src="https://avatars0.githubusercontent.com/u/538234?v=4" width="48px;" alt=""/><br /><sub><b>Renán Romero</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/sticreations"><img src="https://avatars1.githubusercontent.com/u/5031240?v=4" width="48px;" alt=""/><br /><sub><b>Bastian Groß</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/nicholas-eden"><img src="https://avatars1.githubusercontent.com/u/2496835?v=4" width="48px;" alt=""/><br /><sub><b>nicholas-eden</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/danrabinowitz"><img src="https://avatars1.githubusercontent.com/u/279390?v=4" width="48px;" alt=""/><br /><sub><b>Dan Rabinowitz</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/dvdmssmnn"><img src="https://avatars1.githubusercontent.com/u/6897575?v=4" width="48px;" alt=""/><br /><sub><b>David Missmann</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/mweb"><img src="https://avatars2.githubusercontent.com/u/882006?v=4" width="48px;" alt=""/><br /><sub><b>Mathias Weber</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/TheRedSpy15"><img src="https://avatars1.githubusercontent.com/u/32081703?v=4" width="48px;" alt=""/><br /><sub><b>TheRedSpy15</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://www.linkedin.com/in/harald-nordgren-44778192"><img src="https://avatars0.githubusercontent.com/u/9569897?v=4" width="48px;" alt=""/><br /><sub><b>Harald Nordgren</b></sub></a><br /></td>
<td align="center"><a href="http://stormfirefox1.github.io"><img src="https://avatars0.githubusercontent.com/u/11583824?v=4" width="48px;" alt=""/><br /><sub><b>Matei Alexandru Gardus</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/Seanstoppable"><img src="https://avatars2.githubusercontent.com/u/1523955?v=4" width="48px;" alt=""/><br /><sub><b>Sean Smith</b></sub></a><br /></td>
<td align="center"><a href="http://kaskavalci.com"><img src="https://avatars1.githubusercontent.com/u/1646238?v=4" width="48px;" alt=""/><br /><sub><b>Halil Kaskavalci</b></sub></a><br /></td>
<td align="center"><a href="http://www.johandenoyer.fr"><img src="https://avatars2.githubusercontent.com/u/246715?v=4" width="48px;" alt=""/><br /><sub><b>Johan Denoyer</b></sub></a><br /></td>
<td align="center"><a href="https://skymeyer.be"><img src="https://avatars1.githubusercontent.com/u/593516?v=4" width="48px;" alt=""/><br /><sub><b>Jelle Vink</b></sub></a><br /></td>
<td align="center"><a href="http://imdevinc.com"><img src="https://avatars1.githubusercontent.com/u/3997333?v=4" width="48px;" alt=""/><br /><sub><b>Devin Collins</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="http://danne.stayskal.com/"><img src="https://avatars3.githubusercontent.com/u/18333?v=4" width="48px;" alt=""/><br /><sub><b>Danne Stayskal</b></sub></a><br /></td>
<td align="center"><a href="https://www.maxbeizer.com"><img src="https://avatars1.githubusercontent.com/u/2006658?v=4" width="48px;" alt=""/><br /><sub><b>Max Beizer</b></sub></a><br /></td>
<td align="center"><a href="http://tinyurl.com/nwmj4as"><img src="https://avatars1.githubusercontent.com/u/194392?v=4" width="48px;" alt=""/><br /><sub><b>E:V:A</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/GaboFDC"><img src="https://avatars0.githubusercontent.com/u/1425500?v=4" width="48px;" alt=""/><br /><sub><b>Gabriel</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/AndrewScibek"><img src="https://avatars2.githubusercontent.com/u/10111411?v=4" width="48px;" alt=""/><br /><sub><b>Andrew Scibek</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/FriedCosey"><img src="https://avatars0.githubusercontent.com/u/29709822?v=4" width="48px;" alt=""/><br /><sub><b>FriedCosey</b></sub></a><br /></td>
<td align="center"><a href="https://michelegera.dev/"><img src="https://avatars1.githubusercontent.com/u/3891?v=4" width="48px;" alt=""/><br /><sub><b>Michele Gerarduzzi</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/rudolphjacksonm"><img src="https://avatars3.githubusercontent.com/u/13438569?v=4" width="48px;" alt=""/><br /><sub><b>Jack Morris</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/foorb"><img src="https://avatars0.githubusercontent.com/u/14993807?v=4" width="48px;" alt=""/><br /><sub><b>foorb</b></sub></a><br /></td>
<td align="center"><a href="http://researchit.las.iastate.edu"><img src="https://avatars0.githubusercontent.com/u/5819098?v=4" width="48px;" alt=""/><br /><sub><b>Levi Baber</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/gnanderson"><img src="https://avatars0.githubusercontent.com/u/38514?v=4" width="48px;" alt=""/><br /><sub><b>Graham Anderson</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/bosr"><img src="https://avatars2.githubusercontent.com/u/1936828?v=4" width="48px;" alt=""/><br /><sub><b>Romain Bossart</b></sub></a><br /></td>
<td align="center"><a href="http://eonix.ru"><img src="https://avatars0.githubusercontent.com/u/969838?v=4" width="48px;" alt=""/><br /><sub><b>Kirill Motkov</b></sub></a><br /></td>
<td align="center"><a href="http://www.BrianChoromanski.com"><img src="https://avatars1.githubusercontent.com/u/3665694?v=4" width="48px;" alt=""/><br /><sub><b>Brian Choromanski</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="http://siobud.com"><img src="https://avatars0.githubusercontent.com/u/1302304?v=4" width="48px;" alt=""/><br /><sub><b>Sean DuBois</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/gary-kim"><img src="https://avatars1.githubusercontent.com/u/47195730?v=4" width="48px;" alt=""/><br /><sub><b>Gary Kim</b></sub></a><br /></td>
<td align="center"><a href="https://dylanbartels.com"><img src="https://avatars1.githubusercontent.com/u/6660171?v=4" width="48px;" alt=""/><br /><sub><b>Dylan</b></sub></a><br /></td>
<td align="center"><a href="http://liet.me"><img src="https://avatars0.githubusercontent.com/u/1990354?v=4" width="48px;" alt=""/><br /><sub><b>Dmytro Prokhorenkov</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/elliotrushton"><img src="https://avatars1.githubusercontent.com/u/590442?v=4" width="48px;" alt=""/><br /><sub><b>Elliot</b></sub></a><br /></td>
<td align="center"><a href="http://chenrui.dev"><img src="https://avatars3.githubusercontent.com/u/1580956?v=4" width="48px;" alt=""/><br /><sub><b>chenrui</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/sudermanjr"><img src="https://avatars0.githubusercontent.com/u/7624765?v=4" width="48px;" alt=""/><br /><sub><b>Andrew Suderman</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/rwhogg"><img src="https://avatars3.githubusercontent.com/u/2373856?v=4" width="48px;" alt=""/><br /><sub><b>Bob 'Wombat' Hogg</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/hxw"><img src="https://avatars0.githubusercontent.com/u/143462?v=4" width="48px;" alt=""/><br /><sub><b>Christopher Hall</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/hneiva"><img src="https://avatars1.githubusercontent.com/u/3451557?v=4" width="48px;" alt=""/><br /><sub><b>Heitor Neiva</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/herbygillot"><img src="https://avatars3.githubusercontent.com/u/618376?v=4" width="48px;" alt=""/><br /><sub><b>Herby Gillot</b></sub></a><br /></td>
<td align="center"><a href="http://brudil.com"><img src="https://avatars3.githubusercontent.com/u/382352?v=4" width="48px;" alt=""/><br /><sub><b>James Canning</b></sub></a><br /></td>
<td align="center"><a href="https://twitter.com/jeffz4000"><img src="https://avatars1.githubusercontent.com/u/45892?v=4" width="48px;" alt=""/><br /><sub><b>jeffz</b></sub></a><br /></td>
<td align="center"><a href="https://mikkeljuhl.com"><img src="https://avatars0.githubusercontent.com/u/1764035?v=4" width="48px;" alt=""/><br /><sub><b>Mikkel Jeppesen Juhl</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/lesteenman"><img src="https://avatars1.githubusercontent.com/u/963290?v=4" width="48px;" alt=""/><br /><sub><b>Erik</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/nyourchuck"><img src="https://avatars1.githubusercontent.com/u/155574?v=4" width="48px;" alt=""/><br /><sub><b>Nate Yourchuck</b></sub></a><br /></td>
<td align="center"><a href="https://cprimozic.net/"><img src="https://avatars3.githubusercontent.com/u/4335849?v=4" width="48px;" alt=""/><br /><sub><b>Casey Primozic</b></sub></a><br /></td>
<td align="center"><a href="http://pierdelacabeza.com/maruja"><img src="https://avatars3.githubusercontent.com/u/2430915?v=4" width="48px;" alt=""/><br /><sub><b>Alvaro [Andor]</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/Midnight-Conqueror"><img src="https://avatars1.githubusercontent.com/u/17101621?v=4" width="48px;" alt=""/><br /><sub><b>Joel Valentine</b></sub></a><br /></td>
<td align="center"><a href="https://www.viktor-braun.de"><img src="https://avatars0.githubusercontent.com/u/4738210?v=4" width="48px;" alt=""/><br /><sub><b>Viktor Braun</b></sub></a><br /></td>
<td align="center"><a href="https://www.chrisdbrown.co.uk/"><img src="https://avatars3.githubusercontent.com/u/3877652?v=4" width="48px;" alt=""/><br /><sub><b>ChrisDBrown</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://narengowda.github.io/"><img src="https://avatars2.githubusercontent.com/u/582821?v=4" width="48px;" alt=""/><br /><sub><b>Narendra L</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/ibaum"><img src="https://avatars1.githubusercontent.com/u/24609103?v=4" width="48px;" alt=""/><br /><sub><b>ibaum</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/noxer"><img src="https://avatars3.githubusercontent.com/u/566185?v=4" width="48px;" alt=""/><br /><sub><b>Tim Scheuermann</b></sub></a><br /></td>
<td align="center"><a href="https://indradhanush.github.io/"><img src="https://avatars0.githubusercontent.com/u/2682729?v=4" width="48px;" alt=""/><br /><sub><b>Indradhanush Gupta</b></sub></a><br /></td>
<td align="center"><a href="https://victoravelar.com"><img src="https://avatars3.githubusercontent.com/u/7926849?v=4" width="48px;" alt=""/><br /><sub><b>Victor Hugo Avelar Ossorio</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/scw007"><img src="https://avatars3.githubusercontent.com/u/4001640?v=4" width="48px;" alt=""/><br /><sub><b>Steven Whitehead</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/lawrencecraft"><img src="https://avatars0.githubusercontent.com/u/660580?v=4" width="48px;" alt=""/><br /><sub><b>Lawrence Craft</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="http://avi.press"><img src="https://avatars1.githubusercontent.com/u/1388071?v=4" width="48px;" alt=""/><br /><sub><b>Avi Press</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/Tardog"><img src="https://avatars0.githubusercontent.com/u/22562624?v=4" width="48px;" alt=""/><br /><sub><b>Sarah Kraßnigg</b></sub></a><br /></td>
<td align="center"><a href="http://jmks.ca"><img src="https://avatars1.githubusercontent.com/u/4923990?v=4" width="48px;" alt=""/><br /><sub><b>Jason Schweier</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/massa1240"><img src="https://avatars2.githubusercontent.com/u/8268483?v=4" width="48px;" alt=""/><br /><sub><b>Massa</b></sub></a><br /></td>
<td align="center"><a href="http://boot-error.github.io"><img src="https://avatars3.githubusercontent.com/u/8546140?v=4" width="48px;" alt=""/><br /><sub><b>Vighnesh SK</b></sub></a><br /></td>
<td align="center"><a href="http://alexfornuto.com"><img src="https://avatars3.githubusercontent.com/u/2349184?v=4" width="48px;" alt=""/><br /><sub><b>Alex Fornuto</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/stevenwhitehead"><img src="https://avatars0.githubusercontent.com/u/30630257?v=4" width="48px;" alt=""/><br /><sub><b>stevenwhitehead</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/jdenoy-saagie"><img src="https://avatars2.githubusercontent.com/u/55875303?v=4" width="48px;" alt=""/><br /><sub><b>Johan Denoyer</b></sub></a><br /></td>
<td align="center"><a href="https://albertsalim.dev"><img src="https://avatars1.githubusercontent.com/u/4749355?v=4" width="48px;" alt=""/><br /><sub><b>Albert Salim</b></sub></a><br /></td>
<td align="center"><a href="https://Feliciano.Tech"><img src="https://avatars1.githubusercontent.com/u/6017470?v=4" width="48px;" alt=""/><br /><sub><b>Ricardo N Feliciano</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/3mard"><img src="https://avatars3.githubusercontent.com/u/42009880?v=4" width="48px;" alt=""/><br /><sub><b>Omer Davutoglu</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/hemu"><img src="https://avatars0.githubusercontent.com/u/1871299?v=4" width="48px;" alt=""/><br /><sub><b>Hemu</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/Daanikus"><img src="https://avatars0.githubusercontent.com/u/18027087?v=4" width="48px;" alt=""/><br /><sub><b>Dan Bent</b></sub></a><br /></td>
<td align="center"><a href="https://cizer.dev"><img src="https://avatars3.githubusercontent.com/u/20225764?v=4" width="48px;" alt=""/><br /><sub><b>C123R</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/madepolli"><img src="https://avatars1.githubusercontent.com/u/7237000?v=4" width="48px;" alt=""/><br /><sub><b>Matjaž Depolli</b></sub></a><br /></td>
<td align="center"><a href="https://blog.schoentoon.blue"><img src="https://avatars1.githubusercontent.com/u/417618?v=4" width="48px;" alt=""/><br /><sub><b>Toon Schoenmakers</b></sub></a><br /></td>
<td align="center"><a href="http://tdhttt.com"><img src="https://avatars2.githubusercontent.com/u/24703459?v=4" width="48px;" alt=""/><br /><sub><b>TDHTTTT</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/jottr"><img src="https://avatars0.githubusercontent.com/u/2744198?v=4" width="48px;" alt=""/><br /><sub><b>jottr</b></sub></a><br /></td>
<td align="center"><a href="https://www.linkedin.com/in/nikolay-mateev-79187b167/"><img src="https://avatars3.githubusercontent.com/u/15074116?v=4" width="48px;" alt=""/><br /><sub><b>Nikolay Mateev</b></sub></a><br /></td>
<td align="center"><a href="https://charliewang.io"><img src="https://avatars1.githubusercontent.com/u/1320418?v=4" width="48px;" alt=""/><br /><sub><b>Charlie Wang</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/liyiheng"><img src="https://avatars3.githubusercontent.com/u/16461061?v=4" width="48px;" alt=""/><br /><sub><b>liyiheng</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://bjoern.svbtle.com"><img src="https://avatars1.githubusercontent.com/u/1467156?v=4" width="48px;" alt=""/><br /><sub><b>Bjoern Weidlich</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/firecat53"><img src="https://avatars1.githubusercontent.com/u/568113?v=4" width="48px;" alt=""/><br /><sub><b>Scott Hansen</b></sub></a><br /></td>
<td align="center"><a href="https://davidsbond.github.io"><img src="https://avatars3.githubusercontent.com/u/6227720?v=4" width="48px;" alt=""/><br /><sub><b>David Bond</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/yesnault"><img src="https://avatars3.githubusercontent.com/u/395454?v=4" width="48px;" alt=""/><br /><sub><b>Yvonnick Esnault</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/leterio"><img src="https://avatars0.githubusercontent.com/u/15060358?v=4" width="48px;" alt=""/><br /><sub><b>Vinícius Letério</b></sub></a><br /></td>
<td align="center"><a href="https://adriano.fyi"><img src="https://avatars3.githubusercontent.com/u/3331648?v=4" width="48px;" alt=""/><br /><sub><b>Adriano</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/jonhadfield"><img src="https://avatars1.githubusercontent.com/u/843944?v=4" width="48px;" alt=""/><br /><sub><b>Jon Hadfield</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/Tdnshah"><img src="https://avatars2.githubusercontent.com/u/13272752?v=4" width="48px;" alt=""/><br /><sub><b>Tejas Shah</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/mogensen"><img src="https://avatars2.githubusercontent.com/u/592710?v=4" width="48px;" alt=""/><br /><sub><b>Frederik Mogensen</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/rsaarelm"><img src="https://avatars1.githubusercontent.com/u/41840?v=4" width="48px;" alt=""/><br /><sub><b>Risto Saarelma</b></sub></a><br /></td>
<td align="center"><a href="https://sam-github.github.io/"><img src="https://avatars2.githubusercontent.com/u/17607?v=4" width="48px;" alt=""/><br /><sub><b>Sam Roberts</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/gerchardon"><img src="https://avatars0.githubusercontent.com/u/5973160?v=4" width="48px;" alt=""/><br /><sub><b>gerchardon</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/mryanmurphy"><img src="https://avatars2.githubusercontent.com/u/641427?v=4" width="48px;" alt=""/><br /><sub><b>Matt</b></sub></a><br /></td>
<td align="center"><a href="http://devco.net/"><img src="https://avatars0.githubusercontent.com/u/82342?v=4" width="48px;" alt=""/><br /><sub><b>R.I.Pienaar</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/fmotrifork"><img src="https://avatars3.githubusercontent.com/u/18327738?v=4" width="48px;" alt=""/><br /><sub><b>Frederik Mogensen</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/aeter"><img src="https://avatars0.githubusercontent.com/u/238607?v=4" width="48px;" alt=""/><br /><sub><b>aeter</b></sub></a><br /></td>
<td align="center"><a href="http://timhwang21.gitbook.io"><img src="https://avatars3.githubusercontent.com/u/5831434?v=4" width="48px;" alt=""/><br /><sub><b>Tim Hwang</b></sub></a><br /></td>
<td align="center"><a href="http://about.me/yingfan"><img src="https://avatars1.githubusercontent.com/u/10404961?v=4" width="48px;" alt=""/><br /><sub><b>Ying Fan Chong</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/MartinJohns"><img src="https://avatars1.githubusercontent.com/u/5269069?v=4" width="48px;" alt=""/><br /><sub><b>Martin Johns</b></sub></a><br /></td>
<td align="center"><a href="https://www.jvt.me"><img src="https://avatars0.githubusercontent.com/u/3315059?v=4" width="48px;" alt=""/><br /><sub><b>Jamie Tanna</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/trimble"><img src="https://avatars3.githubusercontent.com/u/371317?v=4" width="48px;" alt=""/><br /><sub><b>Todd Trimble</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://www.mitchellhanberg.com"><img src="https://avatars2.githubusercontent.com/u/5523984?v=4" width="48px;" alt=""/><br /><sub><b>Mitchell Hanberg</b></sub></a><br /></td>
<td align="center"><a href="https://franga2000.com"><img src="https://avatars3.githubusercontent.com/u/3891092?v=4" width="48px;" alt=""/><br /><sub><b>Miha Frangež</b></sub></a><br /></td>
<td align="center"><a href="https://blog.sahilister.in/"><img src="https://avatars0.githubusercontent.com/u/52946452?v=4" width="48px;" alt=""/><br /><sub><b>Sahil Dhiman</b></sub></a><br /></td>
<td align="center"><a href="https://pzoo.netlify.app/"><img src="https://avatars2.githubusercontent.com/u/17727004?v=4" width="48px;" alt=""/><br /><sub><b>Pingzhou &#124; 平舟</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/YuviGold"><img src="https://avatars0.githubusercontent.com/u/29873449?v=4" width="48px;" alt=""/><br /><sub><b>Yuval Goldberg</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/dabcoder"><img src="https://avatars3.githubusercontent.com/u/5034531?v=4" width="48px;" alt=""/><br /><sub><b>David Bouchare</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/stone"><img src="https://avatars3.githubusercontent.com/u/29077?v=4" width="48px;" alt=""/><br /><sub><b>Fredrik Steen</b></sub></a><br /></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/zye1996"><img src="https://avatars2.githubusercontent.com/u/28901953?v=4" width="48px;" alt=""/><br /><sub><b>zye1996</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/pgaxatte"><img src="https://avatars.githubusercontent.com/u/30696904?v=4" width="48px;" alt=""/><br /><sub><b>Pierre Gaxatte</b></sub></a><br /></td>
<td align="center"><a href="https://xntrik.wtf"><img src="https://avatars.githubusercontent.com/u/678260?v=4" width="48px;" alt=""/><br /><sub><b>Christian Frichot</b></sub></a><br /></td>
<td align="center"><a href="https://lukas-kaemmerling.de"><img src="https://avatars.githubusercontent.com/u/4281581?v=4" width="48px;" alt=""/><br /><sub><b>Lukas Kämmerling</b></sub></a><br /></td>
<td align="center"><a href="https://inetant.net/"><img src="https://avatars.githubusercontent.com/u/1765366?v=4" width="48px;" alt=""/><br /><sub><b>Antoine Meillet</b></sub></a><br /></td>
<td align="center"><a href="https://www.patreon.com/cclauss"><img src="https://avatars.githubusercontent.com/u/3709715?v=4" width="48px;" alt=""/><br /><sub><b>Christian Clauss</b></sub></a><br /></td>
</tr>
</table>
<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
## Acknowledgments
@ -176,8 +437,7 @@ Dependency management in WTF is handled by [Go modules](https://github.com/golan
The inspiration for `WTF` came from Monica Dinculescu's
[tiny-care-terminal](https://github.com/notwaldorf/tiny-care-terminal).
Many thanks to <a href="https://lendesk.com">Lendesk</a> for supporting this project by
providing time to develop it.
WTF is built atop [tcell](https://github.com/gdamore/tcell) and [tview](https://github.com/rivo/tview), fantastic projects both. WTF is built, packaged, and deployed via [GoReleaser](https://goreleaser.com).
<p align="center">
<img src="./images/dude_wtf.png?raw=true" title="Dude WTF" width="251" height="201" />

View File

@ -18,5 +18,4 @@ wtf:
left: 0
height: 2
width: 2
refreshInterval: 30
updateInterval: 15
refreshInterval: 30

View File

@ -0,0 +1,21 @@
wtf:
mods:
battery:
type: power
title: "⚡️"
enabled: true
position:
top: 0
left: 0
height: 1
width: 1
refreshInterval: 15
security_info:
type: security
enabled: true
position:
top: 0
left: 1
height: 1
width: 1
refreshInterval: 3600

View File

@ -61,7 +61,7 @@ wtf:
UTC: "Etc/UTC"
Vancouver: "America/Vancouver"
New_York: "America/New_York"
Sao_Paolo: "America/Sao_Paulo"
Sao_Paulo: "America/Sao_Paulo"
Denver: "America/Denver"
Iqaluit: "America/Iqaluit"
Bahamas: "America/Nassau"
@ -98,7 +98,7 @@ wtf:
left: 0
height: 2
width: 1
refreshInterval: 3600
refreshInterval: 3600
ip:
type: ipinfo
title: "My IP"
@ -177,4 +177,4 @@ wtf:
left: 1
height: 1
width: 3
refreshInterval: 3600
refreshInterval: 3600

View File

@ -0,0 +1,17 @@
wtf:
grid:
columns: [20, 20]
rows: [3, 3]
refreshInterval: 1
mods:
uptime:
type: cmdrunner
args: [""]
cmd: "uptime"
enabled: true
position:
top: 0
left: 0
height: 1
width: 1
refreshInterval: 30

71
app/app_manager.go Normal file
View File

@ -0,0 +1,71 @@
package app
import (
"errors"
"github.com/olebedev/config"
"github.com/rivo/tview"
)
// WtfAppManager handles the instances of WtfApp, ensuring that they're displayed as requested
type WtfAppManager struct {
WtfApps []*WtfApp
selected int
}
// NewAppManager creates and returns an instance of AppManager
func NewAppManager() WtfAppManager {
appMan := WtfAppManager{
WtfApps: []*WtfApp{},
}
return appMan
}
// MakeNewWtfApp creates and starts a new instance of WtfApp from a set of configuration params
func (appMan *WtfAppManager) MakeNewWtfApp(config *config.Config, configFilePath string) {
wtfApp := NewWtfApp(tview.NewApplication(), config, configFilePath)
appMan.Add(wtfApp)
wtfApp.Start()
}
// Add adds a WtfApp to the collection of apps that the AppManager manages.
// This app is then available for display onscreen.
func (appMan *WtfAppManager) Add(wtfApp *WtfApp) {
appMan.WtfApps = append(appMan.WtfApps, wtfApp)
}
// Current returns the currently-displaying instance of WtfApp
func (appMan *WtfAppManager) Current() (*WtfApp, error) {
if appMan.selected < 0 || appMan.selected >= len(appMan.WtfApps) {
return nil, errors.New("invalid app index selected")
}
return appMan.WtfApps[appMan.selected], nil
}
// Next cycles the WtfApps forward by one, making the next one in the list
// the current one. If there are none after the current one, it wraps around.
func (appMan *WtfAppManager) Next() (*WtfApp, error) {
appMan.selected++
if appMan.selected >= len(appMan.WtfApps) {
appMan.selected = 0
}
return appMan.Current()
}
// Prev cycles the WtfApps backwards by one, making the previous one in the
// list the current one. If there are none before the current one, it wraps around.
func (appMan *WtfAppManager) Prev() (*WtfApp, error) {
appMan.selected--
if appMan.selected < 0 {
appMan.selected = len(appMan.WtfApps) - 1
}
return appMan.Current()
}

View File

@ -20,8 +20,14 @@ func NewDisplay(widgets []wtf.Wtfable, config *config.Config) *Display {
config: config,
}
firstWidget := widgets[0]
display.Grid.SetBackgroundColor(
wtf.ColorFor(
firstWidget.CommonSettings().Colors.WidgetTheme.Background,
),
)
display.build(widgets)
display.Grid.SetBackgroundColor(wtf.ColorFor(config.UString("wtf.colors.background", "black")))
return &display
}

View File

@ -1,19 +0,0 @@
package app
// This file contains the error messages that get written to the terminal when
// something goes wrong with the configuration process.
//
// As a general rule, if one of these has to be shown the app should then die
// via os.Exit(1)
import (
"fmt"
"github.com/logrusorgru/aurora"
)
/* -------------------- Unexported Functions -------------------- */
func displayError(err error) {
fmt.Printf("%s %s\n\n", aurora.Red("Error:"), err.Error())
}

104
app/exit_message.go Normal file
View File

@ -0,0 +1,104 @@
package app
import (
"fmt"
"os"
"strings"
"github.com/logrusorgru/aurora"
"github.com/olebedev/config"
)
const exitMessageHeader = `
____ __ ____ .___________. _______
\ \ / \ / / | || ____|
\ \/ \/ / ----| |-----| |__
\ / | | | __|
\ /\ / | | | |
\__/ \__/ |__| |__|
the personal information dashboard for your terminal
`
// DisplayExitMessage displays the onscreen exit message when the app quits
func (wtfApp *WtfApp) DisplayExitMessage() {
exitMessageIsDisplayable := readDisplayableConfig(wtfApp.config)
wtfApp.displayExitMsg(exitMessageIsDisplayable)
}
/* -------------------- Unexported Functions -------------------- */
func (wtfApp *WtfApp) displayExitMsg(exitMessageIsDisplayable bool) string {
// If a sponsor or contributor and opt out of seeing the exit message, do not display it
if (wtfApp.ghUser.IsContributor || wtfApp.ghUser.IsSponsor) && !exitMessageIsDisplayable {
return ""
}
msgs := []string{}
msgs = append(msgs, aurora.Magenta(exitMessageHeader).String())
if wtfApp.ghUser.IsContributor {
msgs = append(msgs, wtfApp.contributorThankYouMessage())
}
if wtfApp.ghUser.IsSponsor {
msgs = append(msgs, wtfApp.sponsorThankYouMessage())
}
if !wtfApp.ghUser.IsContributor && !wtfApp.ghUser.IsSponsor {
msgs = append(msgs, wtfApp.supportRequestMessage())
}
displayMsg := strings.Join(msgs, "\n")
fmt.Println(displayMsg)
return displayMsg
}
// readDisplayableConfig figures out whether or not the exit message should be displayed
// per the user's wishes. It allows contributors and sponsors to opt out of the exit message
func readDisplayableConfig(cfg *config.Config) bool {
displayExitMsg := cfg.UBool("wtf.exitMessage.display", true)
return displayExitMsg
}
// readGitHubAPIKey attempts to find a GitHub API key somewhere in the configuration file
func readGitHubAPIKey(cfg *config.Config) string {
apiKey := cfg.UString("wtf.exitMessage.githubAPIKey", os.Getenv("WTF_GITHUB_TOKEN"))
if apiKey != "" {
return apiKey
}
moduleConfig, err := cfg.Get("wtf.mods.github")
if err != nil {
return ""
}
return moduleConfig.UString("apiKey", "")
}
/* -------------------- Messaging -------------------- */
func (wtfApp *WtfApp) contributorThankYouMessage() string {
str := " On behalf of all the users of WTF, thank you for contributing to the source code."
str += fmt.Sprintf(" %s", aurora.Green("\n\n You rock."))
return str
}
func (wtfApp *WtfApp) sponsorThankYouMessage() string {
str := " Your sponsorship of WTF makes a difference. Thank you for sponsoring and supporting WTF."
str += fmt.Sprintf(" %s", aurora.Green("\n\n You're awesome."))
return str
}
func (wtfApp *WtfApp) supportRequestMessage() string {
str := " The development and maintenance of WTF is supported by sponsorships.\n"
str += fmt.Sprintf(" Please consider sponsoring WTF at %s\n", aurora.Green("https://github.com/sponsors/senorprogrammer"))
return str
}

71
app/exit_message_test.go Normal file
View File

@ -0,0 +1,71 @@
package app
import (
"strings"
"testing"
"github.com/wtfutil/wtf/support"
"gotest.tools/assert"
)
func Test_displayExitMessage(t *testing.T) {
tests := []struct {
name string
isDisplayable bool
isContributor bool
isSponsor bool
compareWith string
expected string
}{
{
name: "when not displayable",
isDisplayable: false,
isContributor: true,
isSponsor: true,
compareWith: "equals",
expected: "",
},
{
name: "when contributor",
isDisplayable: true,
isContributor: true,
compareWith: "contains",
expected: "thank you for contributing",
},
{
name: "when sponsor",
isDisplayable: true,
isSponsor: true,
compareWith: "contains",
expected: "Thank you for sponsoring",
},
{
name: "when user",
isDisplayable: true,
isContributor: false,
isSponsor: false,
compareWith: "contains",
expected: "supported by sponsorships",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
wtfApp := WtfApp{}
wtfApp.ghUser = &support.GitHubUser{
IsContributor: tt.isContributor,
IsSponsor: tt.isSponsor,
}
actual := wtfApp.displayExitMsg(tt.isDisplayable)
if tt.compareWith == "equals" {
assert.Equal(t, actual, tt.expected)
}
if tt.compareWith == "contains" {
assert.Equal(t, true, strings.Contains(actual, tt.expected))
}
})
}
}

View File

@ -1,6 +1,7 @@
package app
import (
"fmt"
"sort"
"github.com/olebedev/config"
@ -8,6 +9,7 @@ import (
"github.com/wtfutil/wtf/wtf"
)
// FocusState is a custom type that differentiates focusable scopes
type FocusState int
const (
@ -19,17 +21,18 @@ const (
// FocusTracker is used by the app to track which onscreen widget currently has focus,
// and to move focus between widgets.
type FocusTracker struct {
App *tview.Application
Idx int
IsFocused bool
Widgets []wtf.Wtfable
config *config.Config
config *config.Config
tviewApp *tview.Application
}
func NewFocusTracker(app *tview.Application, widgets []wtf.Wtfable, config *config.Config) FocusTracker {
// NewFocusTracker creates and returns an instance of FocusTracker
func NewFocusTracker(tviewApp *tview.Application, widgets []wtf.Wtfable, config *config.Config) FocusTracker {
focusTracker := FocusTracker{
App: app,
tviewApp: tviewApp,
Idx: -1,
IsFocused: false,
Widgets: widgets,
@ -44,6 +47,7 @@ func NewFocusTracker(app *tview.Application, widgets []wtf.Wtfable, config *conf
/* -------------------- Exported Functions -------------------- */
// FocusOn puts the focus on the item that belongs to the focus character passed in
func (tracker *FocusTracker) FocusOn(char string) bool {
if !tracker.useNavShortcuts() {
return false
@ -107,6 +111,7 @@ func (tracker *FocusTracker) Prev() {
tracker.IsFocused = true
}
// Refocus forces the focus back to the currently-selected item
func (tracker *FocusTracker) Refocus() {
tracker.focus(tracker.Idx)
}
@ -115,6 +120,7 @@ func (tracker *FocusTracker) Refocus() {
// AssignHotKeys assigns an alphabetic keyboard character to each focusable
// widget so that the widget can be brought into focus by pressing that keyboard key
// Valid numbers are between 1 and 9, inclusive
func (tracker *FocusTracker) assignHotKeys() {
if !tracker.useNavShortcuts() {
return
@ -122,30 +128,37 @@ func (tracker *FocusTracker) assignHotKeys() {
usedKeys := make(map[string]bool)
focusables := tracker.focusables()
i := 1
// First, block out the explicitly-defined characters so they can't be automatically
// assigned to other modules
for _, focusable := range focusables {
if focusable.FocusChar() != "" {
usedKeys[focusable.FocusChar()] = true
}
}
focusNum := 1
// Range over all the modules and assign focus characters to any that are focusable
// and don't have explicitly-defined focus characters
for _, focusable := range focusables {
if focusable.FocusChar() != "" {
continue
}
if _, foundKey := usedKeys[string('0'+i)]; foundKey {
for ; foundKey; _, foundKey = usedKeys[string('0'+i)] {
i++
if _, foundKey := usedKeys[fmt.Sprint(focusNum)]; foundKey {
for ; foundKey; _, foundKey = usedKeys[fmt.Sprint(focusNum)] {
focusNum++
}
}
// Don't have nav characters > "9"
if i >= 10 {
// Don't allow focus characters > "9"
if focusNum >= 10 {
break
}
focusable.SetFocusChar(string('0' + i))
i++
focusable.SetFocusChar(fmt.Sprint(focusNum))
focusNum++
}
}
@ -158,7 +171,11 @@ func (tracker *FocusTracker) blur(idx int) {
view := widget.TextView()
view.Blur()
view.SetBorderColor(wtf.ColorFor(widget.BorderColor()))
view.SetBorderColor(
wtf.ColorFor(
widget.BorderColor(),
),
)
tracker.IsFocused = false
}
@ -178,8 +195,12 @@ func (tracker *FocusTracker) focus(idx int) {
}
view := widget.TextView()
view.SetBorderColor(wtf.ColorFor(tracker.config.UString("wtf.colors.border.focused", "gray")))
tracker.App.SetFocus(view)
view.SetBorderColor(
wtf.ColorFor(
widget.CommonSettings().Colors.BorderTheme.Focused,
),
)
tracker.tviewApp.SetFocus(view)
}
func (tracker *FocusTracker) focusables() []wtf.Wtfable {
@ -192,7 +213,7 @@ func (tracker *FocusTracker) focusables() []wtf.Wtfable {
}
// Sort for deterministic ordering
sort.SliceStable(focusable[:], func(i, j int) bool {
sort.SliceStable(focusable, func(i, j int) bool {
iTop := focusable[i].CommonSettings().Top
jTop := focusable[j].CommonSettings().Top
@ -222,7 +243,7 @@ func (tracker *FocusTracker) focusState() FocusState {
}
for _, widget := range tracker.Widgets {
if widget.TextView() == tracker.App.GetFocus() {
if widget.TextView() == tracker.tviewApp.GetFocus() {
return widgetFocused
}
}

View File

@ -5,55 +5,77 @@ import (
"os"
"github.com/logrusorgru/aurora"
"github.com/wtfutil/wtf/cfg"
"github.com/wtfutil/wtf/wtf"
)
// ModuleValidator is responsible for validating the state of a module's configuration
type ModuleValidator struct{}
type widgetError struct {
name string
validationErrors []cfg.Validatable
}
// NewModuleValidator creates and returns an instance of ModuleValidator
func NewModuleValidator() *ModuleValidator {
val := &ModuleValidator{}
return val
return &ModuleValidator{}
}
// Validate rolls through all the enabled widgets and looks for configuration errors.
// If it finds any it stringifies them, writes them to the console, and kills the app gracefully
func (val *ModuleValidator) Validate(widgets []wtf.Wtfable) {
var errStr string
hasErrors := false
validationErrors := validate(widgets)
for _, widget := range widgets {
var widgetErrStr string
for _, val := range widget.CommonSettings().Validations() {
if val.HasError() {
hasErrors = true
widgetErrStr += fmt.Sprintf(" - %s\t%s %v\n", val, aurora.Red("Error:"), val.Error())
if len(validationErrors) > 0 {
fmt.Println()
for _, error := range validationErrors {
for _, message := range error.errorMessages() {
fmt.Println(message)
}
}
if widgetErrStr != "" {
errStr += fmt.Sprintf(
"%s\n",
fmt.Sprintf(
"%s in %s configuration",
aurora.Red("Errors"),
aurora.Yellow(
fmt.Sprintf(
"%s.position",
widget.Name(),
),
),
),
)
errStr += widgetErrStr + "\n"
}
}
if hasErrors {
fmt.Println()
fmt.Printf(errStr)
os.Exit(1)
}
}
func validate(widgets []wtf.Wtfable) (widgetErrors []widgetError) {
for _, widget := range widgets {
error := widgetError{name: widget.Name()}
for _, val := range widget.CommonSettings().Validations() {
if val.HasError() {
error.validationErrors = append(error.validationErrors, val)
}
}
if len(error.validationErrors) > 0 {
widgetErrors = append(widgetErrors, error)
}
}
return widgetErrors
}
func (err widgetError) errorMessages() (messages []string) {
widgetMessage := fmt.Sprintf(
"%s in %s configuration",
aurora.Red("Errors"),
aurora.Yellow(
fmt.Sprintf(
"%s.position",
err.name,
),
),
)
messages = append(messages, widgetMessage)
for _, e := range err.validationErrors {
configMessage := fmt.Sprintf(" - %s\t%s %v", e.String(), aurora.Red("Error:"), e.Error())
messages = append(messages, configMessage)
}
return messages
}

View File

@ -0,0 +1,102 @@
package app
import (
"fmt"
"testing"
"github.com/logrusorgru/aurora"
"github.com/olebedev/config"
"github.com/stretchr/testify/assert"
"github.com/wtfutil/wtf/wtf"
)
const (
valid = `
wtf:
mods:
clocks:
enabled: true
position:
top: 0
left: 0
height: 1
width: 1
refreshInterval: 30`
invalid = `
wtf:
mods:
clocks:
enabled: true
position:
top: abc
left: 0
height: 1
width: 1
refreshInterval: 30`
)
func Test_NewModuleValidator(t *testing.T) {
assert.IsType(t, &ModuleValidator{}, NewModuleValidator())
}
func Test_validate(t *testing.T) {
tests := []struct {
name string
moduleName string
config *config.Config
expected []string
}{
{
name: "valid config",
moduleName: "clocks",
config: func() *config.Config {
cfg, _ := config.ParseYaml(valid)
return cfg
}(),
expected: []string{},
},
{
name: "invalid config",
moduleName: "clocks",
config: func() *config.Config {
cfg, _ := config.ParseYaml(invalid)
return cfg
}(),
expected: []string{
fmt.Sprintf("%s in %s configuration", aurora.Red("Errors"), aurora.Yellow("clocks.position")),
fmt.Sprintf(
" - Invalid value for %s: 0 %s strconv.ParseInt: parsing \"abc\": invalid syntax",
aurora.Yellow("top"),
aurora.Red("Error:"),
),
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
widget := MakeWidget(nil, nil, tt.moduleName, tt.config)
if widget == nil {
t.Logf("Failed to create widget %s", tt.moduleName)
t.FailNow()
}
errs := validate([]wtf.Wtfable{widget})
if len(tt.expected) == 0 {
assert.Empty(t, errs)
} else {
assert.NotEmpty(t, errs)
var actual []string
for _, err := range errs {
actual = append(actual, err.errorMessages()...)
}
assert.Equal(t, tt.expected, actual)
}
})
}
}

View File

@ -29,7 +29,7 @@ func Schedule(widget wtf.Wtfable) {
return
}
case quit := <-widget.QuitChan():
if quit == true {
if quit {
timer.Stop()
return
}

View File

@ -3,30 +3,47 @@ package app
import (
"github.com/olebedev/config"
"github.com/rivo/tview"
"github.com/wtfutil/wtf/modules/asana"
"github.com/wtfutil/wtf/modules/azuredevops"
"github.com/wtfutil/wtf/modules/bamboohr"
"github.com/wtfutil/wtf/modules/bargraph"
"github.com/wtfutil/wtf/modules/buildkite"
cdsfavorites "github.com/wtfutil/wtf/modules/cds/favorites"
cdsqueue "github.com/wtfutil/wtf/modules/cds/queue"
cdsstatus "github.com/wtfutil/wtf/modules/cds/status"
"github.com/wtfutil/wtf/modules/circleci"
"github.com/wtfutil/wtf/modules/clocks"
"github.com/wtfutil/wtf/modules/cmdrunner"
"github.com/wtfutil/wtf/modules/covid"
"github.com/wtfutil/wtf/modules/cryptoexchanges/bittrex"
"github.com/wtfutil/wtf/modules/cryptoexchanges/blockfolio"
"github.com/wtfutil/wtf/modules/cryptoexchanges/cryptolive"
"github.com/wtfutil/wtf/modules/datadog"
"github.com/wtfutil/wtf/modules/devto"
"github.com/wtfutil/wtf/modules/digitalclock"
"github.com/wtfutil/wtf/modules/digitalocean"
"github.com/wtfutil/wtf/modules/docker"
"github.com/wtfutil/wtf/modules/exchangerates"
"github.com/wtfutil/wtf/modules/feedreader"
"github.com/wtfutil/wtf/modules/football"
"github.com/wtfutil/wtf/modules/gcal"
"github.com/wtfutil/wtf/modules/gerrit"
"github.com/wtfutil/wtf/modules/git"
"github.com/wtfutil/wtf/modules/github"
"github.com/wtfutil/wtf/modules/gitlab"
"github.com/wtfutil/wtf/modules/gitlabtodo"
"github.com/wtfutil/wtf/modules/gitter"
"github.com/wtfutil/wtf/modules/googleanalytics"
"github.com/wtfutil/wtf/modules/grafana"
"github.com/wtfutil/wtf/modules/gspreadsheets"
"github.com/wtfutil/wtf/modules/hackernews"
"github.com/wtfutil/wtf/modules/healthchecks"
"github.com/wtfutil/wtf/modules/hibp"
"github.com/wtfutil/wtf/modules/ipaddresses/ipapi"
"github.com/wtfutil/wtf/modules/ipaddresses/ipinfo"
"github.com/wtfutil/wtf/modules/jenkins"
"github.com/wtfutil/wtf/modules/jira"
"github.com/wtfutil/wtf/modules/krisinformation"
"github.com/wtfutil/wtf/modules/kubernetes"
"github.com/wtfutil/wtf/modules/logger"
"github.com/wtfutil/wtf/modules/mercurial"
@ -34,22 +51,31 @@ import (
"github.com/wtfutil/wtf/modules/newrelic"
"github.com/wtfutil/wtf/modules/opsgenie"
"github.com/wtfutil/wtf/modules/pagerduty"
"github.com/wtfutil/wtf/modules/pihole"
"github.com/wtfutil/wtf/modules/pocket"
"github.com/wtfutil/wtf/modules/power"
"github.com/wtfutil/wtf/modules/resourceusage"
"github.com/wtfutil/wtf/modules/rollbar"
"github.com/wtfutil/wtf/modules/security"
"github.com/wtfutil/wtf/modules/spacex"
"github.com/wtfutil/wtf/modules/spotify"
"github.com/wtfutil/wtf/modules/spotifyweb"
"github.com/wtfutil/wtf/modules/status"
"github.com/wtfutil/wtf/modules/stocks/finnhub"
"github.com/wtfutil/wtf/modules/stocks/yfinance"
"github.com/wtfutil/wtf/modules/subreddit"
"github.com/wtfutil/wtf/modules/textfile"
"github.com/wtfutil/wtf/modules/todo"
"github.com/wtfutil/wtf/modules/todoist"
"github.com/wtfutil/wtf/modules/todo_plus"
"github.com/wtfutil/wtf/modules/transmission"
"github.com/wtfutil/wtf/modules/travisci"
"github.com/wtfutil/wtf/modules/trello"
"github.com/wtfutil/wtf/modules/twitch"
"github.com/wtfutil/wtf/modules/twitter"
"github.com/wtfutil/wtf/modules/twitterstats"
"github.com/wtfutil/wtf/modules/unknown"
"github.com/wtfutil/wtf/modules/uptimerobot"
"github.com/wtfutil/wtf/modules/victorops"
"github.com/wtfutil/wtf/modules/weatherservices/arpansagovau"
"github.com/wtfutil/wtf/modules/weatherservices/prettyweather"
"github.com/wtfutil/wtf/modules/weatherservices/weather"
"github.com/wtfutil/wtf/modules/zendesk"
@ -58,7 +84,7 @@ import (
// MakeWidget creates and returns instances of widgets
func MakeWidget(
app *tview.Application,
tviewApp *tview.Application,
pages *tview.Pages,
moduleName string,
config *config.Config,
@ -66,176 +92,266 @@ func MakeWidget(
var widget wtf.Wtfable
moduleConfig, _ := config.Get("wtf.mods." + moduleName)
// Don' try to initialize modules that don't exist
if moduleConfig == nil {
return nil
}
// Don't try to initialize modules that aren't enabled
if enabled := moduleConfig.UBool("enabled", false); !enabled {
// Don't initialize modules that aren't enabled
return nil
}
// Always in alphabetical order
switch moduleConfig.UString("type", moduleName) {
case "arpansagovau":
settings := arpansagovau.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = arpansagovau.NewWidget(tviewApp, settings)
case "asana":
settings := asana.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = asana.NewWidget(tviewApp, pages, settings)
case "azuredevops":
settings := azuredevops.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = azuredevops.NewWidget(tviewApp, pages, settings)
case "bamboohr":
settings := bamboohr.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = bamboohr.NewWidget(app, settings)
widget = bamboohr.NewWidget(tviewApp, settings)
case "bargraph":
settings := bargraph.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = bargraph.NewWidget(app, settings)
widget = bargraph.NewWidget(tviewApp, settings)
case "bittrex":
settings := bittrex.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = bittrex.NewWidget(app, settings)
widget = bittrex.NewWidget(tviewApp, settings)
case "blockfolio":
settings := blockfolio.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = blockfolio.NewWidget(app, settings)
widget = blockfolio.NewWidget(tviewApp, settings)
case "buildkite":
settings := buildkite.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = buildkite.NewWidget(tviewApp, pages, settings)
case "cdsFavorites":
settings := cdsfavorites.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = cdsfavorites.NewWidget(tviewApp, pages, settings)
case "cdsQueue":
settings := cdsqueue.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = cdsqueue.NewWidget(tviewApp, pages, settings)
case "cdsStatus":
settings := cdsstatus.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = cdsstatus.NewWidget(tviewApp, pages, settings)
case "circleci":
settings := circleci.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = circleci.NewWidget(app, settings)
widget = circleci.NewWidget(tviewApp, settings)
case "clocks":
settings := clocks.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = clocks.NewWidget(app, settings)
widget = clocks.NewWidget(tviewApp, settings)
case "covid":
settings := covid.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = covid.NewWidget(tviewApp, settings)
case "cmdrunner":
settings := cmdrunner.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = cmdrunner.NewWidget(app, settings)
widget = cmdrunner.NewWidget(tviewApp, settings)
case "cryptolive":
settings := cryptolive.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = cryptolive.NewWidget(app, settings)
widget = cryptolive.NewWidget(tviewApp, settings)
case "datadog":
settings := datadog.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = datadog.NewWidget(app, pages, settings)
widget = datadog.NewWidget(tviewApp, pages, settings)
case "devto":
settings := devto.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = devto.NewWidget(tviewApp, pages, settings)
case "digitalclock":
settings := digitalclock.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = digitalclock.NewWidget(tviewApp, settings)
case "digitalocean":
settings := digitalocean.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = digitalocean.NewWidget(tviewApp, pages, settings)
case "docker":
settings := docker.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = docker.NewWidget(tviewApp, pages, settings)
case "feedreader":
settings := feedreader.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = feedreader.NewWidget(app, pages, settings)
widget = feedreader.NewWidget(tviewApp, pages, settings)
case "football":
settings := football.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = football.NewWidget(tviewApp, pages, settings)
case "gcal":
settings := gcal.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = gcal.NewWidget(app, settings)
widget = gcal.NewWidget(tviewApp, settings)
case "gerrit":
settings := gerrit.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = gerrit.NewWidget(app, pages, settings)
widget = gerrit.NewWidget(tviewApp, pages, settings)
case "git":
settings := git.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = git.NewWidget(app, pages, settings)
widget = git.NewWidget(tviewApp, pages, settings)
case "github":
settings := github.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = github.NewWidget(app, pages, settings)
widget = github.NewWidget(tviewApp, pages, settings)
case "gitlab":
settings := gitlab.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = gitlab.NewWidget(app, pages, settings)
widget = gitlab.NewWidget(tviewApp, pages, settings)
case "gitlabtodo":
settings := gitlabtodo.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = gitlabtodo.NewWidget(tviewApp, pages, settings)
case "gitter":
settings := gitter.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = gitter.NewWidget(app, pages, settings)
widget = gitter.NewWidget(tviewApp, pages, settings)
case "googleanalytics":
settings := googleanalytics.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = googleanalytics.NewWidget(app, settings)
widget = googleanalytics.NewWidget(tviewApp, settings)
case "gspreadsheets":
settings := gspreadsheets.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = gspreadsheets.NewWidget(app, settings)
widget = gspreadsheets.NewWidget(tviewApp, settings)
case "grafana":
settings := grafana.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = grafana.NewWidget(tviewApp, pages, settings)
case "hackernews":
settings := hackernews.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = hackernews.NewWidget(app, pages, settings)
widget = hackernews.NewWidget(tviewApp, pages, settings)
case "healthchecks":
settings := healthchecks.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = healthchecks.NewWidget(tviewApp, pages, settings)
case "hibp":
settings := hibp.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = hibp.NewWidget(app, settings)
widget = hibp.NewWidget(tviewApp, settings)
case "ipapi":
settings := ipapi.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = ipapi.NewWidget(app, settings)
widget = ipapi.NewWidget(tviewApp, settings)
case "ipinfo":
settings := ipinfo.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = ipinfo.NewWidget(app, settings)
widget = ipinfo.NewWidget(tviewApp, settings)
case "jenkins":
settings := jenkins.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = jenkins.NewWidget(app, pages, settings)
widget = jenkins.NewWidget(tviewApp, pages, settings)
case "jira":
settings := jira.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = jira.NewWidget(app, pages, settings)
widget = jira.NewWidget(tviewApp, pages, settings)
case "kubernetes":
settings := kubernetes.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = kubernetes.NewWidget(app, settings)
widget = kubernetes.NewWidget(tviewApp, settings)
case "krisinformation":
settings := krisinformation.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = krisinformation.NewWidget(tviewApp, settings)
case "logger":
settings := logger.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = logger.NewWidget(app, settings)
widget = logger.NewWidget(tviewApp, settings)
case "mercurial":
settings := mercurial.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = mercurial.NewWidget(app, pages, settings)
widget = mercurial.NewWidget(tviewApp, pages, settings)
case "nbascore":
settings := nbascore.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = nbascore.NewWidget(app, pages, settings)
widget = nbascore.NewWidget(tviewApp, pages, settings)
case "newrelic":
settings := newrelic.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = newrelic.NewWidget(app, settings)
widget = newrelic.NewWidget(tviewApp, pages, settings)
case "opsgenie":
settings := opsgenie.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = opsgenie.NewWidget(app, settings)
widget = opsgenie.NewWidget(tviewApp, settings)
case "pagerduty":
settings := pagerduty.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = pagerduty.NewWidget(app, settings)
widget = pagerduty.NewWidget(tviewApp, settings)
case "pihole":
settings := pihole.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = pihole.NewWidget(tviewApp, pages, settings)
case "power":
settings := power.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = power.NewWidget(app, settings)
widget = power.NewWidget(tviewApp, settings)
case "prettyweather":
settings := prettyweather.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = prettyweather.NewWidget(app, settings)
widget = prettyweather.NewWidget(tviewApp, settings)
case "pocket":
settings := pocket.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = pocket.NewWidget(tviewApp, pages, settings)
case "resourceusage":
settings := resourceusage.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = resourceusage.NewWidget(app, settings)
widget = resourceusage.NewWidget(tviewApp, settings)
case "rollbar":
settings := rollbar.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = rollbar.NewWidget(app, pages, settings)
widget = rollbar.NewWidget(tviewApp, pages, settings)
case "security":
settings := security.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = security.NewWidget(app, settings)
widget = security.NewWidget(tviewApp, settings)
case "spacex":
settings := spacex.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = spacex.NewWidget(tviewApp, settings)
case "spotify":
settings := spotify.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = spotify.NewWidget(app, pages, settings)
widget = spotify.NewWidget(tviewApp, pages, settings)
case "spotifyweb":
settings := spotifyweb.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = spotifyweb.NewWidget(app, pages, settings)
widget = spotifyweb.NewWidget(tviewApp, pages, settings)
case "status":
settings := status.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = status.NewWidget(app, settings)
widget = status.NewWidget(tviewApp, settings)
case "subreddit":
settings := subreddit.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = subreddit.NewWidget(tviewApp, pages, settings)
case "textfile":
settings := textfile.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = textfile.NewWidget(app, pages, settings)
widget = textfile.NewWidget(tviewApp, pages, settings)
case "todo":
settings := todo.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = todo.NewWidget(app, pages, settings)
widget = todo.NewWidget(tviewApp, pages, settings)
case "todo_plus":
settings := todo_plus.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = todo_plus.NewWidget(tviewApp, pages, settings)
case "todoist":
settings := todoist.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = todoist.NewWidget(app, pages, settings)
settings := todo_plus.FromTodoist(moduleName, moduleConfig, config)
widget = todo_plus.NewWidget(tviewApp, pages, settings)
case "transmission":
settings := transmission.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = transmission.NewWidget(app, pages, settings)
widget = transmission.NewWidget(tviewApp, pages, settings)
case "travisci":
settings := travisci.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = travisci.NewWidget(app, pages, settings)
widget = travisci.NewWidget(tviewApp, pages, settings)
case "trello":
settings := trello.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = trello.NewWidget(app, settings)
settings := todo_plus.FromTrello(moduleName, moduleConfig, config)
widget = todo_plus.NewWidget(tviewApp, pages, settings)
case "twitch":
settings := twitch.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = twitch.NewWidget(tviewApp, pages, settings)
case "twitter":
settings := twitter.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = twitter.NewWidget(app, pages, settings)
widget = twitter.NewWidget(tviewApp, pages, settings)
case "twitterstats":
settings := twitterstats.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = twitterstats.NewWidget(tviewApp, pages, settings)
case "uptimerobot":
settings := uptimerobot.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = uptimerobot.NewWidget(tviewApp, pages, settings)
case "victorops":
settings := victorops.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = victorops.NewWidget(app, settings)
widget = victorops.NewWidget(tviewApp, settings)
case "weather":
settings := weather.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = weather.NewWidget(app, pages, settings)
widget = weather.NewWidget(tviewApp, pages, settings)
case "zendesk":
settings := zendesk.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = zendesk.NewWidget(app, pages, settings)
widget = zendesk.NewWidget(tviewApp, pages, settings)
case "exchangerates":
settings := exchangerates.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = exchangerates.NewWidget(tviewApp, pages, settings)
case "finnhub":
settings := finnhub.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = finnhub.NewWidget(tviewApp, settings)
case "yfinance":
settings := yfinance.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = yfinance.NewWidget(tviewApp, settings)
default:
settings := unknown.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = unknown.NewWidget(app, settings)
widget = unknown.NewWidget(tviewApp, settings)
}
return widget
}
// MakeWidgets creates and returns a collection of enabled widgets
func MakeWidgets(app *tview.Application, pages *tview.Pages, config *config.Config) []wtf.Wtfable {
func MakeWidgets(tviewApp *tview.Application, pages *tview.Pages, config *config.Config) []wtf.Wtfable {
widgets := []wtf.Wtfable{}
moduleNames, _ := config.Map("wtf.mods")
for moduleName := range moduleNames {
widget := MakeWidget(app, pages, moduleName, config)
widget := MakeWidget(tviewApp, pages, moduleName, config)
if widget != nil {
widgets = append(widgets, widget)

77
app/widget_maker_test.go Normal file
View File

@ -0,0 +1,77 @@
package app
import (
"testing"
"github.com/olebedev/config"
"github.com/stretchr/testify/assert"
"github.com/wtfutil/wtf/modules/clocks"
"github.com/wtfutil/wtf/wtf"
)
const (
disabled = `
wtf:
mods:
clocks:
enabled: false
position:
top: 0
left: 0
height: 1
width: 1
refreshInterval: 30`
enabled = `
wtf:
mods:
clocks:
enabled: true
position:
top: 0
left: 0
height: 1
width: 1
refreshInterval: 30`
)
func Test_MakeWidget(t *testing.T) {
tests := []struct {
name string
moduleName string
config *config.Config
expected wtf.Wtfable
}{
{
name: "invalid module",
moduleName: "",
config: &config.Config{},
expected: nil,
},
{
name: "valid disabled module",
moduleName: "clocks",
config: func() *config.Config {
cfg, _ := config.ParseYaml(disabled)
return cfg
}(),
expected: nil,
},
{
name: "valid enabled module",
moduleName: "clocks",
config: func() *config.Config {
cfg, _ := config.ParseYaml(enabled)
return cfg
}(),
expected: &clocks.Widget{},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
actual := MakeWidget(nil, nil, tt.moduleName, tt.config)
assert.IsType(t, tt.expected, actual)
})
}
}

View File

@ -1,14 +1,19 @@
package app
import (
"fmt"
"log"
"os"
"time"
"github.com/gdamore/tcell"
_ "github.com/gdamore/tcell/terminfo/extended"
"github.com/logrusorgru/aurora"
"github.com/olebedev/config"
"github.com/radovskyb/watcher"
"github.com/rivo/tview"
"github.com/wtfutil/wtf/cfg"
"github.com/wtfutil/wtf/support"
"github.com/wtfutil/wtf/utils"
"github.com/wtfutil/wtf/wtf"
)
@ -16,52 +21,75 @@ import (
// WtfApp is the container for a collection of widgets that are all constructed from a single
// configuration file and displayed together
type WtfApp struct {
app *tview.Application
TViewApp *tview.Application
config *config.Config
configFilePath string
display *Display
focusTracker FocusTracker
isCustomConfig bool
ghUser *support.GitHubUser
pages *tview.Pages
validator *ModuleValidator
widgets []wtf.Wtfable
}
// NewWtfApp creates and returns an instance of WtfApp
func NewWtfApp(app *tview.Application, config *config.Config, configFilePath string, isCustom bool) *WtfApp {
wtfApp := WtfApp{
app: app,
func NewWtfApp(tviewApp *tview.Application, config *config.Config, configFilePath string) *WtfApp {
wtfApp := &WtfApp{
TViewApp: tviewApp,
config: config,
configFilePath: configFilePath,
isCustomConfig: isCustom,
pages: tview.NewPages(),
}
wtfApp.app.SetInputCapture(wtfApp.keyboardIntercept)
wtfApp.widgets = MakeWidgets(wtfApp.app, wtfApp.pages, wtfApp.config)
wtfApp.TViewApp.SetBeforeDrawFunc(func(s tcell.Screen) bool {
s.Clear()
return false
})
wtfApp.widgets = MakeWidgets(wtfApp.TViewApp, wtfApp.pages, wtfApp.config)
wtfApp.display = NewDisplay(wtfApp.widgets, wtfApp.config)
wtfApp.focusTracker = NewFocusTracker(wtfApp.app, wtfApp.widgets, wtfApp.config)
wtfApp.focusTracker = NewFocusTracker(wtfApp.TViewApp, wtfApp.widgets, wtfApp.config)
wtfApp.validator = NewModuleValidator()
githubAPIKey := readGitHubAPIKey(wtfApp.config)
wtfApp.ghUser = support.NewGitHubUser(githubAPIKey)
wtfApp.pages.AddPage("grid", wtfApp.display.Grid, true, true)
wtfApp.app.SetRoot(wtfApp.pages, true)
wtfApp.validator.Validate(wtfApp.widgets)
return &wtfApp
firstWidget := wtfApp.widgets[0]
wtfApp.pages.Box.SetBackgroundColor(
wtf.ColorFor(
firstWidget.CommonSettings().Colors.WidgetTheme.Background,
),
)
wtfApp.TViewApp.SetInputCapture(wtfApp.keyboardIntercept)
wtfApp.TViewApp.SetRoot(wtfApp.pages, true)
return wtfApp
}
/* -------------------- Exported Functions -------------------- */
// App returns the *tview.Application instance
func (wtfApp *WtfApp) App() *tview.Application {
return wtfApp.app
// Run starts the underlying tview app
func (wtfApp *WtfApp) Run() {
if err := wtfApp.TViewApp.Run(); err != nil {
fmt.Printf("\n%s %v\n", aurora.Red("ERROR"), err)
os.Exit(1)
}
}
// Start initializes the app
func (wtfApp *WtfApp) Start() {
wtfApp.scheduleWidgets()
go wtfApp.scheduleWidgets()
go wtfApp.watchForConfigChanges()
// FIXME: This should be moved to the AppManager
go func() { _ = wtfApp.ghUser.Load() }()
}
// Stop kills all the currently-running widgets in this app
@ -80,9 +108,18 @@ func (wtfApp *WtfApp) stopAllWidgets() {
func (wtfApp *WtfApp) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
// These keys are global keys used by the app. Widgets should not implement these keys
switch event.Key() {
case tcell.KeyCtrlC:
wtfApp.Stop()
wtfApp.TViewApp.Stop()
wtfApp.DisplayExitMessage()
case tcell.KeyCtrlR:
wtfApp.refreshAllWidgets()
return nil
case tcell.KeyCtrlSpace:
// FIXME: This can't reside in the app, the app doesn't know about
// the AppManager. The AppManager needs to catch this one
fmt.Println("Next app")
return nil
case tcell.KeyTab:
wtfApp.focusTracker.Next()
case tcell.KeyBacktab:
@ -102,6 +139,7 @@ func (wtfApp *WtfApp) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
switch string(event.Rune()) {
case "/":
return nil
default:
}
}
@ -132,11 +170,17 @@ func (wtfApp *WtfApp) watchForConfigChanges() {
case <-watch.Event:
wtfApp.Stop()
config := cfg.LoadWtfConfigFile(wtfApp.configFilePath, wtfApp.isCustomConfig)
config := cfg.LoadWtfConfigFile(wtfApp.configFilePath)
newApp := NewWtfApp(wtfApp.TViewApp, config, wtfApp.configFilePath)
openURLUtil := utils.ToStrs(config.UList("wtf.openUrlUtil", []interface{}{}))
utils.Init(config.UString("wtf.openFileUtil", "open"), openURLUtil)
newApp := NewWtfApp(wtfApp.app, config, wtfApp.configFilePath, wtfApp.isCustomConfig)
newApp.Start()
case err := <-watch.Error:
if err == watcher.ErrWatchedFileDeleted {
// Usually happens because the watcher looks for the file as the OS is updating it
continue
}
log.Fatalln(err)
case <-watch.Closed:
return

View File

@ -5,25 +5,13 @@ import (
"strings"
"github.com/olebedev/config"
"golang.org/x/text/language"
"golang.org/x/text/message"
)
type Colors struct {
Background string
BorderFocusable string
BorderFocused string
BorderNormal string
Checked string
Foreground string
HighlightFore string
HighlightBack string
Text string
Title string
Rows struct {
Even string
Odd string
}
}
const (
defaultLanguageTag = "en-CA"
)
type Module struct {
Name string
@ -41,38 +29,66 @@ type Sigils struct {
}
}
// Common defines a set of common configuration settings applicable to all modules
type Common struct {
Colors
Module
PositionSettings `help:"Defines where in the grid this modules widget will be displayed."`
Sigils
Colors ColorTheme
Config *config.Config
DocPath string
Bordered bool `help:"Whether or not the module should be displayed with a border." values:"true, false" optional:"true" default:"true"`
Enabled bool `help:"Whether or not this module is executed and if its data displayed onscreen." values:"true, false" optional:"true" default:"false"`
Focusable bool `help:"Whether or not this module is focusable." values:"true, false" optional:"true" default:"false"`
LanguageTag string `help:"The BCP 47 langauge tag to localize text to." values:"Any supported BCP 47 language tag." optional:"true" default:"en-CA"`
RefreshInterval int `help:"How often, in seconds, this module will update its data." values:"A positive integer, 0..n." optional:"true"`
Title string `help:"The title string to show when displaying this module" optional:"true"`
Config *config.Config
focusChar int `help:"Define one of the number keys as a short cut key to access the widget." optional:"true"`
}
func NewCommonSettingsFromModule(name, defaultTitle string, moduleConfig *config.Config, globalSettings *config.Config) *Common {
colorsConfig, _ := globalSettings.Get("wtf.colors")
sigilsPath := "wtf.sigils"
// NewCommonSettingsFromModule returns a common settings configuration tailed to the given module
func NewCommonSettingsFromModule(name, defaultTitle string, defaultFocusable bool, moduleConfig *config.Config, globalConfig *config.Config) *Common {
baseColors := NewDefaultColorTheme()
colorsConfig, err := globalConfig.Get("wtf.colors")
if err != nil && strings.Contains(err.Error(), "Nonexistent map") {
// Create a default colors config to fill in for the missing one
// This comes into play when the configuration file does not contain a `colors:` key, i.e:
//
// wtf:
// # colors: <- missing
// refreshInterval: 1
// openFileUtil: "open"
//
colorsConfig, _ = NewDefaultColorConfig()
}
// And finally create a third instance to be the final default fallback in case there are empty or nil values in
// the colors extracted from the config file (aka colorsConfig)
defaultColorTheme := NewDefaultColorTheme()
baseColors.BorderTheme.Focusable = moduleConfig.UString("colors.border.focusable", colorsConfig.UString("border.focusable", defaultColorTheme.BorderTheme.Focusable))
baseColors.BorderTheme.Focused = moduleConfig.UString("colors.border.focused", colorsConfig.UString("border.focused", defaultColorTheme.BorderTheme.Focused))
baseColors.BorderTheme.Unfocusable = moduleConfig.UString("colors.border.normal", colorsConfig.UString("border.normal", defaultColorTheme.BorderTheme.Unfocusable))
baseColors.CheckboxTheme.Checked = moduleConfig.UString("colors.checked", colorsConfig.UString("checked", defaultColorTheme.CheckboxTheme.Checked))
baseColors.RowTheme.EvenForeground = moduleConfig.UString("colors.rows.even", colorsConfig.UString("rows.even", defaultColorTheme.RowTheme.EvenForeground))
baseColors.RowTheme.OddForeground = moduleConfig.UString("colors.rows.odd", colorsConfig.UString("rows.odd", defaultColorTheme.RowTheme.OddForeground))
baseColors.TextTheme.Label = moduleConfig.UString("colors.label", colorsConfig.UString("label", defaultColorTheme.TextTheme.Label))
baseColors.TextTheme.Subheading = moduleConfig.UString("colors.subheading", colorsConfig.UString("subheading", defaultColorTheme.TextTheme.Subheading))
baseColors.TextTheme.Text = moduleConfig.UString("colors.text", colorsConfig.UString("text", defaultColorTheme.TextTheme.Text))
baseColors.TextTheme.Title = moduleConfig.UString("colors.title", colorsConfig.UString("title", defaultColorTheme.TextTheme.Title))
baseColors.WidgetTheme.Background = moduleConfig.UString("colors.background", colorsConfig.UString("background", defaultColorTheme.WidgetTheme.Background))
common := Common{
Colors: Colors{
Background: moduleConfig.UString("background", globalSettings.UString("background", "black")),
BorderFocusable: colorsConfig.UString("border.focusable", "red"),
BorderFocused: colorsConfig.UString("border.focused", "orange"),
BorderNormal: colorsConfig.UString("border.normal", "gray"),
Checked: colorsConfig.UString("checked", "white"),
Foreground: moduleConfig.UString("foreground", colorsConfig.UString("foreground", "white")),
HighlightFore: colorsConfig.UString("highlight.fore", "black"),
HighlightBack: colorsConfig.UString("highlight.back", "green"),
Text: moduleConfig.UString("colors.text", colorsConfig.UString("text", "white")),
Title: moduleConfig.UString("colors.title", colorsConfig.UString("title", "white")),
},
Colors: baseColors,
Module: Module{
Name: name,
@ -82,22 +98,21 @@ func NewCommonSettingsFromModule(name, defaultTitle string, moduleConfig *config
PositionSettings: NewPositionSettingsFromYAML(name, moduleConfig),
Bordered: moduleConfig.UBool("border", true),
Config: moduleConfig,
Enabled: moduleConfig.UBool("enabled", false),
Focusable: moduleConfig.UBool("focusable", defaultFocusable),
LanguageTag: globalConfig.UString("wtf.language", defaultLanguageTag),
RefreshInterval: moduleConfig.UInt("refreshInterval", 300),
Title: moduleConfig.UString("title", defaultTitle),
Config: moduleConfig,
focusChar: moduleConfig.UInt("focusChar", -1),
}
common.Colors.Rows.Even = moduleConfig.UString("colors.rows.even", moduleConfig.UString("rows.even", "white"))
common.Colors.Rows.Odd = moduleConfig.UString("colors.rows.even", moduleConfig.UString("rows.odd", "lightblue"))
common.Sigils.Checkbox.Checked = globalSettings.UString(sigilsPath+".checkbox.checked", "x")
common.Sigils.Checkbox.Unchecked = globalSettings.UString(sigilsPath+".checkbox.unchecked", " ")
common.Sigils.Paging.Normal = globalSettings.UString(sigilsPath+".paging.normal", globalSettings.UString("wtf.paging.pageSigil", "*"))
common.Sigils.Paging.Selected = globalSettings.UString(sigilsPath+".paging.select", globalSettings.UString("wtf.paging.selectedSigil", "_"))
sigilsPath := "wtf.sigils"
common.Sigils.Checkbox.Checked = globalConfig.UString(sigilsPath+".checkbox.checked", "x")
common.Sigils.Checkbox.Unchecked = globalConfig.UString(sigilsPath+".checkbox.unchecked", " ")
common.Sigils.Paging.Normal = globalConfig.UString(sigilsPath+".paging.normal", globalConfig.UString("wtf.paging.pageSigil", "*"))
common.Sigils.Paging.Selected = globalConfig.UString(sigilsPath+".paging.select", globalConfig.UString("wtf.paging.selectedSigil", "_"))
return &common
}
@ -105,27 +120,55 @@ func NewCommonSettingsFromModule(name, defaultTitle string, moduleConfig *config
/* -------------------- Exported Functions -------------------- */
func (common *Common) DefaultFocusedRowColor() string {
return fmt.Sprintf("%s:%s", common.Colors.HighlightFore, common.Colors.HighlightBack)
return fmt.Sprintf(
"%s:%s",
common.Colors.RowTheme.HighlightedForeground,
common.Colors.RowTheme.HighlightedBackground,
)
}
func (common *Common) DefaultRowColor() string {
return fmt.Sprintf("%s:%s", common.Colors.Foreground, common.Colors.Background)
return fmt.Sprintf(
"%s:%s",
common.Colors.RowTheme.EvenForeground,
common.Colors.RowTheme.EvenBackground,
)
}
// FocusChar returns the keyboard number assigned to the widget used to give onscreen
// focus to this widget, as a string. Focus characters can be a range between 1 and 9
func (common *Common) FocusChar() string {
if common.focusChar <= -1 {
if common.focusChar <= 0 {
return ""
}
return string('0' + common.focusChar)
if common.focusChar > 9 {
return ""
}
return fmt.Sprint(common.focusChar)
}
// LocalizedPrinter returns a message.Printer instance localized to the BCP 47 language
// configuration value defined in 'wtf.language' config. If none exists, it defaults to
// 'en-CA'. Use this to format numbers, etc.
func (common *Common) LocalizedPrinter() (*message.Printer, error) {
langTag, err := language.Parse(common.LanguageTag)
if err != nil {
return nil, err
}
prntr := message.NewPrinter(langTag)
return prntr, nil
}
func (common *Common) RowColor(idx int) string {
if idx%2 == 0 {
return common.Colors.Rows.Even
return common.Colors.RowTheme.EvenForeground
}
return common.Colors.Rows.Odd
return common.Colors.RowTheme.OddForeground
}
func (common *Common) RightAlignFormat(width int) string {
@ -133,7 +176,9 @@ func (common *Common) RightAlignFormat(width int) string {
return fmt.Sprintf("%%%ds", width-borderOffset)
}
func (common *Common) SigilStr(len, pos int, width int) string {
// PaginationMarker generates the pagination indicators that appear in the top-right corner
// of multisource widgets
func (common *Common) PaginationMarker(len, pos, width int) string {
sigils := ""
if len > 1 {
@ -147,6 +192,15 @@ func (common *Common) SigilStr(len, pos int, width int) string {
return sigils
}
// SetDocumentationPath is used to explicitly set the documentation path that should be opened
// when the key to open the documentation is pressed.
// Setting this is probably not necessary unless the module documentation is nested inside a
// documentation subdirectory in the /wtfutildocs repo, or the module here has a different
// name than the module's display name in the documentation (which ideally wouldn't be a thing).
func (common *Common) SetDocumentationPath(path string) {
common.DocPath = path
}
// Validations aggregates all the validations from all the sub-sections in Common into a
// single array of validations
func (common *Common) Validations() []Validatable {

194
cfg/common_settings_test.go Normal file
View File

@ -0,0 +1,194 @@
package cfg
import (
"testing"
"github.com/olebedev/config"
"github.com/stretchr/testify/assert"
)
var (
testYaml = `
wtf:
colors:
`
moduleConfig, _ = config.ParseYaml(testYaml)
globalSettings, _ = config.ParseYaml(testYaml)
testCfg = NewCommonSettingsFromModule(
"test",
"Test Config",
true,
moduleConfig,
globalSettings,
)
)
func Test_NewCommonSettingsFromModule(t *testing.T) {
assert.Equal(t, true, testCfg.Bordered)
assert.Equal(t, false, testCfg.Enabled)
assert.Equal(t, true, testCfg.Focusable)
assert.Equal(t, "test", testCfg.Module.Name)
assert.Equal(t, "test", testCfg.Module.Type)
assert.Equal(t, "", testCfg.FocusChar())
assert.Equal(t, 300, testCfg.RefreshInterval)
assert.Equal(t, "Test Config", testCfg.Title)
}
func Test_DefaultFocusedRowColor(t *testing.T) {
assert.Equal(t, "black:green", testCfg.DefaultFocusedRowColor())
}
func Test_DefaultRowColor(t *testing.T) {
assert.Equal(t, "white:transparent", testCfg.DefaultRowColor())
}
func Test_FocusChar(t *testing.T) {
tests := []struct {
name string
before func(testCfg *Common)
expectedChar string
}{
{
name: "with negative focus char",
before: func(testCfg *Common) {
testCfg.focusChar = -1
},
expectedChar: "",
},
{
name: "with positive focus char",
before: func(testCfg *Common) {
testCfg.focusChar = 3
},
expectedChar: "3",
},
{
name: "with zero focus char",
before: func(testCfg *Common) {
testCfg.focusChar = 0
},
expectedChar: "",
},
{
name: "with large focus char",
before: func(testCfg *Common) {
testCfg.focusChar = 10
},
expectedChar: "",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt.before(testCfg)
assert.Equal(t, tt.expectedChar, testCfg.FocusChar())
})
}
}
func Test_RowColor(t *testing.T) {
tests := []struct {
name string
idx int
expectedColor string
}{
{
name: "odd rows, default",
idx: 3,
expectedColor: "lightblue",
},
{
name: "even rows, default",
idx: 8,
expectedColor: "white",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
assert.Equal(t, tt.expectedColor, testCfg.RowColor(tt.idx))
})
}
}
func Test_RightAlignFormat(t *testing.T) {
tests := []struct {
name string
width int
expected string
}{
{
name: "with zero",
width: 0,
expected: "%-2s",
},
{
name: "with positive integer",
width: 3,
expected: "%1s",
},
{
name: "with negative integer",
width: -3,
expected: "%-5s",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
assert.Equal(t, tt.expected, testCfg.RightAlignFormat(tt.width))
})
}
}
func Test_PaginationMarker(t *testing.T) {
tests := []struct {
name string
len int
pos int
width int
expected string
}{
{
name: "with zero pages",
len: 0,
pos: 1,
width: 5,
expected: "",
},
{
name: "with one page",
len: 1,
pos: 1,
width: 5,
expected: "",
},
{
name: "with multiple pages",
len: 3,
pos: 1,
width: 5,
expected: "[lightblue]*_*[white]",
},
{
name: "with negative pages",
len: -3,
pos: 1,
width: 5,
expected: "",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
assert.Equal(t, tt.expected, testCfg.PaginationMarker(tt.len, tt.pos, tt.width))
})
}
}
func Test_Validations(t *testing.T) {
assert.Equal(t, 4, len(testCfg.Validations()))
}

View File

@ -29,7 +29,7 @@ const (
// CreateFile creates the named file in the config directory, if it does not already exist.
// If the file exists it does not recreate it.
// If successful, eturns the absolute path to the file
// If successful, returns the absolute path to the file
// If unsuccessful, returns an error
func CreateFile(fileName string) (string, error) {
configDir, err := WtfConfigDir()
@ -37,7 +37,7 @@ func CreateFile(fileName string) (string, error) {
return "", err
}
filePath := fmt.Sprintf("%s/%s", configDir, fileName)
filePath := filepath.Join(configDir, fileName)
// Check if the file already exists; if it does not, create it
_, err = os.Stat(filePath)
@ -58,16 +58,15 @@ func CreateFile(fileName string) (string, error) {
// Initialize takes care of settings up the initial state of WTF configuration
// It ensures necessary directories and files exist
func Initialize(hasCustom bool) {
if hasCustom == false {
if !hasCustom {
migrateOldConfig()
}
// These always get created because this is where modules should write any permanent
// data they need to persist between runs (i.e.: log, textfile, etc.)
createXdgConfigDir()
createWtfConfigDir()
if hasCustom == false {
if !hasCustom {
createWtfConfigFile()
chmodConfigFile()
}
@ -75,7 +74,13 @@ func Initialize(hasCustom bool) {
// WtfConfigDir returns the absolute path to the configuration directory
func WtfConfigDir() (string, error) {
configDir, err := expandHomeDir(WtfConfigDirV2)
configDir := os.Getenv("XDG_CONFIG_HOME")
if configDir == "" {
configDir = WtfConfigDirV2
} else {
configDir += "/wtf/"
}
configDir, err := expandHomeDir(configDir)
if err != nil {
return "", err
}
@ -84,17 +89,12 @@ func WtfConfigDir() (string, error) {
}
// LoadWtfConfigFile loads the specified config file
func LoadWtfConfigFile(filePath string, isCustomConfig bool) *config.Config {
func LoadWtfConfigFile(filePath string) *config.Config {
absPath, _ := expandHomeDir(filePath)
cfg, err := config.ParseYamlFile(absPath)
if err != nil {
if isCustomConfig {
displayWtfCustomConfigFileLoadError(err)
} else {
displayWtfConfigFileLoadError(err)
}
displayWtfConfigFileLoadError(absPath, err)
os.Exit(1)
}
@ -105,7 +105,8 @@ func LoadWtfConfigFile(filePath string, isCustomConfig bool) *config.Config {
// chmodConfigFile sets the mode of the config file to r+w for the owner only
func chmodConfigFile() {
relPath := fmt.Sprintf("%s%s", WtfConfigDirV2, WtfConfigFile)
configDir, _ := WtfConfigDir()
relPath := filepath.Join(configDir, WtfConfigFile)
absPath, _ := expandHomeDir(relPath)
_, err := os.Stat(absPath)
@ -119,27 +120,13 @@ func chmodConfigFile() {
}
}
// createXdgConfigDir creates the necessary base directory for storing the config file
// If ~/.config is missing, it will try to create it
func createXdgConfigDir() {
xdgConfigDir, _ := expandHomeDir(XdgConfigDir)
if _, err := os.Stat(xdgConfigDir); os.IsNotExist(err) {
err := os.Mkdir(xdgConfigDir, os.ModePerm)
if err != nil {
displayXdgConfigDirCreateError(err)
os.Exit(1)
}
}
}
// createWtfConfigDir creates the necessary directories for storing the default config file
// If ~/.config/wtf is missing, it will try to create it
func createWtfConfigDir() {
wtfConfigDir, _ := WtfConfigDir()
if _, err := os.Stat(wtfConfigDir); os.IsNotExist(err) {
err := os.Mkdir(wtfConfigDir, os.ModePerm)
err := os.MkdirAll(wtfConfigDir, os.ModePerm)
if err != nil {
displayWtfConfigDirCreateError(err)
os.Exit(1)
@ -209,7 +196,7 @@ func home() (string, error) {
// to the new, XDG-compatible location
func migrateOldConfig() {
srcDir, _ := expandHomeDir(WtfConfigDirV1)
destDir, _ := expandHomeDir(WtfConfigDirV2)
destDir, _ := WtfConfigDir()
// If the old config directory doesn't exist, do not move
if _, err := os.Stat(srcDir); os.IsNotExist(err) {

View File

@ -34,17 +34,17 @@ func fcopy(src, dest string, info os.FileInfo) error {
if err != nil {
return err
}
defer f.Close()
defer func() { _ = f.Close() }()
if err = os.Chmod(f.Name(), info.Mode()); err != nil {
return err
}
s, err := os.Open(src)
s, err := os.Open(filepath.Clean(src))
if err != nil {
return err
}
defer s.Close()
defer func() { _ = f.Close() }()
_, err = io.Copy(f, s)
return err

109
cfg/default_color_theme.go Normal file
View File

@ -0,0 +1,109 @@
package cfg
import (
"github.com/olebedev/config"
"gopkg.in/yaml.v2"
)
// BorderTheme defines the default color scheme for drawing widget borders
type BorderTheme struct {
Focusable string
Focused string
Unfocusable string
}
// CheckboxTheme defines the default color scheme for drawing checkable rows in widgets
type CheckboxTheme struct {
Checked string
}
// RowTheme defines the default color scheme for row text
type RowTheme struct {
EvenBackground string
EvenForeground string
OddBackground string
OddForeground string
HighlightedBackground string
HighlightedForeground string
}
// TextTheme defines the default color scheme for text rendering
type TextTheme struct {
Label string
Subheading string
Text string
Title string
}
// WidgetTheme defines the default color scheme for the widget rect itself
type WidgetTheme struct {
Background string
}
// ColorTheme is an alamgam of all the default color settings
type ColorTheme struct {
BorderTheme
CheckboxTheme
RowTheme
TextTheme
WidgetTheme
}
// NewDefaultColorTheme creates and returns an instance of DefaultColorTheme
func NewDefaultColorTheme() ColorTheme {
defaultTheme := ColorTheme{
BorderTheme: BorderTheme{
Focusable: "blue",
Focused: "orange",
Unfocusable: "gray",
},
CheckboxTheme: CheckboxTheme{
Checked: "gray",
},
RowTheme: RowTheme{
EvenBackground: "transparent",
EvenForeground: "white",
OddBackground: "transparent",
OddForeground: "lightblue",
HighlightedForeground: "black",
HighlightedBackground: "green",
},
TextTheme: TextTheme{
Label: "lightblue",
Subheading: "red",
Text: "white",
Title: "green",
},
WidgetTheme: WidgetTheme{
Background: "transparent",
},
}
return defaultTheme
}
// NewDefaultColorConfig creates and returns a config.Config-compatible configuration struct
// using a DefaultColorTheme to pre-populate all the relevant values
func NewDefaultColorConfig() (*config.Config, error) {
colorTheme := NewDefaultColorTheme()
yamlBytes, err := yaml.Marshal(colorTheme)
if err != nil {
return nil, err
}
cfg, err := config.ParseYamlBytes(yamlBytes)
if err != nil {
return nil, err
}
return cfg, nil
}

View File

@ -0,0 +1,26 @@
package cfg
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test_NewDefaultColorTheme(t *testing.T) {
theme := NewDefaultColorTheme()
assert.Equal(t, "orange", theme.BorderTheme.Focused)
assert.Equal(t, "red", theme.TextTheme.Subheading)
assert.Equal(t, "transparent", theme.WidgetTheme.Background)
}
func Test_NewDefaultColorConfig(t *testing.T) {
cfg, err := NewDefaultColorConfig()
assert.Nil(t, err)
assert.Equal(t, "orange", cfg.UString("bordertheme.focused"))
assert.Equal(t, "red", cfg.UString("texttheme.subheading"))
assert.Equal(t, "transparent", cfg.UString("widgettheme.background"))
assert.Equal(t, "", cfg.UString("widgettheme.missing"))
}

View File

@ -1,15 +1,14 @@
package cfg
const defaultConfigFile = `
wtf:
const defaultConfigFile = `wtf:
colors:
border:
focusable: darkslateblue
focused: orange
normal: gray
grid:
columns: [32, 32, 32, 32]
rows: [10, 10, 10, 4, 4]
columns: [32, 32, 32, 32, 90]
rows: [10, 10, 10, 4, 4, 90]
refreshInterval: 1
mods:
clocks_a:
@ -37,7 +36,7 @@ wtf:
odd: "white"
enabled: true
locations:
Avignon: "Europe/Paris"
Paris: "Europe/Paris"
Barcelona: "Europe/Madrid"
Dubai: "Asia/Dubai"
position:
@ -59,7 +58,7 @@ wtf:
left: 1
width: 2
height: 1
updateInterval: 14400
refreshInterval: 14400
ipinfo:
colors:
name: "lightblue"

View File

@ -30,31 +30,14 @@ func displayDefaultConfigWriteError(err error) {
displayError(err)
}
func displayXdgConfigDirCreateError(err error) {
fmt.Printf("\n%s Could not create the '%s' directory.\n", aurora.Red("ERROR"), aurora.Yellow(XdgConfigDir))
fmt.Println()
displayError(err)
}
func displayWtfConfigDirCreateError(err error) {
fmt.Printf("\n%s Could not create the '%s' directory.\n", aurora.Red("ERROR"), aurora.Yellow(WtfConfigDirV2))
fmt.Println()
displayError(err)
}
func displayWtfConfigFileLoadError(err error) {
fmt.Printf("\n%s Could not load '%s'.\n", aurora.Red("ERROR"), aurora.Yellow(WtfConfigFile))
fmt.Println()
fmt.Println("This could mean one of two things:")
fmt.Println()
fmt.Printf(" 1. Your %s file is missing. Check in %s to see if %s is there.\n", aurora.Yellow(WtfConfigFile), aurora.Yellow("~/.config/wtf/"), aurora.Yellow(WtfConfigFile))
fmt.Printf(" 2. Your %s file has a syntax error. Try running it through http://www.yamllint.com to check for errors.\n", aurora.Yellow(WtfConfigFile))
fmt.Println()
displayError(err)
}
func displayWtfCustomConfigFileLoadError(err error) {
fmt.Printf("\n%s Could not load '%s'.\n", aurora.Red("ERROR"), aurora.Yellow(WtfConfigFile))
func displayWtfConfigFileLoadError(path string, err error) {
fmt.Printf("\n%s Could not load '%s'.\n", aurora.Red("ERROR"), aurora.Yellow(path))
fmt.Println()
fmt.Println("This could mean one of two things:")
fmt.Println()

28
cfg/parsers.go Normal file
View File

@ -0,0 +1,28 @@
package cfg
import (
"fmt"
"github.com/olebedev/config"
)
// ParseAsMapOrList takes a configuration key and attempts to parse it first as a map
// and then as a list. Map entries are concatenated as "key/value"
func ParseAsMapOrList(ymlConfig *config.Config, configKey string) []string {
result := []string{}
mapItems, err := ymlConfig.Map(configKey)
if err == nil {
for key, value := range mapItems {
result = append(result, fmt.Sprintf("%s/%s", value, key))
}
return result
}
listItems := ymlConfig.UList(configKey)
for _, listItem := range listItems {
result = append(result, listItem.(string))
}
return result
}

50
cfg/parsers_test.go Normal file
View File

@ -0,0 +1,50 @@
package cfg
import (
"testing"
"github.com/olebedev/config"
)
func Test_ParseAsMapOrList(t *testing.T) {
tests := []struct {
name string
configKey string
yaml string
expectedCount int
}{
{
name: "as empty set",
configKey: "data",
yaml: "",
expectedCount: 0,
},
{
name: "as map",
configKey: "data",
yaml: "data:\n a: cat\n b: dog",
expectedCount: 2,
},
{
name: "as list",
configKey: "data",
yaml: "data:\n - cat\n - dog\n - rat\n",
expectedCount: 3,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
ymlConfig, err := config.ParseYaml(tt.yaml)
if err != nil {
t.Errorf("\nexpected: no error\n got: %v", err)
}
actual := ParseAsMapOrList(ymlConfig, tt.configKey)
if tt.expectedCount != len(actual) {
t.Errorf("\nexpected: %d\n got: %d", tt.expectedCount, len(actual))
}
})
}
}

View File

@ -41,10 +41,10 @@ func NewPositionSettingsFromYAML(moduleName string, moduleConfig *config.Config)
pos := PositionSettings{
Validations: validations,
Top: validations.valueFor("top"),
Left: validations.valueFor("left"),
Width: validations.valueFor("width"),
Height: validations.valueFor("height"),
Top: validations.intValueFor("top"),
Left: validations.intValueFor("left"),
Width: validations.intValueFor("width"),
Height: validations.intValueFor("height"),
}
return pos

View File

@ -54,6 +54,8 @@ func (posVal *positionValidation) String() string {
return fmt.Sprintf("Invalid value for %s:\t%d", aurora.Yellow(posVal.name), posVal.intVal)
}
/* -------------------- Unexported Functions -------------------- */
func newPositionValidation(name string, intVal int, err error) *positionValidation {
posVal := &positionValidation{
err: err,

View File

@ -0,0 +1,26 @@
package cfg
import (
"errors"
"testing"
"github.com/stretchr/testify/assert"
)
var (
posVal = &positionValidation{
err: errors.New("Busted"),
name: "top",
intVal: -3,
}
)
func Test_Attributes(t *testing.T) {
assert.EqualError(t, posVal.Error(), "Busted")
assert.Equal(t, true, posVal.HasError())
assert.Equal(t, -3, posVal.IntValue())
assert.Contains(t, posVal.String(), "Invalid")
assert.Contains(t, posVal.String(), "top")
assert.Contains(t, posVal.String(), "-3")
}

224
cfg/secrets.go Normal file
View File

@ -0,0 +1,224 @@
package cfg
import (
"errors"
"fmt"
"runtime"
"github.com/docker/docker-credential-helpers/client"
"github.com/docker/docker-credential-helpers/credentials"
"github.com/olebedev/config"
"github.com/wtfutil/wtf/logger"
)
type SecretLoadParams struct {
name string
globalConfig *config.Config
service string
secret *string
}
// Load module secrets.
//
// The credential helpers impose this structure:
//
// SERVICE is mapped to a SECRET and USERNAME
//
// Only SECRET is secret, SERVICE and USERNAME are not, so this
// API doesn't expose USERNAME.
//
// SERVICE was intended to be the URL of an API server, but
// for hosted services that do not have or need a configurable
// API server, its easier to just use the module name as the
// SERVICE:
//
// cfg.ModuleSecret(name, globalConfig, &settings.apiKey).Load()
//
// The user will use the module name as the service, and the API key as
// the secret, for example:
//
// % wtfutil save-secret circleci
// Secret: ...
//
// If a module (such as pihole, jenkins, or github) might have multiple
// instantiations each using a different API service (with its own unique
// API key), then the module should use the API URL to lookup the secret.
// For example, for github:
//
// cfg.ModuleSecret(name, globalConfig, &settings.apiKey).
// Service(settings.baseURL).
// Load()
//
// The user will use the API URL as the service, and the API key as the
// secret, for example, with github configured as:
//
// -- config.yml
// mods:
// github:
// baseURL: "https://github.mycompany.com/api/v3"
// ...
//
// the secret must be saved as:
//
// % wtfutil save-secret https://github.mycompany.com/api/v3
// Secret: ...
//
// If baseURL is not set in the configuration it will be the modules
// default, and the SERVICE will default to the module name, "github",
// and the user must save the secret as:
//
// % wtfutil save-secret github
// Secret: ...
//
// Ideally, the individual module documentation would describe the
// SERVICE name to use to save the secret.
func ModuleSecret(name string, globalConfig *config.Config, secret *string) *SecretLoadParams {
return &SecretLoadParams{
name: name,
globalConfig: globalConfig,
secret: secret,
service: name, // Default the service to the module name
}
}
func (slp *SecretLoadParams) Service(service string) *SecretLoadParams {
if service != "" {
slp.service = service
}
return slp
}
func (slp *SecretLoadParams) Load() {
configureSecret(
slp.globalConfig,
slp.service,
slp.secret,
)
}
type Secret struct {
Service string
Secret string
Username string
Store string
}
func configureSecret(
globalConfig *config.Config,
service string,
secret *string,
) {
if service == "" {
return
}
if secret == nil {
return
}
// Don't overwrite the secret if it was configured with yaml
if *secret != "" {
return
}
cred, err := FetchSecret(globalConfig, service)
if err != nil {
logger.Log(fmt.Sprintf("Loading secret failed: %s", err.Error()))
return
}
if cred == nil {
// No secret store configued.
return
}
if secret != nil && *secret == "" {
*secret = cred.Secret
}
}
// Fetch secret for `service`. Service is customarily a URL, but can be any
// identifier uniquely used by wtf to identify the service, such as the name
// of the module. nil is returned if the secretStore global property is not
// present or the secret is not found in that store.
func FetchSecret(globalConfig *config.Config, service string) (*Secret, error) {
prog := newProgram(globalConfig)
if prog == nil {
// No secret store configured.
return nil, nil
}
cred, err := client.Get(prog.runner, service)
if err != nil {
return nil, fmt.Errorf("get %v from %v: %w", service, prog.store, err)
}
return &Secret{
Service: cred.ServerURL,
Secret: cred.Secret,
Username: cred.Username,
Store: prog.store,
}, nil
}
func StoreSecret(globalConfig *config.Config, secret *Secret) error {
prog := newProgram(globalConfig)
if prog == nil {
return errors.New("cannot store secrets: wtf.secretStore is not configured")
}
cred := &credentials.Credentials{
ServerURL: secret.Service,
Username: secret.Username,
Secret: secret.Secret,
}
// docker-credential requires a username, but it isn't necessary for
// all services. Use a default if a username was not set.
if cred.Username == "" {
cred.Username = "default"
}
err := client.Store(prog.runner, cred)
if err != nil {
return fmt.Errorf("store %v: %w", prog.store, err)
}
return nil
}
type program struct {
store string
runner client.ProgramFunc
}
func newProgram(globalConfig *config.Config) *program {
secretStore := globalConfig.UString("wtf.secretStore", "(none)")
if secretStore == "(none)" {
return nil
}
if secretStore == "" {
switch runtime.GOOS {
case "windows":
secretStore = "winrt"
case "darwin":
secretStore = "osxkeychain"
default:
secretStore = "secretservice"
}
}
return &program{
secretStore,
client.NewShellProgramFunc("docker-credential-" + secretStore),
}
}

View File

@ -18,7 +18,7 @@ func (vals *Validations) append(key string, posVal Validatable) {
vals.validations[key] = posVal
}
func (vals *Validations) valueFor(key string) int {
func (vals *Validations) intValueFor(key string) int {
val := vals.validations[key]
if val != nil {
return val.IntValue()

38
cfg/validations_test.go Normal file
View File

@ -0,0 +1,38 @@
package cfg
import (
"testing"
"github.com/stretchr/testify/assert"
)
var (
vals = NewValidations()
)
func Test_intValueFor(t *testing.T) {
vals.append("left", newPositionValidation("left", 3, nil))
tests := []struct {
name string
key string
expected int
}{
{
name: "with valid key",
key: "left",
expected: 3,
},
{
name: "with invalid key",
key: "cat",
expected: 0,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
assert.Equal(t, tt.expected, vals.intValueFor(tt.key))
})
}
}

View File

@ -22,7 +22,8 @@ func NewChecklist(checkedIcon, uncheckedIcon string) Checklist {
/* -------------------- Exported Functions -------------------- */
// Add creates a new item in the checklist
// Add creates a new checklist item and prepends it onto the existing
// list of items. The new one is at the start of the list
func (list *Checklist) Add(checked bool, text string) {
item := NewChecklistItem(
checked,
@ -48,9 +49,10 @@ func (list *Checklist) CheckedItems() []*ChecklistItem {
}
// Delete removes the selected item from the checklist
func (list *Checklist) Delete() {
list.Items = append(list.Items[:list.selected], list.Items[list.selected+1:]...)
list.Prev()
func (list *Checklist) Delete(selectedIndex int) {
if selectedIndex >= 0 && selectedIndex < len(list.Items) {
list.Items = append(list.Items[:selectedIndex], list.Items[selectedIndex+1:]...)
}
}
// IsSelectable returns true if the checklist has selectable items, false if it does not
@ -76,35 +78,14 @@ func (list *Checklist) LongestLine() int {
return maxLen
}
func (list *Checklist) Selected() int {
return list.selected
}
// SelectedItem returns the currently-selected checklist item or nil if no item is selected
func (list *Checklist) SelectedItem() *ChecklistItem {
if list.IsUnselectable() {
return nil
}
return list.Items[list.selected]
}
func (list *Checklist) SetSelectedByItem(selectableItem *ChecklistItem) {
// IndexByItem returns the index of a giving item if found, otherwise returns 0 with ok set to false
func (list *Checklist) IndexByItem(selectableItem *ChecklistItem) (index int, ok bool) {
for idx, item := range list.Items {
if item == selectableItem {
list.selected = idx
break
return idx, true
}
}
}
// Toggle switches the checked state of the currently-selected item
func (list *Checklist) Toggle() {
if list.IsUnselectable() {
return
}
list.SelectedItem().Toggle()
return 0, false
}
// UncheckedItems returns a slice of all the unchecked items
@ -125,65 +106,6 @@ func (list *Checklist) Unselect() {
list.selected = -1
}
// Update sets the text of the currently-selected item to the provided text
func (list *Checklist) Update(text string) {
item := list.SelectedItem()
if item == nil {
return
}
item.Text = text
}
/* -------------------- Item Movement -------------------- */
// Prev selects the previous item UP in the checklist
func (list *Checklist) Prev() {
list.selected--
if list.selected < 0 {
list.selected = len(list.Items) - 1
}
}
// Next selects the next item DOWN in the checklist
func (list *Checklist) Next() {
list.selected++
if list.selected >= len(list.Items) {
list.selected = 0
}
}
// Promote moves the selected item UP in the checklist
func (list *Checklist) Promote() {
if list.IsUnselectable() {
return
}
k := list.selected - 1
if k < 0 {
k = len(list.Items) - 1
}
list.Swap(list.selected, k)
list.selected = k
}
// Demote moves the selected item DOWN in the checklist
func (list *Checklist) Demote() {
if list.IsUnselectable() {
return
}
j := list.selected + 1
if j >= len(list.Items) {
j = 0
}
list.Swap(list.selected, j)
list.selected = j
}
/* -------------------- Sort Interface -------------------- */
func (list *Checklist) Len() int {

View File

@ -1,7 +1,5 @@
package checklist
import ()
// ChecklistItem is a module for creating generic checklist implementations
// See 'Todo' for an implementation example
type ChecklistItem struct {

View File

@ -10,8 +10,8 @@ func testChecklistItem() *ChecklistItem {
item := NewChecklistItem(
false,
"test",
"x",
" ",
"",
"",
)
return item
}

436
checklist/checklist_test.go Normal file
View File

@ -0,0 +1,436 @@
package checklist
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test_NewCheckist(t *testing.T) {
cl := NewChecklist("o", "-")
assert.IsType(t, Checklist{}, cl)
assert.Equal(t, "o", cl.checkedIcon)
assert.Equal(t, -1, cl.selected)
assert.Equal(t, "-", cl.uncheckedIcon)
assert.Equal(t, 0, len(cl.Items))
}
func Test_Add(t *testing.T) {
cl := NewChecklist("o", "-")
cl.Add(true, "test item")
assert.Equal(t, 1, len(cl.Items))
}
func Test_CheckedItems(t *testing.T) {
tests := []struct {
name string
expectedLen int
checkedLen int
before func(cl *Checklist)
}{
{
name: "with no items",
expectedLen: 0,
checkedLen: 0,
before: func(cl *Checklist) {},
},
{
name: "with no checked items",
expectedLen: 1,
checkedLen: 0,
before: func(cl *Checklist) {
cl.Add(false, "unchecked item")
},
},
{
name: "with one checked item",
expectedLen: 2,
checkedLen: 1,
before: func(cl *Checklist) {
cl.Add(false, "unchecked item")
cl.Add(true, "checked item")
},
},
{
name: "with multiple checked items",
expectedLen: 3,
checkedLen: 2,
before: func(cl *Checklist) {
cl.Add(false, "unchecked item")
cl.Add(true, "checked item 11")
cl.Add(true, "checked item 2")
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cl := NewChecklist("o", "-")
tt.before(&cl)
assert.Equal(t, tt.expectedLen, len(cl.Items))
assert.Equal(t, tt.checkedLen, len(cl.CheckedItems()))
})
}
}
func Test_Delete(t *testing.T) {
tests := []struct {
name string
idx int
expectedLen int
}{
{
name: "with valid index",
idx: 0,
expectedLen: 0,
},
{
name: "with invalid index",
idx: 2,
expectedLen: 1,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cl := NewChecklist("o", "-")
cl.Add(true, "test item")
cl.Delete(tt.idx)
assert.Equal(t, tt.expectedLen, len(cl.Items))
})
}
}
func Test_IsSelectable(t *testing.T) {
tests := []struct {
name string
selected int
expected bool
}{
{
name: "nothing selected",
selected: -1,
expected: false,
},
{
name: "valid selection",
selected: 1,
expected: true,
},
{
name: "invalid selection",
selected: 3,
expected: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cl := NewChecklist("o", "-")
cl.Add(true, "test item 1")
cl.Add(false, "test item 2")
cl.selected = tt.selected
assert.Equal(t, tt.expected, cl.IsSelectable())
})
}
}
func Test_IsUnselectable(t *testing.T) {
tests := []struct {
name string
selected int
expected bool
}{
{
name: "nothing selected",
selected: -1,
expected: true,
},
{
name: "valid selection",
selected: 1,
expected: false,
},
{
name: "invalid selection",
selected: 3,
expected: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cl := NewChecklist("o", "-")
cl.Add(true, "test item 1")
cl.Add(false, "test item 2")
cl.selected = tt.selected
assert.Equal(t, tt.expected, cl.IsUnselectable())
})
}
}
func Test_LongestLine(t *testing.T) {
tests := []struct {
name string
expectedLen int
before func(cl *Checklist)
}{
{
name: "with no items",
expectedLen: 0,
before: func(cl *Checklist) {},
},
{
name: "with different-length items",
expectedLen: 12,
before: func(cl *Checklist) {
cl.Add(true, "test item 1")
cl.Add(false, "test item 22")
},
},
{
name: "with same-length items",
expectedLen: 11,
before: func(cl *Checklist) {
cl.Add(true, "test item 1")
cl.Add(false, "test item 2")
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cl := NewChecklist("o", "-")
tt.before(&cl)
assert.Equal(t, tt.expectedLen, cl.LongestLine())
})
}
}
func Test_IndexByItem(t *testing.T) {
cl := NewChecklist("o", "-")
cl.Add(false, "unchecked item")
cl.Add(true, "checked item")
tests := []struct {
name string
item *ChecklistItem
expectedIdx int
expectedOk bool
}{
{
name: "with nil",
item: nil,
expectedIdx: 0,
expectedOk: false,
},
{
name: "with valid item",
item: cl.Items[1],
expectedIdx: 1,
expectedOk: true,
},
{
name: "with valid item",
item: NewChecklistItem(false, "invalid", "x", " "),
expectedIdx: 0,
expectedOk: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
idx, ok := cl.IndexByItem(tt.item)
assert.Equal(t, tt.expectedIdx, idx)
assert.Equal(t, tt.expectedOk, ok)
})
}
}
func Test_UncheckedItems(t *testing.T) {
tests := []struct {
name string
expectedLen int
checkedLen int
before func(cl *Checklist)
}{
{
name: "with no items",
expectedLen: 0,
checkedLen: 0,
before: func(cl *Checklist) {},
},
{
name: "with no unchecked items",
expectedLen: 1,
checkedLen: 0,
before: func(cl *Checklist) {
cl.Add(true, "unchecked item")
},
},
{
name: "with one unchecked item",
expectedLen: 2,
checkedLen: 1,
before: func(cl *Checklist) {
cl.Add(false, "unchecked item")
cl.Add(true, "checked item")
},
},
{
name: "with multiple unchecked items",
expectedLen: 3,
checkedLen: 2,
before: func(cl *Checklist) {
cl.Add(false, "unchecked item")
cl.Add(true, "checked item 11")
cl.Add(false, "checked item 2")
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cl := NewChecklist("o", "-")
tt.before(&cl)
assert.Equal(t, tt.expectedLen, len(cl.Items))
assert.Equal(t, tt.checkedLen, len(cl.UncheckedItems()))
})
}
}
func Test_Unselect(t *testing.T) {
cl := NewChecklist("o", "-")
cl.Add(false, "unchecked item")
cl.selected = 0
assert.Equal(t, 0, cl.selected)
cl.Unselect()
assert.Equal(t, -1, cl.selected)
}
/* -------------------- Sort Interface -------------------- */
func Test_Len(t *testing.T) {
tests := []struct {
name string
expectedLen int
before func(cl *Checklist)
}{
{
name: "with no items",
expectedLen: 0,
before: func(cl *Checklist) {},
},
{
name: "with one item",
expectedLen: 1,
before: func(cl *Checklist) {
cl.Add(false, "unchecked item")
},
},
{
name: "with multiple items",
expectedLen: 3,
before: func(cl *Checklist) {
cl.Add(false, "unchecked item")
cl.Add(true, "checked item 1")
cl.Add(false, "checked item 2")
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cl := NewChecklist("o", "-")
tt.before(&cl)
assert.Equal(t, tt.expectedLen, cl.Len())
})
}
}
func Test_Less(t *testing.T) {
tests := []struct {
name string
first string
second string
expected bool
}{
{
name: "same",
first: "",
second: "",
expected: false,
},
{
name: "last less",
first: "beta",
second: "alpha",
expected: true,
},
{
name: "first less",
first: "alpha",
second: "beta",
expected: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cl := NewChecklist("o", "-")
cl.Add(false, tt.first)
cl.Add(false, tt.second)
assert.Equal(t, tt.expected, cl.Less(0, 1))
})
}
}
func Test_Swap(t *testing.T) {
tests := []struct {
name string
first string
second string
expected bool
}{
{
name: "same",
first: "",
second: "",
},
{
name: "last less",
first: "alpha",
second: "beta",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cl := NewChecklist("o", "-")
cl.Add(false, tt.first)
cl.Add(false, tt.second)
cl.Swap(0, 1)
assert.Equal(t, tt.expected, cl.Items[0].Text == "beta")
assert.Equal(t, tt.expected, cl.Items[1].Text == "alpha")
})
}
}

View File

@ -4,21 +4,41 @@ import (
"fmt"
"os"
"path/filepath"
"strings"
"github.com/chzyer/readline"
goFlags "github.com/jessevdk/go-flags"
"github.com/olebedev/config"
"github.com/wtfutil/wtf/cfg"
"github.com/wtfutil/wtf/help"
"github.com/wtfutil/wtf/utils"
)
// Flags is the container for command line flag data
type Flags struct {
Config string `short:"c" long:"config" optional:"yes" description:"Path to config file"`
Module string `short:"m" long:"module" optional:"yes" description:"Display info about a specific module, i.e.: 'wtf -m=todo'"`
Module string `short:"m" long:"module" optional:"yes" description:"Display info about a specific module, i.e.: 'wtfutil -m=todo'"`
Profile bool `short:"p" long:"profile" optional:"yes" description:"Profile application memory usage"`
Version bool `short:"v" long:"version" description:"Show version info"`
// Work-around go-flags misfeatures. If any sub-command is defined
// then `wtf` (no sub-commands, the common usage), is warned about.
Opt struct {
Cmd string `positional-arg-name:"command"`
Args []string `positional-arg-name:"args"`
} `positional-args:"yes"`
hasCustom bool
}
var EXTRA = `
Commands:
save-secret <service>
service Service URL or module name of secret.
Save a secret into the secret store. The secret will be prompted for.
Requires wtf.secretStore to be configured. See individual modules for
information on what service and secret means for their configuration,
not all modules use secrets.
`
// NewFlags creates an instance of Flags
func NewFlags() *Flags {
flags := Flags{}
@ -34,21 +54,73 @@ func (flags *Flags) ConfigFilePath() string {
// RenderIf displays special-case information based on the flags passed
// in, if any flags were passed in
func (flags *Flags) RenderIf(version string, config *config.Config) {
func (flags *Flags) RenderIf(version, date string, config *config.Config) {
if flags.HasModule() {
help.Display(flags.Module, config)
os.Exit(0)
}
if flags.HasVersion() {
fmt.Println(version)
fmt.Printf("%s (%s)\n", version, date)
os.Exit(0)
}
if flags.Opt.Cmd == "" {
return
}
switch cmd := flags.Opt.Cmd; cmd {
case "save-secret":
var service, secret string
args := flags.Opt.Args
if len(args) < 1 || args[0] == "" {
fmt.Fprintf(os.Stderr, "save-secret: service required, see `%s --help`\n", os.Args[0])
os.Exit(1)
}
service = args[0]
if len(args) > 1 {
fmt.Fprintf(os.Stderr, "save-secret: too many arguments, see `%s --help`\n", os.Args[0])
os.Exit(1)
}
b, err := readline.Password("Secret: ")
if err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}
secret = string(b)
secret = strings.TrimSpace(secret)
if secret == "" {
fmt.Fprintf(os.Stderr, "save-secret: secret required, see `%s --help`\n", os.Args[0])
os.Exit(1)
}
err = cfg.StoreSecret(config, &cfg.Secret{
Service: service,
Secret: secret,
Username: "default",
})
if err != nil {
fmt.Fprintf(os.Stderr, "Saving secret for service %q: %s\n", service, err.Error())
os.Exit(1)
}
fmt.Printf("Saved secret for service %q\n", service)
os.Exit(0)
default:
fmt.Fprintf(os.Stderr, "Command `%s` is not supported, try `%s --help`\n", cmd, os.Args[0])
os.Exit(1)
}
}
// HasCustomConfig returns TRUE if a config path was passed in, FALSE if one was not
func (flags *Flags) HasCustomConfig() bool {
return len(flags.Config) > 0
return flags.hasCustom
}
// HasModule returns TRUE if a module name was passed in, FALSE if one was not
@ -58,7 +130,7 @@ func (flags *Flags) HasModule() bool {
// HasVersion returns TRUE if the version flag was passed in, FALSE if it was not
func (flags *Flags) HasVersion() bool {
return flags.Version == true
return flags.Version
}
// Parse parses the incoming flags
@ -66,19 +138,23 @@ func (flags *Flags) Parse() {
parser := goFlags.NewParser(flags, goFlags.Default)
if _, err := parser.Parse(); err != nil {
if flagsErr, ok := err.(*goFlags.Error); ok && flagsErr.Type == goFlags.ErrHelp {
fmt.Println(EXTRA)
os.Exit(0)
}
}
// If no config file is explicitly passed in as a param,
// set the flag to the default config file
if !flags.HasCustomConfig() {
homeDir, err := utils.Home()
if err != nil {
fmt.Printf("Error: %v\n", err)
os.Exit(1)
}
flags.Config = filepath.Join(homeDir, ".config", "wtf", "config.yml")
// If we have a custom config, then we're done parsing parameters, we don't need to
// generate the default value
flags.hasCustom = (len(flags.Config) > 0)
if flags.hasCustom {
return
}
// If no config file is explicitly passed in as a param then set the flag to the default config file
configDir, err := cfg.WtfConfigDir()
if err != nil {
fmt.Printf("Error: %v\n", err)
os.Exit(1)
}
flags.Config = filepath.Join(configDir, "config.yml")
}

29
generator/settings.tpl Normal file
View File

@ -0,0 +1,29 @@
package {{(Lower .Name)}}
import (
"github.com/olebedev/config"
"github.com/wtfutil/wtf/cfg"
)
const (
defaultFocusable = false
defaultTitle = "{{(.Name)}}"
)
// Settings defines the configuration properties for this module
type Settings struct {
common *cfg.Common
// Define your settings attributes here
}
// NewSettingsFromYAML creates a new settings instance from a YAML config block
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
settings := Settings{
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
// Configure your settings attributes here. See http://github.com/olebedev/config for type details
}
return &settings
}

View File

@ -36,17 +36,41 @@ func main() {
widgetName,
}
tpl, _ := template.New("textwidget.tpl").Funcs(template.FuncMap{
"Lower": strings.ToLower,
"Title": strings.Title,
}).ParseFiles("generator/textwidget.tpl")
createModuleDirectory(data)
err := os.Mkdir(strings.ToLower(widgetName), os.ModePerm)
generateWidgetFile(data)
generateSettingsFile(data)
}
/* -------------------- Unexported Functions -------------------- */
func createModuleDirectory(data struct{ Name string }) {
err := os.MkdirAll(strings.ToLower(fmt.Sprintf("modules/%s", data.Name)), os.ModePerm)
if err != nil {
fmt.Println(err.Error())
}
}
out, err := os.Create(fmt.Sprintf("%s/widget.go", strings.ToLower(widgetName)))
func generateWidgetFile(data struct{ Name string }) {
tpl, _ := template.New("textwidget.tpl").Funcs(template.FuncMap{
"Lower": strings.ToLower,
}).ParseFiles("generator/textwidget.tpl")
out, err := os.Create(fmt.Sprintf("modules/%s/widget.go", strings.ToLower(data.Name)))
if err != nil {
fmt.Println(err.Error())
}
defer out.Close()
tpl.Execute(out, data)
}
func generateSettingsFile(data struct{ Name string }) {
tpl, _ := template.New("settings.tpl").Funcs(template.FuncMap{
"Lower": strings.ToLower,
}).ParseFiles("generator/settings.tpl")
out, err := os.Create(fmt.Sprintf("modules/%s/settings.go", strings.ToLower(data.Name)))
if err != nil {
fmt.Println(err.Error())
}

View File

@ -1,56 +1,45 @@
// Package {{(Lower .Name)}}
package {{(Lower .Name)}}
import (
"strconv"
"github.com/gdamore/tcell"
"github.com/rivo/tview"
"github.com/wtfutil/wtf/wtf"
"github.com/wtfutil/wtf/view"
)
const HelpText = `
Keyboard commands for {{(Title .Name)}}:
`
// Widget is the container for your module's data
type Widget struct {
wtf.HelpfulWidget
wtf.KeyboardWidget
wtf.TextWidget
view.TextWidget
settings *Settings
}
func NewWidget(app *tview.Application, pages *tview.Pages, settings *Settings) *Widget {
// NewWidget creates and returns an instance of Widget
func NewWidget(tviewApp *tview.Application, pages *tview.Pages, settings *Settings) *Widget {
widget := Widget{
HelpfulWidget: wtf.NewHelpfulWidget(app, pages, HelpText),
KeyboardWidget: wtf.NewKeyboardWidget(),
TextWidget: wtf.NewTextWidget(app, settings.common, false),
TextWidget: view.NewTextWidget(tviewApp, settings.common),
settings: settings,
}
widget.initializeKeyboardControls()
widget.View.SetInputCapture(widget.InputCapture)
widget.View.SetScrollable(true)
widget.View.SetRegions(true)
widget.HelpfulWidget.SetView(widget.View)
return &widget
}
/* -------------------- Exported Functions -------------------- */
// Refresh updates the onscreen contents of the widget
func (widget *Widget) Refresh() {
// The last call should always be to the display function
widget.display()
// The last call should always be to the display function
widget.display()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) display() {
widget.Redraw(widget.CommonSettings().Title, "Some text", false)
func (widget *Widget) content() string {
return "This is my widget"
}
func (widget *Widget) display() {
widget.Redraw(func() (string, string, bool) {
return widget.CommonSettings().Title, widget.content(), false
})
}

119
go.mod
View File

@ -1,57 +1,86 @@
module github.com/wtfutil/wtf
go 1.12
go 1.16
require (
cloud.google.com/go v0.40.0 // indirect
code.cloudfoundry.org/bytefmt v0.0.0-20180906201452-2aa6f33b730c
github.com/PagerDuty/go-pagerduty v0.0.0-20190503230806-cf1437c7c8d6
github.com/StackExchange/wmi v0.0.0-20190523213609-cbe66965904d // indirect
github.com/adlio/trello v1.0.0
github.com/alecthomas/chroma v0.6.3
github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 // indirect
github.com/andygrunwald/go-gerrit v0.0.0-20190625080919-64931d233c2d
bitbucket.org/mikehouston/asana-go v0.0.0-20201102222432-715318d0343a
code.cloudfoundry.org/bytefmt v0.0.0-20190819182555-854d396b647c
github.com/Azure/go-autorest v11.1.2+incompatible // indirect
github.com/Microsoft/go-winio v0.4.14 // indirect
github.com/PagerDuty/go-pagerduty v0.0.0-20191002190746-f60f4fc45222
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/VictorAvelar/devto-api-go v1.0.0
github.com/adlio/trello v1.8.0
github.com/alecthomas/chroma v0.8.1
github.com/andygrunwald/go-gerrit v0.0.0-20190825170856-5959a9bf9ff8
github.com/briandowns/openweathermap v0.0.0-20180804155945-5f41b7c9d92d
github.com/cenkalti/backoff v2.2.0+incompatible // indirect
github.com/darkSasori/todoist v0.0.0-20180703032645-ec6b38b374ab
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
github.com/creack/pty v1.1.11
github.com/digitalocean/godo v1.52.0
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v1.13.1
github.com/docker/docker-credential-helpers v0.6.3
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/dustin/go-humanize v1.0.0
github.com/gdamore/tcell v1.1.4
github.com/gdamore/tcell v1.4.0
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/godbus/dbus v5.0.1+incompatible // indirect
github.com/golang/glog v0.0.0-20170312005925-543a34c32e4d // indirect
github.com/google/go-github/v26 v26.0.9
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/godbus/dbus v4.1.0+incompatible // indirect
github.com/google/go-github/v32 v32.1.0
github.com/gophercloud/gophercloud v0.5.0 // indirect
github.com/hekmon/cunits v2.0.1+incompatible // indirect
github.com/hekmon/transmissionrpc v0.0.0-20190525133028-1d589625bacd
github.com/jedib0t/go-pretty/v6 v6.1.0
github.com/jessevdk/go-flags v1.4.0
github.com/logrusorgru/aurora v0.0.0-20190428105938-cea283e61946
github.com/mattn/go-isatty v0.0.8 // indirect
github.com/mmcdole/gofeed v1.0.0-beta2.0.20190420154928-0e68beaf6fdf
github.com/lib/pq v1.2.0 // indirect
github.com/logrusorgru/aurora v0.0.0-20190803045625-94edacc10f9b
github.com/microsoft/azure-devops-go-api/azuredevops v0.0.0-20191014190507-26902c1d4325
github.com/mmcdole/gofeed v1.1.0
github.com/nicklaw5/helix v0.7.0
github.com/olebedev/config v0.0.0-20190528211619-364964f3a8e4
github.com/pkg/profile v1.3.0
github.com/radovskyb/watcher v1.0.6
github.com/rivo/tview v0.0.0-20190721135419-23dc8a0944e4
github.com/rivo/uniseg v0.1.0 // indirect
github.com/shirou/gopsutil v2.18.12+incompatible
github.com/sticreations/spotigopher v0.0.0-20181009182052-98632f6f94b0
github.com/stretchr/testify v1.3.0
github.com/xanzy/go-gitlab v0.18.0
github.com/yfronto/newrelic v0.0.0-20180622232530-7c9c2852e8f9
github.com/zmb3/spotify v0.0.0-20190520155326-158b1863f5b5
github.com/zorkian/go-datadog-api v2.21.0+incompatible
go.opencensus.io v0.22.0 // indirect
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 // indirect
golang.org/x/net v0.0.0-20190628185345-da137c7871d7 // indirect
golang.org/x/oauth2 v0.0.0-20190614102709-0f29369cfe45
golang.org/x/sync v0.0.0-20190427212804-112230192c58 // indirect
golang.org/x/sys v0.0.0-20190730174312-6a60838ec25 // indirect
golang.org/x/tools v0.0.0-20190710184609-286818132824 // indirect
google.golang.org/api v0.7.0
google.golang.org/appengine v1.6.1 // indirect
google.golang.org/genproto v0.0.0-20190627203621-eb59cef1c072 // indirect
google.golang.org/grpc v1.21.1 // indirect
gopkg.in/jarcoal/httpmock.v1 v1.0.0-20190314184232-a8ac0a50d0b5 // indirect
gopkg.in/yaml.v2 v2.2.2
k8s.io/apimachinery v0.0.0-20190802060556-6fa4771c83b3
k8s.io/client-go v12.0.0+incompatible
github.com/olekukonko/tablewriter v0.0.4
github.com/onsi/ginkgo v1.12.0 // indirect
github.com/onsi/gomega v1.9.0 // indirect
github.com/ovh/cds v0.0.0-20201014170613-39429542624d
github.com/pborman/uuid v1.2.0 // indirect
github.com/piquette/finance-go v1.0.0
github.com/pkg/errors v0.9.1
github.com/pkg/profile v1.5.0
github.com/radovskyb/watcher v1.0.7
github.com/rivo/tview v0.0.0-20200108161608-1316ea7a4b35
github.com/shirou/gopsutil v2.20.9+incompatible
github.com/shopspring/decimal v1.2.0 // indirect
github.com/shurcooL/githubv4 v0.0.0-20200802174311-f27d2ca7f6d5
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f // indirect
github.com/spf13/cobra v0.0.5 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.6.1 // indirect
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect
github.com/stretchr/testify v1.6.1
github.com/wtfutil/spotigopher v0.0.0-20191127141047-7d8168fe103a
github.com/wtfutil/todoist v0.0.2-0.20191216004217-0ec29ceda61a
github.com/xanzy/go-gitlab v0.39.0
github.com/zmb3/spotify v0.0.0-20191010212056-e12fb981aacb
github.com/zorkian/go-datadog-api v2.30.0+incompatible
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208
golang.org/x/text v0.3.4
google.golang.org/api v0.33.0
gopkg.in/jarcoal/httpmock.v1 v1.0.0-20181110093347-3be5f16b70eb // indirect
gopkg.in/yaml.v2 v2.3.0
gotest.tools v2.2.0+incompatible
jaytaylor.com/html2text v0.0.0-20200412013138-3577fbdbcff7
k8s.io/apimachinery v0.0.0-20190223094358-dcb391cde5ca
k8s.io/client-go v10.0.0+incompatible
)
// These hacks are in place to work around this bug in coreos/etcd/proxy/grpcproxy > v1.30.0 that fails
// with this error:
//
// google.golang.org/grpc/naming: module google.golang.org/grpc@latest found (v1.31.1), but does not contain package google.golang.org/grpc/naming
//
// See here for more details: https://github.com/etcd-io/etcd/issues/12124
replace google.golang.org/grpc v1.30.0 => google.golang.org/grpc v1.29.1
replace google.golang.org/grpc v1.31.0 => google.golang.org/grpc v1.29.1

1023
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,11 @@ func Display(moduleName string, cfg *config.Config) {
}
func helpFor(moduleName string, cfg *config.Config) string {
cfg.Set("wtf.mods."+moduleName+".enabled", true)
err := cfg.Set("wtf.mods."+moduleName+".enabled", true)
if err != nil {
return ""
}
widget := app.MakeWidget(nil, nil, moduleName, cfg)
// Since we are forcing enabled config, if no module

BIN
images/logo_transparent.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -4,8 +4,6 @@ import (
"log"
"os"
"path/filepath"
"github.com/wtfutil/wtf/utils"
)
/* -------------------- Exported Functions -------------------- */
@ -19,7 +17,7 @@ func Log(msg string) {
if err != nil {
log.Fatalf("error opening file: %v", err)
}
defer f.Close()
defer func() { _ = f.Close() }()
log.SetOutput(f)
log.Println(msg)
@ -30,7 +28,7 @@ func LogFileMissing() bool {
}
func LogFilePath() string {
dir, err := utils.Home()
dir, err := os.UserHomeDir()
if err != nil {
return ""
}

59
main.go
View File

@ -1,78 +1,65 @@
package main
// Generators
// To generate the skeleton for a new TextWidget use 'WTF_WIDGET_NAME=MySuperAwesomeWidget go generate -run=text
//go:generate -command text go run generator/textwidget.go
//go:generate text
import (
"fmt"
"log"
"os"
// Blank import of tzdata embeds the timezone database to allow Windows hosts to find timezone
// information even if the timezone database is not available on the local system. See release
// notes at https://golang.org/doc/go1.15#time/tzdata for details. This prevents "no timezone
// data available" errors in clocks module.
_ "time/tzdata"
"github.com/logrusorgru/aurora"
"github.com/olebedev/config"
"github.com/pkg/profile"
"github.com/rivo/tview"
"github.com/wtfutil/wtf/app"
"github.com/wtfutil/wtf/cfg"
"github.com/wtfutil/wtf/flags"
"github.com/wtfutil/wtf/utils"
"github.com/wtfutil/wtf/wtf"
)
var tviewApp *tview.Application
var (
commit = "dev"
date = "dev"
version = "dev"
)
/* -------------------- Functions -------------------- */
func setTerm(config *config.Config) {
term := config.UString("wtf.term", os.Getenv("TERM"))
err := os.Setenv("TERM", term)
if err != nil {
fmt.Printf("\n%s Failed to set $TERM to %s.\n", aurora.Red("ERROR"), aurora.Yellow(term))
os.Exit(1)
}
}
/* -------------------- Main -------------------- */
func main() {
log.SetFlags(log.LstdFlags | log.Lshortfile)
// Manage the configuration directories and config file
// Parse and handle flags
flags := flags.NewFlags()
flags.Parse()
hasCustom := flags.HasCustomConfig()
cfg.Initialize(hasCustom)
// Load the configuration file
config := cfg.LoadWtfConfigFile(flags.ConfigFilePath(), hasCustom)
flags.RenderIf(version, config)
cfg.Initialize(flags.HasCustomConfig())
config := cfg.LoadWtfConfigFile(flags.ConfigFilePath())
wtf.SetTerminal(config)
flags.RenderIf(version, date, config)
if flags.Profile {
defer profile.Start(profile.MemProfile).Stop()
}
utils.Init(config.UString("wtf.openFileUtil", "open"))
openFileUtil := config.UString("wtf.openFileUtil", "open")
openURLUtil := utils.ToStrs(config.UList("wtf.openUrlUtil", []interface{}{}))
utils.Init(openFileUtil, openURLUtil)
setTerm(config)
/* Initialize the App Manager */
appMan := app.NewAppManager()
appMan.MakeNewWtfApp(config, flags.Config)
// Build the application
tviewApp = tview.NewApplication()
wtfApp := app.NewWtfApp(tviewApp, config, flags.Config, hasCustom)
wtfApp.Start()
if err := tviewApp.Run(); err != nil {
currentApp, err := appMan.Current()
if err != nil {
fmt.Printf("\n%s %v\n", aurora.Red("ERROR"), err)
os.Exit(1)
}
currentApp.Run()
}

280
modules/asana/client.go Normal file
View File

@ -0,0 +1,280 @@
package asana
import (
"fmt"
"strings"
"time"
asana "bitbucket.org/mikehouston/asana-go"
)
func fetchTasksFromProject(token, projectId, mode string) ([]*TaskItem, error) {
taskItems := []*TaskItem{}
uidToName := make(map[string]string)
client := asana.NewClientWithAccessToken(token)
uid, err := getCurrentUserId(client, mode)
if err != nil {
return nil, err
}
q := &asana.TaskQuery{
Project: projectId,
}
fetchedTasks, _, err := getTasksFromAsana(client, q)
if err != nil {
return nil, fmt.Errorf("error fetching tasks: %s", err)
}
processFetchedTasks(client, &fetchedTasks, &taskItems, &uidToName, mode, projectId, uid)
return taskItems, nil
}
func fetchTasksFromProjectSections(token, projectId string, sections []string, mode string) ([]*TaskItem, error) {
taskItems := []*TaskItem{}
uidToName := make(map[string]string)
client := asana.NewClientWithAccessToken(token)
uid, err := getCurrentUserId(client, mode)
if err != nil {
return nil, err
}
p := &asana.Project{
ID: projectId,
}
for _, section := range sections {
sectionId, err := findSection(client, p, section)
if err != nil {
return nil, fmt.Errorf("error fetching tasks: %s", err)
}
q := &asana.TaskQuery{
Section: sectionId,
}
fetchedTasks, _, err := getTasksFromAsana(client, q)
if err != nil {
return nil, fmt.Errorf("error fetching tasks: %s", err)
}
if len(fetchedTasks) > 0 {
taskItem := &TaskItem{
name: section,
taskType: TASK_SECTION,
}
taskItems = append(taskItems, taskItem)
}
processFetchedTasks(client, &fetchedTasks, &taskItems, &uidToName, mode, projectId, uid)
}
return taskItems, nil
}
func fetchTasksFromWorkspace(token, workspaceId, mode string) ([]*TaskItem, error) {
taskItems := []*TaskItem{}
uidToName := make(map[string]string)
client := asana.NewClientWithAccessToken(token)
uid, err := getCurrentUserId(client, mode)
if err != nil {
return nil, err
}
q := &asana.TaskQuery{
Workspace: workspaceId,
Assignee: "me",
}
fetchedTasks, _, err := getTasksFromAsana(client, q)
if err != nil {
return nil, fmt.Errorf("error fetching tasks: %s", err)
}
processFetchedTasks(client, &fetchedTasks, &taskItems, &uidToName, mode, workspaceId, uid)
return taskItems, nil
}
func toggleTaskCompletionById(token, taskId string) error {
client := asana.NewClientWithAccessToken(token)
t := &asana.Task{
ID: taskId,
}
err := t.Fetch(client)
if err != nil {
return fmt.Errorf("error fetching task: %s", err)
}
updateReq := &asana.UpdateTaskRequest{}
if *t.Completed {
f := false
updateReq.Completed = &f
} else {
t := true
updateReq.Completed = &t
}
err = t.Update(client, updateReq)
if err != nil {
return fmt.Errorf("error updating task: %s", err)
}
return nil
}
func processFetchedTasks(client *asana.Client, fetchedTasks *[]*asana.Task, taskItems *[]*TaskItem, uidToName *map[string]string, mode, projectId, uid string) {
for _, task := range *fetchedTasks {
switch {
case strings.HasSuffix(mode, "_all"):
if task.Assignee != nil {
// Check if we have already looked up this user
if assigneeName, ok := (*uidToName)[task.Assignee.ID]; ok {
task.Assignee.Name = assigneeName
} else {
// We haven't looked up this user before, perform the lookup now
assigneeName, err := getOtherUserEmail(client, task.Assignee.ID)
if err != nil {
task.Assignee.Name = "Error"
}
(*uidToName)[task.Assignee.ID] = assigneeName
task.Assignee.Name = assigneeName
}
} else {
task.Assignee = &asana.User{
Name: "Unassigned",
}
}
taskItem := buildTaskItem(task, projectId)
(*taskItems) = append((*taskItems), taskItem)
case !strings.HasSuffix(mode, "_all") && task.Assignee != nil && task.Assignee.ID == uid:
taskItem := buildTaskItem(task, projectId)
(*taskItems) = append((*taskItems), taskItem)
}
}
}
func buildTaskItem(task *asana.Task, projectId string) *TaskItem {
dueOnString := ""
if task.DueOn != nil {
dueOn := time.Time(*task.DueOn)
currentYear, _, _ := time.Now().Date()
if currentYear != dueOn.Year() {
dueOnString = dueOn.Format("Jan 2 2006")
} else {
dueOnString = dueOn.Format("Jan 2")
}
}
assignString := ""
if task.Assignee != nil {
assignString = task.Assignee.Name
}
taskItem := &TaskItem{
name: task.Name,
id: task.ID,
numSubtasks: task.NumSubtasks,
dueOn: dueOnString,
url: fmt.Sprintf("https://app.asana.com/0/%s/%s/f", projectId, task.ID),
taskType: TASK_TYPE,
completed: *task.Completed,
assignee: assignString,
}
return taskItem
}
func getOtherUserEmail(client *asana.Client, uid string) (string, error) {
if uid == "" {
return "", fmt.Errorf("missing uid")
}
u := &asana.User{
ID: uid,
}
err := u.Fetch(client, nil)
if err != nil {
return "", fmt.Errorf("error fetching user: %s", err)
}
return u.Email, nil
}
func getCurrentUserId(client *asana.Client, mode string) (string, error) {
if strings.HasSuffix(mode, "_all") {
return "", nil
}
u, err := client.CurrentUser()
if err != nil {
return "", fmt.Errorf("error getting current user: %s", err)
}
return u.ID, nil
}
func findSection(client *asana.Client, project *asana.Project, sectionName string) (string, error) {
sectionId := ""
sections, _, err := project.Sections(client, &asana.Options{
Limit: 100,
})
if err != nil {
return "", fmt.Errorf("error getting sections: %s", err)
}
for _, section := range sections {
if section.Name == sectionName {
sectionId = section.ID
break
}
}
if sectionId == "" {
return "", fmt.Errorf("we didn't find the section %s", sectionName)
}
return sectionId, nil
}
func getTasksFromAsana(client *asana.Client, q *asana.TaskQuery) ([]*asana.Task, bool, error) {
moreTasks := false
tasks, np, err := client.QueryTasks(q, &asana.Options{
Limit: 100,
Fields: []string{
"assignee",
"name",
"num_subtasks",
"due_on",
"completed",
},
})
if err != nil {
return nil, false, fmt.Errorf("error querying tasks: %s", err)
}
if np != nil {
moreTasks = true
}
return tasks, moreTasks, nil
}

20
modules/asana/keyboard.go Normal file
View File

@ -0,0 +1,20 @@
package asana
import "github.com/gdamore/tcell"
func (widget *Widget) initializeKeyboardControls() {
widget.InitializeHelpTextKeyboardControl(widget.ShowHelp)
widget.InitializeRefreshKeyboardControl(widget.Refresh)
widget.SetKeyboardChar("j", widget.Next, "Select next task")
widget.SetKeyboardChar("k", widget.Prev, "Select previous task")
widget.SetKeyboardChar("q", widget.Unselect, "Unselect task")
widget.SetKeyboardChar("o", widget.openTask, "Open task in browser")
widget.SetKeyboardChar("x", widget.toggleTaskCompletion, "Toggles the task's completion state")
widget.SetKeyboardChar("?", widget.ShowHelp, "Shows help")
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next task")
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous task")
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Unselect task")
widget.SetKeyboardKey(tcell.KeyEnter, widget.openTask, "Open task in browser")
}

48
modules/asana/settings.go Normal file
View File

@ -0,0 +1,48 @@
package asana
import (
"github.com/olebedev/config"
"github.com/wtfutil/wtf/cfg"
"github.com/wtfutil/wtf/utils"
)
const (
defaultFocusable = true
defaultTitle = "Asana"
)
type Settings struct {
*cfg.Common
projectId string `help:"The Asana Project ID. If the mode is 'project' or 'project_sections' this is required to known which Asana Project to pull your tasks from" values:"A valid Asana Project ID string" optional:"true"`
workspaceId string `help:"The Asana Workspace ID. If mode is 'workspace' this is required" values:"A valid Asana Workspace ID string" optional:"true"`
sections []string `help:"The Asana Section Labels to fetch from the Project. Required if the mode is 'project_sections'" values:"An array of Asana Section Label strings" optional:"true"`
allUsers bool `help:"Fetch tasks for all users, defaults to false" values:"bool" optional:"true"`
mode string `help:"What mode to query Asana, 'project', 'project_sections', 'workspace'" values:"A string with either 'project', 'project_sections' or 'workspace'"`
hideComplete bool `help:"Hide completed tasks, defaults to false" values:"bool" optional:"true"`
apiKey string `help:"Your Asana Personal Access Token. Leave this blank to use the WTF_ASANA_TOKEN environment variable." values:"Your Asana Personal Access Token as a string" optional:"true"`
token string
}
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
settings := Settings{
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig,
globalConfig),
projectId: ymlConfig.UString("projectId", ""),
apiKey: ymlConfig.UString("apiKey", ""),
workspaceId: ymlConfig.UString("workspaceId", ""),
sections: utils.ToStrs(ymlConfig.UList("sections")),
allUsers: ymlConfig.UBool("allUsers", false),
mode: ymlConfig.UString("mode", ""),
hideComplete: ymlConfig.UBool("hideComplete", false),
}
return &settings
}

259
modules/asana/widget.go Normal file
View File

@ -0,0 +1,259 @@
package asana
import (
"fmt"
"os"
"strings"
"sync"
"github.com/rivo/tview"
"github.com/wtfutil/wtf/utils"
"github.com/wtfutil/wtf/view"
)
type TaskType int
const (
TASK_TYPE TaskType = iota
TASK_SECTION
TASK_BREAK
)
type TaskItem struct {
name string
numSubtasks int32
dueOn string
id string
url string
taskType TaskType
completed bool
assignee string
}
type Widget struct {
view.ScrollableWidget
tasks []*TaskItem
mu sync.Mutex
err error
settings *Settings
tviewApp *tview.Application
}
func NewWidget(tviewApp *tview.Application, pages *tview.Pages, settings *Settings) *Widget {
widget := &Widget{
ScrollableWidget: view.NewScrollableWidget(tviewApp, pages, settings.Common),
tviewApp: tviewApp,
settings: settings,
}
widget.SetRenderFunction(widget.Render)
widget.initializeKeyboardControls()
return widget
}
/* -------------------- Exported Functions -------------------- */
func (widget *Widget) Refresh() {
widget.tasks = nil
widget.err = nil
widget.SetItemCount(0)
widget.mu.Lock()
defer widget.mu.Unlock()
tasks, err := widget.Fetch(
widget.settings.workspaceId,
widget.settings.projectId,
widget.settings.mode,
widget.settings.sections,
widget.settings.allUsers,
)
if err != nil {
widget.err = err
} else {
widget.tasks = tasks
widget.SetItemCount(len(tasks))
}
widget.Render()
}
func (widget *Widget) Render() {
widget.Redraw(widget.content)
}
func (widget *Widget) Fetch(workspaceId, projectId, mode string, sections []string, allUsers bool) ([]*TaskItem, error) {
availableModes := map[string]interface{}{
"project": nil,
"project_sections": nil,
"workspace": nil,
}
if _, ok := availableModes[mode]; !ok {
return nil, fmt.Errorf("missing mode, or mode is invalid - please set to project, project_sections or workspace")
}
if widget.settings.apiKey != "" {
widget.settings.token = widget.settings.apiKey
} else {
widget.settings.token = os.Getenv("WTF_ASANA_TOKEN")
}
if widget.settings.token == "" {
return nil, fmt.Errorf("missing environment variable token or apikey config")
}
subMode := mode
if allUsers && mode != "workspace" {
subMode += "_all"
}
if projectId == "" && strings.HasPrefix(subMode, "project") {
return nil, fmt.Errorf("missing project id")
}
if workspaceId == "" && subMode == "workspace" {
return nil, fmt.Errorf("missing workspace id")
}
var tasks []*TaskItem
var err error
switch {
case strings.HasPrefix(subMode, "project_sections"):
tasks, err = fetchTasksFromProjectSections(widget.settings.token, projectId, sections, subMode)
case strings.HasPrefix(subMode, "project"):
tasks, err = fetchTasksFromProject(widget.settings.token, projectId, subMode)
case subMode == "workspace":
tasks, err = fetchTasksFromWorkspace(widget.settings.token, workspaceId, subMode)
default:
err = fmt.Errorf("no mode found")
}
if err != nil {
return nil, err
}
return tasks, nil
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) content() (string, string, bool) {
title := widget.CommonSettings().Title
if widget.err != nil {
return title, widget.err.Error(), true
}
data := widget.tasks
if len(data) == 0 {
return title, "No data", false
}
var str string
for idx, taskItem := range data {
switch {
case taskItem.taskType == TASK_TYPE:
if widget.settings.hideComplete && taskItem.completed {
continue
}
rowColor := widget.RowColor(idx)
completed := "[ []"
if taskItem.completed {
completed = "[x[]"
}
row := ""
if widget.settings.allUsers && taskItem.assignee != "" {
row = fmt.Sprintf(
"[%s] %s %s: %s",
rowColor,
completed,
taskItem.assignee,
taskItem.name,
)
} else {
row = fmt.Sprintf(
"[%s] %s %s",
rowColor,
completed,
taskItem.name,
)
}
if taskItem.numSubtasks > 0 {
row += fmt.Sprintf(" (%d)", taskItem.numSubtasks)
}
if taskItem.dueOn != "" {
row += fmt.Sprintf(" due: %s", taskItem.dueOn)
}
row += " [white]"
str += utils.HighlightableHelper(widget.View, row, idx, len(taskItem.name))
case taskItem.taskType == TASK_SECTION:
if idx > 1 {
row := "[white] "
str += utils.HighlightableHelper(widget.View, row, idx, len(taskItem.name))
}
row := fmt.Sprintf(
"[white] %s [white]",
taskItem.name,
)
str += utils.HighlightableHelper(widget.View, row, idx, len(taskItem.name))
row = "[white] "
str += utils.HighlightableHelper(widget.View, row, idx, len(taskItem.name))
}
}
return title, str, false
}
func (widget *Widget) openTask() {
sel := widget.GetSelected()
if sel >= 0 && widget.tasks != nil && sel < len(widget.tasks) {
task := widget.tasks[sel]
if task.taskType == TASK_TYPE && task.url != "" {
utils.OpenFile(task.url)
}
}
}
func (widget *Widget) toggleTaskCompletion() {
sel := widget.GetSelected()
if sel >= 0 && widget.tasks != nil && sel < len(widget.tasks) {
task := widget.tasks[sel]
if task.taskType == TASK_TYPE {
widget.mu.Lock()
err := toggleTaskCompletionById(widget.settings.token, task.id)
if err != nil {
widget.err = err
}
widget.mu.Unlock()
widget.Refresh()
}
}
}

View File

@ -0,0 +1,59 @@
package azuredevops
import (
"fmt"
"strings"
azrBuild "github.com/microsoft/azure-devops-go-api/azuredevops/build"
"github.com/pkg/errors"
)
func (widget *Widget) getBuildStats() string {
projName := widget.settings.projectName
statusFilter := azrBuild.BuildStatusValues.All
top := widget.settings.maxRows
builds, err := widget.cli.GetBuilds(widget.ctx, azrBuild.GetBuildsArgs{Project: &projName, StatusFilter: &statusFilter, Top: &top})
if err != nil {
return errors.Wrap(err, "could not get builds").Error()
}
result := ""
for _, build := range builds.Value {
num := *build.BuildNumber
branch := *build.SourceBranch
reason := *build.Reason
triggers := *build.TriggerInfo
if reason == azrBuild.BuildReasonValues.PullRequest {
branch = triggers["pr.sourceBranch"]
}
branch = strings.TrimPrefix(branch, "refs/heads/")
status := *build.Status
statusDisplay := "[white:grey]unknown"
if status == azrBuild.BuildStatusValues.InProgress {
statusDisplay = "[white:blue]in progress"
} else if status == azrBuild.BuildStatusValues.Cancelling {
statusDisplay = "[white:orange]in cancelling"
} else if (status == azrBuild.BuildStatusValues.Postponed) || (status == azrBuild.BuildStatusValues.NotStarted) {
statusDisplay = "[white:blue]waiting"
} else if status == azrBuild.BuildStatusValues.Completed {
buildResult := *build.Result
if buildResult == azrBuild.BuildResultValues.Succeeded {
statusDisplay = "[white:green]succeeded"
} else if buildResult == azrBuild.BuildResultValues.Failed {
statusDisplay = "[white:red]failed"
} else if buildResult == azrBuild.BuildResultValues.Canceled {
statusDisplay = "[white:darkgrey]cancelled"
} else if buildResult == azrBuild.BuildResultValues.PartiallySucceeded {
statusDisplay = "[white:magenta]partially"
}
}
result += fmt.Sprintf("%s[-:-:-] #%s %s (%s) \n", statusDisplay, num, branch, reason)
}
if result == "" {
result = "no builds found"
}
return result
}

View File

@ -0,0 +1,42 @@
wtf:
colors:
# background: black
# foreground: blue
border:
focusable: darkslateblue
focused: orange
normal: gray
checked: yellow
highlight:
fore: black
back: gray
rows:
even: yellow
odd: white
grid:
# How _wide_ the columns are, in terminal characters. In this case we have
# four columns, each of which are 35 characters wide.
# columns: [50, ]
# How _high_ the rows are, in terminal lines. In this case we have four rows
# that support ten line of text and one of four.
# rows: [50]
refreshInterval: 1
openFileUtil: "open"
mods:
azuredevops:
type: azuredevops
title: "💻"
enabled: true
position:
top: 0
left: 0
height: 3
width: 3
refreshInterval: 1
labelColor: lightblue # title label color (optional / default: white)
apiToken: "mysecret api token" # api key (required)
orgUrl: "https://dev.azure.com/myawesomecompany/" # url to your azure devops project (required)
prjectName: "the awesome project" # name of your project (required)
maxRows: 3 #max rows to show (optional / default 3)

View File

@ -0,0 +1,42 @@
package azuredevops
import (
"os"
"github.com/olebedev/config"
"github.com/wtfutil/wtf/cfg"
)
const (
defaultFocus = false
defaultTitle = "azuredevops"
)
// Settings defines the configuration options for this module
type Settings struct {
*cfg.Common
apiToken string `help:"Your Azure DevOps Access Token."`
labelColor string
maxRows int
orgURL string `help:"Your Azure DevOps organization URL."`
projectName string
}
// NewSettingsFromYAML creates and returns an instance of Settings with configuration options populated
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
settings := Settings{
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocus, ymlConfig, globalConfig),
apiToken: ymlConfig.UString("apiToken", os.Getenv("WTF_AZURE_DEVOPS_API_TOKEN")),
labelColor: ymlConfig.UString("labelColor", "white"),
maxRows: ymlConfig.UInt("maxRows", 3),
orgURL: ymlConfig.UString("orgURL", os.Getenv("WTF_AZURE_DEVOPS_ORG_URL")),
projectName: ymlConfig.UString("projectName", os.Getenv("WTF_AZURE_DEVOPS_PROJECT_NAME")),
}
cfg.ModuleSecret(name, globalConfig, &settings.apiToken).
Service(settings.orgURL).Load()
return &settings
}

View File

@ -0,0 +1,66 @@
package azuredevops
import (
"context"
"fmt"
azr "github.com/microsoft/azure-devops-go-api/azuredevops"
azrBuild "github.com/microsoft/azure-devops-go-api/azuredevops/build"
"github.com/pkg/errors"
"github.com/rivo/tview"
"github.com/wtfutil/wtf/view"
)
type Widget struct {
view.TextWidget
cli azrBuild.Client
settings *Settings
displayBuffer string
ctx context.Context
}
func NewWidget(tviewApp *tview.Application, pages *tview.Pages, settings *Settings) *Widget {
widget := Widget{
TextWidget: view.NewTextWidget(tviewApp, pages, settings.Common),
settings: settings,
}
widget.View.SetScrollable(true)
connection := azr.NewPatConnection(settings.orgURL, settings.apiToken)
ctx := context.Background()
cli, err := azrBuild.NewClient(ctx, connection)
if err != nil {
widget.displayBuffer = errors.Wrap(err, "could not create client 2").Error()
} else {
widget.cli = cli
widget.ctx = ctx
}
widget.refreshDisplayBuffer()
return &widget
}
func (widget *Widget) Refresh() {
widget.refreshDisplayBuffer()
widget.Redraw(widget.display)
}
func (widget *Widget) display() (string, string, bool) {
return widget.CommonSettings().Title, widget.displayBuffer, true
}
func (widget *Widget) refreshDisplayBuffer() {
if widget.cli == nil {
return
}
widget.displayBuffer = ""
widget.displayBuffer += fmt.Sprintf("[%s::bul] build status - %s\n",
widget.settings.labelColor,
widget.settings.projectName)
widget.displayBuffer += widget.getBuildStats()
}

View File

@ -18,7 +18,7 @@ func Request(apiKey string, apiURL string) ([]byte, error) {
if err != nil {
return nil, err
}
defer resp.Body.Close()
defer func() { _ = resp.Body.Close() }()
data, err := ParseBody(resp)
if err != nil {

View File

@ -7,10 +7,13 @@ import (
"github.com/wtfutil/wtf/cfg"
)
const defaultTitle = "BambooHR"
const (
defaultFocusable = false
defaultTitle = "BambooHR"
)
type Settings struct {
common *cfg.Common
*cfg.Common
apiKey string `help:"Your BambooHR API token."`
subdomain string `help:"Your BambooHR API subdomain name."`
@ -18,11 +21,13 @@ type Settings struct {
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
settings := Settings{
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, ymlConfig, globalConfig),
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
apiKey: ymlConfig.UString("apiKey", os.Getenv("WTF_BAMBOO_HR_TOKEN")),
apiKey: ymlConfig.UString("apiKey", ymlConfig.UString("apikey", os.Getenv("WTF_BAMBOO_HR_TOKEN"))),
subdomain: ymlConfig.UString("subdomain", os.Getenv("WTF_BAMBOO_HR_SUBDOMAIN")),
}
cfg.ModuleSecret(name, globalConfig, &settings.apiKey).Load()
return &settings
}

View File

@ -10,17 +10,18 @@ import (
"github.com/wtfutil/wtf/wtf"
)
const APIURI = "https://api.bamboohr.com/api/gateway.php"
const apiURI = "https://api.bamboohr.com/api/gateway.php"
type Widget struct {
view.TextWidget
settings *Settings
items []Item
}
func NewWidget(app *tview.Application, settings *Settings) *Widget {
func NewWidget(tviewApp *tview.Application, settings *Settings) *Widget {
widget := Widget{
TextWidget: view.NewTextWidget(app, settings.common, false),
TextWidget: view.NewTextWidget(tviewApp, nil, settings.Common),
settings: settings,
}
@ -32,33 +33,33 @@ func NewWidget(app *tview.Application, settings *Settings) *Widget {
func (widget *Widget) Refresh() {
client := NewClient(
APIURI,
apiURI,
widget.settings.apiKey,
widget.settings.subdomain,
)
todayItems := client.Away(
widget.items = client.Away(
"timeOff",
time.Now().Local().Format(wtf.DateFormat),
time.Now().Local().Format(wtf.DateFormat),
)
widget.Redraw(widget.CommonSettings().Title, widget.contentFrom(todayItems), false)
widget.Redraw(widget.content)
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) contentFrom(items []Item) string {
if len(items) == 0 {
return fmt.Sprintf("\n\n\n\n\n\n\n\n%s", utils.CenterText("[grey]no one[white]", 50))
}
func (widget *Widget) content() (string, string, bool) {
str := ""
for _, item := range items {
str += widget.format(item)
if len(widget.items) == 0 {
str = fmt.Sprintf("\n\n\n\n\n\n\n\n%s", utils.CenterText("[grey]no one[white]", 50))
} else {
for _, item := range widget.items {
str += widget.format(item)
}
}
return str
return widget.CommonSettings().Title, str, false
}
func (widget *Widget) format(item Item) string {

View File

@ -5,15 +5,18 @@ import (
"github.com/wtfutil/wtf/cfg"
)
const defaultTitle = "Bargraph"
const (
defaultFocusable = false
defaultTitle = "Bargraph"
)
type Settings struct {
common *cfg.Common
*cfg.Common
}
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
settings := Settings{
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, ymlConfig, globalConfig),
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
}
return &settings

View File

@ -5,29 +5,27 @@ This is a demo bargraph that just populates some random date/val data
*/
import (
"github.com/rivo/tview"
"math/rand"
"time"
"github.com/rivo/tview"
"github.com/wtfutil/wtf/view"
)
var started = false
var ok = true
// Widget define wtf widget to register widget later
type Widget struct {
view.BarGraph
app *tview.Application
tviewApp *tview.Application
}
// NewWidget Make new instance of widget
func NewWidget(app *tview.Application, settings *Settings) *Widget {
func NewWidget(tviewApp *tview.Application, settings *Settings) *Widget {
widget := Widget{
BarGraph: view.NewBarGraph(app, "Sample Bar Graph", settings.common, false),
BarGraph: view.NewBarGraph(tviewApp, "Sample Bar Graph", settings.Common),
app: app,
tviewApp: tviewApp,
}
widget.View.SetWrap(true)
@ -47,11 +45,12 @@ func MakeGraph(widget *Widget) {
barTime := time.Now()
for i := 0; i < lineCount; i++ {
barTime = barTime.Add(time.Duration(time.Minute))
barTime = barTime.Add(time.Minute)
bar := view.Bar{
Label: barTime.Format("15:04"),
Percent: rand.Intn(100-5) + 5,
Label: barTime.Format("15:04"),
Percent: rand.Intn(100-5) + 5,
LabelColor: "red",
}
stats[i] = bar
@ -70,7 +69,7 @@ func (widget *Widget) Refresh() {
widget.View.Clear()
widget.app.QueueUpdateDraw(func() {
widget.tviewApp.QueueUpdateDraw(func() {
display(widget)
})

108
modules/buildkite/client.go Normal file
View File

@ -0,0 +1,108 @@
package buildkite
import (
"fmt"
"net/http"
"github.com/wtfutil/wtf/utils"
)
type Pipeline struct {
Slug string `json:"slug"`
}
type Build struct {
State string `json:"state"`
Pipeline Pipeline `json:"pipeline"`
Branch string `json:"branch"`
WebUrl string `json:"web_url"`
}
func (widget *Widget) getBuilds() ([]Build, error) {
builds := []Build{}
for _, pipeline := range widget.settings.pipelines {
buildsForPipeline, err := widget.recentBuilds(pipeline)
if err != nil {
return nil, err
}
mostRecent := mostRecentBuildForBranches(buildsForPipeline, pipeline.branches)
builds = append(builds, mostRecent...)
}
return builds, nil
}
func (widget *Widget) recentBuilds(pipeline PipelineSettings) ([]Build, error) {
url := fmt.Sprintf(
"https://api.buildkite.com/v2/organizations/%s/pipelines/%s/builds%s",
widget.settings.orgSlug,
pipeline.slug,
branchesQuery(pipeline.branches),
)
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return nil, err
}
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", widget.settings.apiKey))
httpClient := &http.Client{Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
}}
resp, err := httpClient.Do(req)
if err != nil {
return nil, err
}
defer func() { _ = resp.Body.Close() }()
if resp.StatusCode < 200 || resp.StatusCode > 299 {
return nil, fmt.Errorf(resp.Status)
}
builds := []Build{}
err = utils.ParseJSON(&builds, resp.Body)
if err != nil {
return nil, err
}
return builds, nil
}
func branchesQuery(branches []string) string {
if len(branches) == 0 {
return ""
}
if len(branches) == 1 {
return fmt.Sprintf("?branch=%s", branches[0])
}
queryString := fmt.Sprintf("?branch[]=%s", branches[0])
for _, branch := range branches[1:] {
queryString += fmt.Sprintf("&branch[]=%s", branch)
}
return queryString
}
func mostRecentBuildForBranches(builds []Build, branches []string) []Build {
recentBuilds := []Build{}
haveMostRecentBuildForBranch := map[string]bool{}
for _, branch := range branches {
haveMostRecentBuildForBranch[branch] = false
}
for _, build := range builds {
if !haveMostRecentBuildForBranch[build.Branch] {
haveMostRecentBuildForBranch[build.Branch] = true
recentBuilds = append(recentBuilds, build)
}
}
return recentBuilds
}

View File

@ -0,0 +1,6 @@
package buildkite
func (widget *Widget) initializeKeyboardControls() {
widget.InitializeHelpTextKeyboardControl(widget.ShowHelp)
widget.InitializeRefreshKeyboardControl(widget.Refresh)
}

View File

@ -0,0 +1,120 @@
package buildkite
import (
"fmt"
"sort"
"strings"
)
type pipelinesDisplayData struct {
buildsForPipeline map[string][]Build
orderedPipelines []string
}
func (data *pipelinesDisplayData) Content() string {
maxPipelineLength := getLongestLength(data.orderedPipelines)
str := ""
for _, pipeline := range data.orderedPipelines {
str += fmt.Sprintf("[white]%s", padRight(pipeline, maxPipelineLength))
for _, build := range data.buildsForPipeline[pipeline] {
str += fmt.Sprintf(" [%s]%s[white]", buildColor(build.State), build.Branch)
}
str += "\n"
}
return str
}
func NewPipelinesDisplayData(builds []Build) pipelinesDisplayData {
grouped := make(map[string][]Build)
for _, build := range builds {
if _, ok := grouped[build.Pipeline.Slug]; ok {
grouped[build.Pipeline.Slug] = append(grouped[build.Pipeline.Slug], build)
} else {
grouped[build.Pipeline.Slug] = []Build{}
grouped[build.Pipeline.Slug] = append(grouped[build.Pipeline.Slug], build)
}
}
orderedPipelines := make([]string, len(grouped))
i := 0
for pipeline := range grouped {
orderedPipelines[i] = pipeline
i++
}
sort.Strings(orderedPipelines)
name := func(b1, b2 *Build) bool {
return b1.Branch < b2.Branch
}
for _, builds := range grouped {
ByBuild(name).Sort(builds)
}
return pipelinesDisplayData{
buildsForPipeline: grouped,
orderedPipelines: orderedPipelines,
}
}
type ByBuild func(b1, b2 *Build) bool
func (by ByBuild) Sort(builds []Build) {
sorter := &buildSorter{
builds: builds,
by: by,
}
sort.Sort(sorter)
}
type buildSorter struct {
builds []Build
by func(b1, b2 *Build) bool
}
func (bs *buildSorter) Len() int {
return len(bs.builds)
}
func (bs *buildSorter) Swap(i, j int) {
bs.builds[i], bs.builds[j] = bs.builds[j], bs.builds[i]
}
func (bs *buildSorter) Less(i, j int) bool {
return bs.by(&bs.builds[i], &bs.builds[j])
}
func getLongestLength(strs []string) int {
longest := 0
for _, str := range strs {
if len(str) > longest {
longest = len(str)
}
}
return longest
}
func padRight(text string, length int) string {
padLength := length - len(text)
if padLength <= 0 {
return text[:length]
}
return text + strings.Repeat(" ", padLength)
}
func buildColor(state string) string {
switch state {
case "passed":
return "green"
case "failed":
return "red"
default:
return "yellow"
}
}

View File

@ -0,0 +1,66 @@
package buildkite
import (
"os"
"github.com/olebedev/config"
"github.com/wtfutil/wtf/cfg"
"github.com/wtfutil/wtf/utils"
)
const (
defaultTitle = "Buildkite"
defaultFocusable = true
)
// PipelineSettings defines the configuration properties for a pipeline
type PipelineSettings struct {
slug string
branches []string
}
// Settings defines the configuration properties for this module
type Settings struct {
*cfg.Common
apiKey string `help:"Your Buildkite API Token"`
orgSlug string `help:"Organization Slug"`
pipelines []PipelineSettings `help:"An array of pipelines to get data from"`
}
// NewSettingsFromYAML creates a new settings instance from a YAML config block
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
settings := Settings{
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
apiKey: ymlConfig.UString("apiKey", os.Getenv("WTF_BUILDKITE_TOKEN")),
orgSlug: ymlConfig.UString("organizationSlug"),
pipelines: buildPipelineSettings(ymlConfig),
}
cfg.ModuleSecret(name, globalConfig, &settings.apiKey).Load()
return &settings
}
/* -------------------- Unexported Functions -------------------- */
func buildPipelineSettings(ymlConfig *config.Config) []PipelineSettings {
pipelines := []PipelineSettings{}
for slug := range ymlConfig.UMap("pipelines") {
branches := utils.ToStrs(ymlConfig.UList("pipelines." + slug + ".branches"))
if len(branches) == 0 {
branches = []string{"master"}
}
pipeline := PipelineSettings{
slug: slug,
branches: branches,
}
pipelines = append(pipelines, pipeline)
}
return pipelines
}

View File

@ -0,0 +1,63 @@
package buildkite
import (
"fmt"
"github.com/rivo/tview"
"github.com/wtfutil/wtf/view"
)
type Widget struct {
view.TextWidget
settings *Settings
builds []Build
err error
}
func NewWidget(tviewApp *tview.Application, pages *tview.Pages, settings *Settings) *Widget {
widget := Widget{
TextWidget: view.NewTextWidget(tviewApp, pages, settings.Common),
settings: settings,
}
widget.initializeKeyboardControls()
widget.View.SetScrollable(true)
return &widget
}
/* -------------------- Exported Functions -------------------- */
func (widget *Widget) Refresh() {
builds, err := widget.getBuilds()
if err != nil {
widget.err = err
widget.builds = nil
} else {
widget.builds = builds
widget.err = nil
}
// The last call should always be to the display function
widget.display()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) display() {
widget.Redraw(widget.content)
}
func (widget *Widget) content() (string, string, bool) {
title := fmt.Sprintf("%s - [green]%s", widget.CommonSettings().Title, widget.settings.orgSlug)
if widget.err != nil {
return title, widget.err.Error(), true
}
displayData := NewPipelinesDisplayData(widget.builds)
return title, displayData.Content(), false
}

View File

@ -0,0 +1,92 @@
package cdsfavorites
import (
"fmt"
"github.com/ovh/cds/sdk"
)
func (widget *Widget) display() {
widget.TextWidget.Redraw(widget.content)
}
func (widget *Widget) content() (string, string, bool) {
if len(widget.View.GetHighlights()) > 0 {
widget.View.ScrollToHighlight()
} else {
widget.View.ScrollToBeginning()
}
widget.Items = make([]int64, 0)
workflow := widget.currentCDSWorkflow()
if workflow == nil {
return "", " Workflow not selected ", false
}
_, _, width, _ := widget.View.GetRect()
str := widget.settings.PaginationMarker(len(widget.workflows), widget.Idx, width) + "\n"
title := fmt.Sprintf("%s - %s", widget.CommonSettings().Title, widget.title(workflow))
str += widget.displayWorkflowRuns(workflow)
return title, str, false
}
func (widget *Widget) title(workflow *sdk.Workflow) string {
return fmt.Sprintf(
"[%s]%s/%s[white]",
widget.settings.Colors.TextTheme.Title,
workflow.ProjectKey, workflow.Name,
)
}
func (widget *Widget) displayWorkflowRuns(workflow *sdk.Workflow) string {
runs, _ := widget.client.WorkflowRunList(workflow.ProjectKey, workflow.Name, 0, 16)
widget.SetItemCount(len(runs))
if len(runs) == 0 {
return " [grey]none[white]\n"
}
content := ""
for idx, run := range runs {
var tags string
for _, tag := range run.Tags {
toadd := true
for _, v := range widget.settings.hideTags {
if v == tag.Tag {
toadd = false
break
}
}
if toadd {
tags = fmt.Sprintf("%s%s:%s ", tags, tag.Tag, tag.Value)
}
}
content += fmt.Sprintf(`[%s]["%d"]%d %-6s[""][gray] %s`, getStatusColor(run.Status), idx, run.Number, run.Status, tags)
content += "\n"
widget.Items = append(widget.Items, run.Number)
}
return content
}
func getStatusColor(status string) string {
switch status {
case sdk.StatusSuccess:
return "green"
case sdk.StatusBuilding, sdk.StatusWaiting:
return "blue"
case sdk.StatusFail:
return "red"
case sdk.StatusStopped:
return "red"
case sdk.StatusSkipped:
return "grey"
case sdk.StatusDisabled:
return "grey"
}
return "red"
}

View File

@ -0,0 +1,23 @@
package cdsfavorites
import (
"github.com/gdamore/tcell"
)
func (widget *Widget) initializeKeyboardControls() {
widget.InitializeHelpTextKeyboardControl(widget.ShowHelp)
widget.InitializeRefreshKeyboardControl(widget.Refresh)
widget.SetKeyboardChar("j", widget.Next, "Select next workflow")
widget.SetKeyboardChar("k", widget.Prev, "Select previous workflow")
widget.SetKeyboardChar("l", widget.NextSource, "Select next source")
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous source")
widget.SetKeyboardChar("o", widget.openWorkflow, "Open workflow in browser")
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next workflow")
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous workflow")
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next source")
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous source")
widget.SetKeyboardKey(tcell.KeyEnter, widget.openWorkflow, "Open workflow in browser")
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
}

View File

@ -0,0 +1,39 @@
package cdsfavorites
import (
"os"
"github.com/olebedev/config"
"github.com/wtfutil/wtf/cfg"
"github.com/wtfutil/wtf/utils"
)
const (
defaultFocusable = true
defaultTitle = "CDS Favorites"
)
// Settings defines the configuration properties for this module
type Settings struct {
*cfg.Common
token string `help:"Your CDS API token."`
apiURL string `help:"Your CDS API URL."`
uiURL string
hideTags []string `help:"Hide some workflow tags."`
}
// NewSettingsFromYAML creates a new settings instance from a YAML config block
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
settings := Settings{
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
token: ymlConfig.UString("token", ymlConfig.UString("token", os.Getenv("CDS_TOKEN"))),
apiURL: ymlConfig.UString("apiURL", os.Getenv("CDS_API_URL")),
hideTags: utils.ToStrs(ymlConfig.UList("hideTags")),
}
settings.SetDocumentationPath("cds/favorites")
return &settings
}

View File

@ -0,0 +1,143 @@
package cdsfavorites
import (
"fmt"
"strconv"
"github.com/ovh/cds/sdk"
"github.com/ovh/cds/sdk/cdsclient"
"github.com/rivo/tview"
"github.com/wtfutil/wtf/utils"
"github.com/wtfutil/wtf/view"
)
// Widget define wtf widget to register widget later
type Widget struct {
view.MultiSourceWidget
view.TextWidget
workflows []sdk.Workflow
client cdsclient.Interface
settings *Settings
Selected int
maxItems int
Items []int64
}
// NewWidget creates a new instance of the widget
func NewWidget(tviewApp *tview.Application, pages *tview.Pages, settings *Settings) *Widget {
widget := Widget{
MultiSourceWidget: view.NewMultiSourceWidget(settings.Common, "workflow", "workflows"),
TextWidget: view.NewTextWidget(tviewApp, pages, settings.Common),
settings: settings,
}
widget.initializeKeyboardControls()
widget.View.SetRegions(true)
widget.SetDisplayFunction(widget.display)
widget.Unselect()
widget.client = cdsclient.New(cdsclient.Config{
Host: settings.apiURL,
BuitinConsumerAuthenticationToken: settings.token,
})
config, _ := widget.client.ConfigUser()
if config.URLUI != "" {
widget.settings.uiURL = config.URLUI
}
widget.workflows = widget.buildWorkflowsCollection()
return &widget
}
/* -------------------- Exported Functions -------------------- */
// SetItemCount sets the amount of workflows throughout the widgets display creation
func (widget *Widget) SetItemCount(items int) {
widget.maxItems = items
}
// GetItemCount returns the amount of workflows calculated so far as an int
func (widget *Widget) GetItemCount() int {
return widget.maxItems
}
// GetSelected returns the index of the currently highlighted item as an int
func (widget *Widget) GetSelected() int {
if widget.Selected < 0 {
return 0
}
return widget.Selected
}
// Next cycles the currently highlighted text down
func (widget *Widget) Next() {
widget.Selected++
if widget.Selected >= widget.maxItems {
widget.Selected = 0
}
widget.View.Highlight(strconv.Itoa(widget.Selected)).ScrollToHighlight()
}
// Prev cycles the currently highlighted text up
func (widget *Widget) Prev() {
widget.Selected--
if widget.Selected < 0 {
widget.Selected = widget.maxItems - 1
}
widget.View.Highlight(strconv.Itoa(widget.Selected)).ScrollToHighlight()
}
// Unselect stops highlighting the text and jumps the scroll position to the top
func (widget *Widget) Unselect() {
widget.Selected = -1
widget.View.Highlight()
widget.View.ScrollToBeginning()
}
// Refresh reloads the data
func (widget *Widget) Refresh() {
widget.display()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) buildWorkflowsCollection() []sdk.Workflow {
workflows := []sdk.Workflow{}
data, _ := widget.client.Navbar()
for _, v := range data {
if v.Favorite && v.WorkflowName != "" {
workflows = append(workflows, sdk.Workflow{ProjectKey: v.Key, Name: v.WorkflowName})
}
}
return workflows
}
func (widget *Widget) currentCDSWorkflow() *sdk.Workflow {
if len(widget.workflows) == 0 {
return nil
}
if widget.Idx < 0 || widget.Idx >= len(widget.workflows) {
widget.Idx = 0
}
p := widget.workflows[widget.Idx]
return &p
}
func (widget *Widget) openWorkflow() {
currentSelection := widget.View.GetHighlights()
if widget.Selected >= 0 && currentSelection[0] != "" {
wf := widget.currentCDSWorkflow()
url := fmt.Sprintf("%s/project/%s/workflow/%s/run/%d",
widget.settings.uiURL, wf.ProjectKey, wf.Name, widget.Items[widget.Selected])
utils.OpenFile(url)
}
}

View File

@ -0,0 +1,113 @@
package cdsqueue
import (
"fmt"
"strings"
"time"
"github.com/ovh/cds/sdk"
)
func (widget *Widget) display() {
widget.TextWidget.Redraw(widget.content)
}
func (widget *Widget) content() (string, string, bool) {
if len(widget.View.GetHighlights()) > 0 {
widget.View.ScrollToHighlight()
} else {
widget.View.ScrollToBeginning()
}
widget.Items = make([]sdk.WorkflowNodeJobRun, 0)
filter := widget.currentFilter()
_, _, width, _ := widget.View.GetRect()
str := widget.settings.PaginationMarker(len(widget.filters), widget.Idx, width) + "\n"
str += widget.displayQueue(filter)
title := fmt.Sprintf("%s - %s", widget.CommonSettings().Title, widget.title(filter))
return title, str, false
}
func (widget *Widget) title(filter string) string {
return fmt.Sprintf(
"[%s]%d - %s[white]",
widget.settings.Colors.TextTheme.Title,
widget.maxItems,
filter,
)
}
func (widget *Widget) displayQueue(filter string) string {
runs, _ := widget.client.QueueWorkflowNodeJobRun(filter)
widget.SetItemCount(len(runs))
if len(runs) == 0 {
return " [grey]none[white]\n"
}
var content string
for idx, job := range runs {
content += fmt.Sprintf(`[grey]["%d"]%s`,
idx, widget.generateQueueJobLine(job.ID, job.Parameters, job.Job, time.Since(job.Queued), job.BookedBy, job.Status))
widget.Items = append(widget.Items, job)
}
return content
}
func (widget *Widget) generateQueueJobLine(id int64, parameters []sdk.Parameter, executedJob sdk.ExecutedJob,
duration time.Duration, bookedBy sdk.Service, status string) string {
prj := getVarsInPbj("cds.project", parameters)
workflow := getVarsInPbj("cds.workflow", parameters)
node := getVarsInPbj("cds.node", parameters)
run := getVarsInPbj("cds.run", parameters)
triggeredBy := getVarsInPbj("cds.triggered_by.username", parameters)
row := make([]string, 6)
row[0] = pad(sdk.Round(duration, time.Second).String(), 9)
row[2] = pad(run, 7)
row[3] = pad(prj+"/"+workflow+"/"+node, 40)
switch {
case status == sdk.StatusBuilding:
row[1] = pad(fmt.Sprintf(" %s.%s ", executedJob.WorkerName, executedJob.WorkerID), 27)
case bookedBy.ID != 0:
row[1] = pad(fmt.Sprintf(" %s.%d ", bookedBy.Name, bookedBy.ID), 27)
default:
row[1] = pad("", 27)
}
row[4] = fmt.Sprintf("➤ %s", pad(triggeredBy, 17))
c := "grey"
if status == sdk.StatusWaiting {
if duration > 120*time.Second {
c = "red"
} else if duration > 50*time.Second {
c = "yellow"
}
}
return fmt.Sprintf("[%s]%s [grey]%s %s %s %s\n", c, row[0], row[1], row[2], row[3], row[4])
}
func pad(t string, size int) string {
if len(t) > size {
return t[0:size-3] + "..."
}
return t + strings.Repeat(" ", size-len(t))
}
func getVarsInPbj(key string, ps []sdk.Parameter) string {
for _, p := range ps {
if p.Name == key {
return p.Value
}
}
return ""
}

View File

@ -0,0 +1,23 @@
package cdsqueue
import (
"github.com/gdamore/tcell"
)
func (widget *Widget) initializeKeyboardControls() {
widget.InitializeHelpTextKeyboardControl(widget.ShowHelp)
widget.InitializeRefreshKeyboardControl(widget.Refresh)
widget.SetKeyboardChar("j", widget.Next, "Select next workflow")
widget.SetKeyboardChar("k", widget.Prev, "Select previous workflow")
widget.SetKeyboardChar("l", widget.NextSource, "Select next filter")
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous filter")
widget.SetKeyboardChar("o", widget.openWorkflow, "Open workflow in browser")
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next workflow")
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous workflow")
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next filter")
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous filter")
widget.SetKeyboardKey(tcell.KeyEnter, widget.openWorkflow, "Open workflow in browser")
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
}

View File

@ -0,0 +1,36 @@
package cdsqueue
import (
"os"
"github.com/olebedev/config"
"github.com/wtfutil/wtf/cfg"
)
const (
defaultFocusable = true
defaultTitle = "CDS Queue"
)
// Settings defines the configuration properties for this module
type Settings struct {
*cfg.Common
token string `help:"Your CDS API token."`
apiURL string `help:"Your CDS API URL."`
uiURL string
}
// NewSettingsFromYAML creates a new settings instance from a YAML config block
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
settings := Settings{
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
token: ymlConfig.UString("token", ymlConfig.UString("token", os.Getenv("CDS_TOKEN"))),
apiURL: ymlConfig.UString("apiURL", os.Getenv("CDS_API_URL")),
}
settings.SetDocumentationPath("cds/queue")
return &settings
}

134
modules/cds/queue/widget.go Normal file
View File

@ -0,0 +1,134 @@
package cdsqueue
import (
"fmt"
"strconv"
"github.com/ovh/cds/sdk"
"github.com/ovh/cds/sdk/cdsclient"
"github.com/rivo/tview"
"github.com/wtfutil/wtf/utils"
"github.com/wtfutil/wtf/view"
)
// Widget define wtf widget to register widget later
type Widget struct {
view.MultiSourceWidget
view.TextWidget
filters []string
client cdsclient.Interface
settings *Settings
Selected int
maxItems int
Items []sdk.WorkflowNodeJobRun
}
// NewWidget creates a new instance of the widget
func NewWidget(tviewApp *tview.Application, pages *tview.Pages, settings *Settings) *Widget {
widget := Widget{
MultiSourceWidget: view.NewMultiSourceWidget(settings.Common, "workflow", "workflows"),
TextWidget: view.NewTextWidget(tviewApp, pages, settings.Common),
settings: settings,
}
widget.initializeKeyboardControls()
widget.View.SetRegions(true)
widget.SetDisplayFunction(widget.display)
widget.Unselect()
widget.filters = []string{sdk.StatusWaiting, sdk.StatusBuilding}
widget.client = cdsclient.New(cdsclient.Config{
Host: settings.apiURL,
BuitinConsumerAuthenticationToken: settings.token,
})
config, _ := widget.client.ConfigUser()
if config.URLUI != "" {
widget.settings.uiURL = config.URLUI
}
return &widget
}
/* -------------------- Exported Functions -------------------- */
// SetItemCount sets the amount of workflows throughout the widgets display creation
func (widget *Widget) SetItemCount(items int) {
widget.maxItems = items
}
// GetItemCount returns the amount of workflows calculated so far as an int
func (widget *Widget) GetItemCount() int {
return widget.maxItems
}
// GetSelected returns the index of the currently highlighted item as an int
func (widget *Widget) GetSelected() int {
if widget.Selected < 0 {
return 0
}
return widget.Selected
}
// Next cycles the currently highlighted text down
func (widget *Widget) Next() {
widget.Selected++
if widget.Selected >= widget.maxItems {
widget.Selected = 0
}
widget.View.Highlight(strconv.Itoa(widget.Selected)).ScrollToHighlight()
}
// Prev cycles the currently highlighted text up
func (widget *Widget) Prev() {
widget.Selected--
if widget.Selected < 0 {
widget.Selected = widget.maxItems - 1
}
widget.View.Highlight(strconv.Itoa(widget.Selected)).ScrollToHighlight()
}
// Unselect stops highlighting the text and jumps the scroll position to the top
func (widget *Widget) Unselect() {
widget.Selected = -1
widget.View.Highlight()
widget.View.ScrollToBeginning()
}
// Refresh reloads the data
func (widget *Widget) Refresh() {
widget.display()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) currentFilter() string {
if len(widget.filters) == 0 {
return sdk.StatusWaiting
}
if widget.Idx < 0 || widget.Idx >= len(widget.filters) {
widget.Idx = 0
return sdk.StatusWaiting
}
return widget.filters[widget.Idx]
}
func (widget *Widget) openWorkflow() {
currentSelection := widget.View.GetHighlights()
if widget.Selected >= 0 && currentSelection[0] != "" {
job := widget.Items[widget.Selected]
prj := getVarsInPbj("cds.project", job.Parameters)
workflow := getVarsInPbj("cds.workflow", job.Parameters)
runNumber := getVarsInPbj("cds.run.number", job.Parameters)
url := fmt.Sprintf("%s/project/%s/workflow/%s/run/%s", widget.settings.uiURL, prj, workflow, runNumber)
utils.OpenFile(url)
}
}

View File

@ -0,0 +1,88 @@
package cdsstatus
import (
"fmt"
"strings"
"github.com/ovh/cds/sdk"
)
func (widget *Widget) display() {
widget.TextWidget.Redraw(widget.content)
}
func (widget *Widget) content() (string, string, bool) {
if len(widget.View.GetHighlights()) > 0 {
widget.View.ScrollToHighlight()
} else {
widget.View.ScrollToBeginning()
}
widget.Items = make([]sdk.MonitoringStatusLine, 0)
str := widget.displayStatus()
title := widget.CommonSettings().Title
return title, str, false
}
func (widget *Widget) displayStatus() string {
status, err := widget.client.MonStatus()
if err != nil || len(status.Lines) == 0 {
return fmt.Sprintf(" [red]Error: %v[white]\n", err.Error())
}
widget.SetItemCount(len(status.Lines))
var (
global []string
globalWarn []string
globalRed []string
ok []string
warn []string
red []string
)
for _, line := range status.Lines {
switch {
case line.Status == sdk.MonitoringStatusWarn && strings.Contains(line.Component, "Global"):
globalWarn = append(globalWarn, line.String())
case line.Status != sdk.MonitoringStatusOK && strings.Contains(line.Component, "Global"):
globalRed = append(globalRed, line.String())
case strings.Contains(line.Component, "Global"):
global = append(global, line.String())
case line.Status == sdk.MonitoringStatusWarn:
warn = append(warn, line.String())
case line.Status == sdk.MonitoringStatusOK:
ok = append(ok, line.String())
default:
red = append(red, line.String())
}
}
var idx int
var content string
for _, v := range globalRed {
content += fmt.Sprintf("[grey][\"%d\"][red]%s\n", idx, v)
idx++
}
for _, v := range globalWarn {
content += fmt.Sprintf("[grey][\"%d\"][yellow]%s\n", idx, v)
idx++
}
for _, v := range global {
content += fmt.Sprintf("[grey][\"%d\"][grey]%s\n", idx, v)
idx++
}
for _, v := range red {
content += fmt.Sprintf("[grey][\"%d\"][red]%s\n", idx, v)
idx++
}
for _, v := range warn {
content += fmt.Sprintf("[grey][\"%d\"][yellow]%s\n", idx, v)
idx++
}
for _, v := range ok {
content += fmt.Sprintf("[grey][\"%d\"][grey]%s\n", idx, v)
idx++
}
return content
}

View File

@ -0,0 +1,19 @@
package cdsstatus
import (
"github.com/gdamore/tcell"
)
func (widget *Widget) initializeKeyboardControls() {
widget.InitializeHelpTextKeyboardControl(widget.ShowHelp)
widget.InitializeRefreshKeyboardControl(widget.Refresh)
widget.SetKeyboardChar("j", widget.Next, "Select next line")
widget.SetKeyboardChar("k", widget.Prev, "Select previous line")
widget.SetKeyboardChar("o", widget.openWorkflow, "Open status in browser")
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next line")
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous line")
widget.SetKeyboardKey(tcell.KeyEnter, widget.openWorkflow, "Open status in browser")
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
}

View File

@ -0,0 +1,36 @@
package cdsstatus
import (
"os"
"github.com/olebedev/config"
"github.com/wtfutil/wtf/cfg"
)
const (
defaultFocusable = true
defaultTitle = "CDS Status"
)
// Settings defines the configuration properties for this module
type Settings struct {
*cfg.Common
token string `help:"Your CDS API token."`
apiURL string `help:"Your CDS API URL."`
uiURL string
}
// NewSettingsFromYAML creates a new settings instance from a YAML config block
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
settings := Settings{
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
token: ymlConfig.UString("token", ymlConfig.UString("token", os.Getenv("CDS_TOKEN"))),
apiURL: ymlConfig.UString("apiURL", os.Getenv("CDS_API_URL")),
}
settings.SetDocumentationPath("cds/status")
return &settings
}

View File

@ -0,0 +1,117 @@
package cdsstatus
import (
"fmt"
"strconv"
"github.com/ovh/cds/sdk"
"github.com/ovh/cds/sdk/cdsclient"
"github.com/rivo/tview"
"github.com/wtfutil/wtf/utils"
"github.com/wtfutil/wtf/view"
)
// Widget define wtf widget to register widget later
type Widget struct {
view.MultiSourceWidget
view.TextWidget
filters []string
client cdsclient.Interface
settings *Settings
Selected int
maxItems int
Items []sdk.MonitoringStatusLine
}
// NewWidget creates a new instance of the widget
func NewWidget(tviewApp *tview.Application, pages *tview.Pages, settings *Settings) *Widget {
widget := Widget{
MultiSourceWidget: view.NewMultiSourceWidget(settings.Common, "workflow", "workflows"),
TextWidget: view.NewTextWidget(tviewApp, pages, settings.Common),
settings: settings,
}
widget.initializeKeyboardControls()
widget.View.SetRegions(true)
widget.SetDisplayFunction(widget.display)
widget.Unselect()
widget.filters = []string{sdk.StatusWaiting, sdk.StatusBuilding}
widget.client = cdsclient.New(cdsclient.Config{
Host: settings.apiURL,
BuitinConsumerAuthenticationToken: settings.token,
})
config, _ := widget.client.ConfigUser()
if config.URLUI != "" {
widget.settings.uiURL = config.URLUI
}
return &widget
}
/* -------------------- Exported Functions -------------------- */
// SetItemCount sets the amount of line throughout the widgets display creation
func (widget *Widget) SetItemCount(items int) {
widget.maxItems = items
}
// GetItemCount returns the amount of line calculated so far as an int
func (widget *Widget) GetItemCount() int {
return widget.maxItems
}
// GetSelected returns the index of the currently highlighted item as an int
func (widget *Widget) GetSelected() int {
if widget.Selected < 0 {
return 0
}
return widget.Selected
}
// Next cycles the currently highlighted text down
func (widget *Widget) Next() {
widget.Selected++
if widget.Selected >= widget.maxItems {
widget.Selected = 0
}
widget.View.Highlight(strconv.Itoa(widget.Selected)).ScrollToHighlight()
}
// Prev cycles the currently highlighted text up
func (widget *Widget) Prev() {
widget.Selected--
if widget.Selected < 0 {
widget.Selected = widget.maxItems - 1
}
widget.View.Highlight(strconv.Itoa(widget.Selected)).ScrollToHighlight()
}
// Unselect stops highlighting the text and jumps the scroll position to the top
func (widget *Widget) Unselect() {
widget.Selected = -1
widget.View.Highlight()
widget.View.ScrollToBeginning()
}
// Refresh reloads the data
func (widget *Widget) Refresh() {
widget.display()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) openWorkflow() {
currentSelection := widget.View.GetHighlights()
if widget.Selected >= 0 && currentSelection[0] != "" {
url := fmt.Sprintf("%s/admin/services", widget.settings.uiURL)
utils.OpenFile(url)
}
}

View File

@ -2,12 +2,12 @@ package circleci
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"github.com/wtfutil/wtf/utils"
)
type Client struct {
@ -30,7 +30,10 @@ func (client *Client) BuildsFor() ([]*Build, error) {
return builds, err
}
parseJson(&builds, resp.Body)
err = utils.ParseJSON(&builds, bytes.NewReader(resp))
if err != nil {
return builds, err
}
return builds, nil
}
@ -41,7 +44,7 @@ var (
circleAPIURL = &url.URL{Scheme: "https", Host: "circleci.com", Path: "/api/v1/"}
)
func (client *Client) circleRequest(path string) (*http.Response, error) {
func (client *Client) circleRequest(path string) ([]byte, error) {
params := url.Values{}
params.Add("circle-token", client.apiKey)
@ -60,26 +63,15 @@ func (client *Client) circleRequest(path string) (*http.Response, error) {
return nil, err
}
defer func() { _ = resp.Body.Close() }()
if resp.StatusCode < 200 || resp.StatusCode > 299 {
return nil, fmt.Errorf(resp.Status)
}
return resp, nil
}
func parseJson(obj interface{}, text io.Reader) {
jsonStream, err := ioutil.ReadAll(text)
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
panic(err)
}
decoder := json.NewDecoder(bytes.NewReader(jsonStream))
for {
if err := decoder.Decode(obj); err == io.EOF {
break
} else if err != nil {
panic(err)
}
return nil, err
}
return body, nil
}

View File

@ -7,21 +7,28 @@ import (
"github.com/wtfutil/wtf/cfg"
)
const defaultTitle = "CircleCI"
const (
defaultFocusable = false
defaultTitle = "CircleCI"
)
type Settings struct {
common *cfg.Common
*cfg.Common
apiKey string `help:"Your CircleCI API token."`
apiKey string `help:"Your CircleCI API token."`
numberOfBuilds int `help:"The number of build, 10 by default"`
}
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
settings := Settings{
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, ymlConfig, globalConfig),
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
apiKey: ymlConfig.UString("apiKey", os.Getenv("WTF_CIRCLE_API_KEY")),
apiKey: ymlConfig.UString("apiKey", ymlConfig.UString("apikey", os.Getenv("WTF_CIRCLE_API_KEY"))),
numberOfBuilds: ymlConfig.UInt("numberOfBuilds", 10),
}
cfg.ModuleSecret(name, globalConfig, &settings.apiKey).Load()
return &settings
}

View File

@ -14,9 +14,9 @@ type Widget struct {
settings *Settings
}
func NewWidget(app *tview.Application, settings *Settings) *Widget {
func NewWidget(tviewApp *tview.Application, settings *Settings) *Widget {
widget := Widget{
TextWidget: view.NewTextWidget(app, settings.common, false),
TextWidget: view.NewTextWidget(tviewApp, nil, settings.Common),
Client: NewClient(settings.apiKey),
settings: settings,
@ -32,41 +32,38 @@ func (widget *Widget) Refresh() {
return
}
builds, err := widget.Client.BuildsFor()
title := fmt.Sprintf("%s - Builds", widget.CommonSettings().Title)
var content string
wrap := false
if err != nil {
wrap = true
content = err.Error()
} else {
content = widget.contentFrom(builds)
}
widget.Redraw(title, content, wrap)
widget.Redraw(widget.content)
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) contentFrom(builds []*Build) string {
var str string
for idx, build := range builds {
if idx > 10 {
return str
}
func (widget *Widget) content() (string, string, bool) {
builds, err := widget.Client.BuildsFor()
str += fmt.Sprintf(
"[%s] %s-%d (%s) [white]%s\n",
buildColor(build),
build.Reponame,
build.BuildNum,
build.Branch,
build.AuthorName,
)
title := fmt.Sprintf("%s - Builds", widget.CommonSettings().Title)
var str string
wrap := false
if err != nil {
wrap = true
str = err.Error()
} else {
for idx, build := range builds {
if idx > widget.settings.numberOfBuilds {
break
}
str += fmt.Sprintf(
"[%s] %s-%d (%s) [white]%s\n",
buildColor(build),
build.Reponame,
build.BuildNum,
build.Branch,
build.AuthorName,
)
}
}
return str
return title, str, wrap
}
func buildColor(build *Build) string {

View File

@ -1,6 +1,7 @@
package clocks
import (
"strings"
"time"
)
@ -18,6 +19,14 @@ func NewClock(label string, timeLoc *time.Location) Clock {
return clock
}
func BuildClock(label string, location string) (clock Clock, err error) {
timeLoc, err := time.LoadLocation(sanitizeLocation(location))
if err != nil {
return Clock{}, err
}
return NewClock(label, timeLoc), nil
}
func (clock *Clock) Date(dateFormat string) string {
return clock.LocalTime().Format(dateFormat)
}
@ -33,3 +42,7 @@ func (clock *Clock) ToLocal(t time.Time) time.Time {
func (clock *Clock) Time(timeFormat string) string {
return clock.LocalTime().Format(timeFormat)
}
func sanitizeLocation(locStr string) string {
return strings.Replace(locStr, " ", "_", -1)
}

View File

@ -10,7 +10,9 @@ type ClockCollection struct {
}
func (clocks *ClockCollection) Sorted(sortOrder string) []Clock {
if sortOrder == "chronological" {
if sortOrder == "natural" {
//no-op
} else if sortOrder == "chronological" {
clocks.SortedChronologically()
} else {
clocks.SortedAlphabetically()

View File

@ -1,32 +1,23 @@
package clocks
import (
"fmt"
)
import "fmt"
func (widget *Widget) display(clocks []Clock, dateFormat string, timeFormat string) {
if len(clocks) == 0 {
title := fmt.Sprintf("\n%s", " no timezone data available")
widget.Redraw(widget.CommonSettings().Title, title, true)
return
}
str := ""
for idx, clock := range clocks {
rowColor := widget.settings.colors.rows.odd
if idx%2 == 0 {
rowColor = widget.settings.colors.rows.even
if len(clocks) == 0 {
str = fmt.Sprintf("\n%s", " no timezone data available")
} else {
for idx, clock := range clocks {
str += fmt.Sprintf(
" [%s]%-12s %-10s %7s[white]\n",
widget.CommonSettings().RowColor(idx),
clock.Label,
clock.Time(timeFormat),
clock.Date(dateFormat),
)
}
str += fmt.Sprintf(
" [%s]%-12s %-10s %7s[white]\n",
rowColor,
clock.Label,
clock.Time(timeFormat),
clock.Date(dateFormat),
)
}
widget.Redraw(widget.CommonSettings().Title, str, false)
widget.Redraw(func() (string, string, bool) { return widget.CommonSettings().Title, str, false })
}

View File

@ -6,38 +6,62 @@ import (
"github.com/wtfutil/wtf/utils"
)
const defaultTitle = "Clocks"
type colors struct {
rows struct {
even string
odd string
}
}
const (
defaultFocusable = false
defaultTitle = "Clocks"
)
// Settings defines the configuration properties for this module
type Settings struct {
colors
common *cfg.Common
*cfg.Common
dateFormat string `help:"The format of the date string for all clocks." values:"Any valid Go date layout which is handled by Time.Format. Defaults to Jan 2."`
timeFormat string `help:"The format of the time string for all clocks." values:"Any valid Go time layout which is handled by Time.Format. Defaults to 15:04 MST."`
locations map[string]interface{} `help:"Defines the timezones for the world clocks that you want to display. key is a unique label that will be displayed in the UI. value is a timezone name." values:"Any TZ database timezone."`
sort string `help:"Defines the display order of the clocks in the widget." values:"'alphabetical' or 'chronological'. 'alphabetical' will sort in acending order by key, 'chronological' will sort in ascending order by date/time."`
dateFormat string `help:"The format of the date string for all clocks." values:"Any valid Go date layout which is handled by Time.Format. Defaults to Jan 2."`
timeFormat string `help:"The format of the time string for all clocks." values:"Any valid Go time layout which is handled by Time.Format. Defaults to 15:04 MST."`
locations []Clock `help:"Defines the timezones for the world clocks that you want to display. key is a unique label that will be displayed in the UI. value is a timezone name." values:"Any TZ database timezone."`
sort string `help:"Defines the display order of the clocks in the widget." values:"'alphabetical', 'chronological', or 'natural. 'alphabetical' will sort in ascending order by key, 'chronological' will sort in ascending order by date/time, 'natural' will keep ordering as per the config."`
}
// NewSettingsFromYAML creates a new settings instance from a YAML config block
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
settings := Settings{
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, ymlConfig, globalConfig),
Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
dateFormat: ymlConfig.UString("dateFormat", utils.SimpleDateFormat),
timeFormat: ymlConfig.UString("timeFormat", utils.SimpleTimeFormat),
locations: ymlConfig.UMap("locations"),
locations: buildLocations(ymlConfig),
sort: ymlConfig.UString("sort"),
}
settings.colors.rows.even = ymlConfig.UString("colors.rows.even", "white")
settings.colors.rows.odd = ymlConfig.UString("colors.rows.odd", "blue")
return &settings
}
func buildLocations(ymlConfig *config.Config) []Clock {
clocks := []Clock{}
locations, err := ymlConfig.Map("locations")
if err == nil {
for k, v := range locations {
name := k
zone := v.(string)
clock, err := BuildClock(name, zone)
if err == nil {
clocks = append(clocks, clock)
}
}
return clocks
}
listLocations := ymlConfig.UList("locations")
for _, location := range listLocations {
if location, ok := location.(map[string]interface{}); ok {
for k, v := range location {
name := k
zone := v.(string)
clock, err := BuildClock(name, zone)
if err == nil {
clocks = append(clocks, clock)
}
}
}
}
return clocks
}

Some files were not shown because too many files have changed in this diff Show More