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

Merge branch 'master' into support-github-enterprise

This commit is contained in:
Chris Cummer 2018-06-20 10:43:30 -07:00 committed by GitHub
commit 55533d1e16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
188 changed files with 25874 additions and 1352 deletions

209
.all-contributorsrc Normal file
View File

@ -0,0 +1,209 @@
{
"projectName": "wtf",
"projectOwner": "senorprogrammer",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 48,
"commit": true,
"contributors": [
{
"login": "senorprogrammer",
"name": "Chris Cummer",
"avatar_url": "https://avatars0.githubusercontent.com/u/6413?v=4",
"profile": "https://twitter.com/senorprogrammer",
"contributions": []
},
{
"login": "jeangovil",
"name": "Hossein Mehrabi",
"avatar_url": "https://avatars1.githubusercontent.com/u/34973359?v=4",
"profile": "https://github.com/jeangovil",
"contributions": []
},
{
"login": "Fengyalv",
"name": "FengYa",
"avatar_url": "https://avatars0.githubusercontent.com/u/11779018?v=4",
"profile": "https://github.com/Fengyalv",
"contributions": []
},
{
"login": "deltaxflux",
"name": "deltax",
"avatar_url": "https://avatars2.githubusercontent.com/u/17337753?v=4",
"profile": "https://fluxionnetwork.github.io/fluxion/",
"contributions": []
},
{
"login": "BillKeenan",
"name": "Bill Keenan",
"avatar_url": "https://avatars0.githubusercontent.com/u/1319630?v=4",
"profile": "https://github.com/BillKeenan",
"contributions": []
},
{
"login": "interlock",
"name": "June S",
"avatar_url": "https://avatars2.githubusercontent.com/u/118081?v=4",
"profile": "http://blog.sapara.com",
"contributions": []
},
{
"login": "XanthusL",
"name": "liyiheng",
"avatar_url": "https://avatars3.githubusercontent.com/u/16461061?v=4",
"profile": "https://github.com/XanthusL",
"contributions": []
},
{
"login": "baustinanki",
"name": "baustinanki",
"avatar_url": "https://avatars2.githubusercontent.com/u/9014288?v=4",
"profile": "https://github.com/baustinanki",
"contributions": []
},
{
"login": "lixin9311",
"name": "lucus lee",
"avatar_url": "https://avatars0.githubusercontent.com/u/371475?v=4",
"profile": "https://github.com/lixin9311",
"contributions": []
},
{
"login": "mxplusb",
"name": "Mike Lloyd",
"avatar_url": "https://avatars1.githubusercontent.com/u/7537841?v=4",
"profile": "https://github.com/mxplusb",
"contributions": []
},
{
"login": "rubiojr",
"name": "Sergio Rubio",
"avatar_url": "https://avatars3.githubusercontent.com/u/10998?v=4",
"profile": "http://rubiojr.rbel.co",
"contributions": []
},
{
"login": "FarhadF",
"name": "Farhad Farahi",
"avatar_url": "https://avatars3.githubusercontent.com/u/17374492?v=4",
"profile": "https://github.com/FarhadF",
"contributions": []
},
{
"login": "lasanthak",
"name": "Lasantha Kularatne",
"avatar_url": "https://avatars1.githubusercontent.com/u/634604?v=4",
"profile": "http://lasantha.blogspot.com/",
"contributions": []
},
{
"login": "dlom",
"name": "Mark Old",
"avatar_url": "https://avatars1.githubusercontent.com/u/823331?v=4",
"profile": "https://github.com/dlom",
"contributions": []
},
{
"login": "flw-cn",
"name": "flw",
"avatar_url": "https://avatars0.githubusercontent.com/u/5546718?v=4",
"profile": "http://flw.tools/",
"contributions": []
},
{
"login": "davebarda",
"name": "David Barda",
"avatar_url": "https://avatars0.githubusercontent.com/u/6024927?v=4",
"profile": "https://github.com/davebarda",
"contributions": []
},
{
"login": "matrinox",
"name": "Geoff Lee",
"avatar_url": "https://avatars2.githubusercontent.com/u/4261980?v=4",
"profile": "https://github.com/matrinox",
"contributions": []
},
{
"login": "International",
"name": "George Opritescu",
"avatar_url": "https://avatars3.githubusercontent.com/u/1022918?v=4",
"profile": "http://international.github.io",
"contributions": []
},
{
"login": "Grazfather",
"name": "Grazfather",
"avatar_url": "https://avatars3.githubusercontent.com/u/497310?v=4",
"profile": "https://twitter.com/Grazfather",
"contributions": []
},
{
"login": "mcordell",
"name": "Michael Cordell",
"avatar_url": "https://avatars2.githubusercontent.com/u/1691120?v=4",
"profile": "http://www.mikecordell.com/",
"contributions": []
},
{
"login": "patrickelectric",
"name": "Patrick José Pereira",
"avatar_url": "https://avatars2.githubusercontent.com/u/1215497?v=4",
"profile": "http://patrick.ibexcps.com",
"contributions": []
},
{
"login": "sherodtaylor",
"name": "sherod taylor",
"avatar_url": "https://avatars2.githubusercontent.com/u/1483092?v=4",
"profile": "https://github.com/sherodtaylor",
"contributions": []
},
{
"login": "askl56",
"name": "Andrew Scott",
"avatar_url": "https://avatars2.githubusercontent.com/u/3062663?v=4",
"profile": "http://cogentia.io",
"contributions": []
},
{
"login": "anandsudhir",
"name": "Anand Sudhir Prayaga",
"avatar_url": "https://avatars2.githubusercontent.com/u/3252403?v=4",
"profile": "https://github.com/anandsudhir",
"contributions": []
},
{
"login": "lsipii",
"name": "Lassi Piironen",
"avatar_url": "https://avatars1.githubusercontent.com/u/12018440?v=4",
"profile": "https://github.com/lsipii",
"contributions": []
},
{
"login": "BlackWebWolf",
"name": "BlackWebWolf",
"avatar_url": "https://avatars0.githubusercontent.com/u/14799210?v=4",
"profile": "https://github.com/BlackWebWolf",
"contributions": []
},
{
"login": "andrewzolotukhin",
"name": "andrewzolotukhin",
"avatar_url": "https://avatars0.githubusercontent.com/u/1894885?v=4",
"profile": "https://github.com/andrewzolotukhin",
"contributions": []
},
{
"login": "retgits",
"name": "Leon Stigter",
"avatar_url": "https://avatars1.githubusercontent.com/u/8568280?v=4",
"profile": "https://retgits.github.io",
"contributions": []
}
]
}

35
Gopkg.lock generated
View File

@ -7,11 +7,17 @@
revision = "0fd7230b2a7505833d5f69b75cbd6c9582401479"
version = "v0.23.0"
[[projects]]
branch = "master"
name = "github.com/adlio/trello"
packages = ["."]
revision = "05dcd358e32866f2353c4f49077346a0eb585436"
[[projects]]
branch = "master"
name = "github.com/briandowns/openweathermap"
packages = ["."]
revision = "2adae1e5d10290d8cd435bd30296fc5e8f754862"
revision = "6a9abf92e34f4de62ac671caee3143f10b98892d"
[[projects]]
branch = "master"
@ -44,7 +50,7 @@
branch = "master"
name = "github.com/google/go-github"
packages = ["github"]
revision = "2ae5df7848328c214a48cec94c7d410cf8526527"
revision = "a83ae98ad5d09188c49d6056edb60ec9bdf202bd"
[[projects]]
branch = "master"
@ -76,6 +82,12 @@
packages = ["."]
revision = "9a10d05a33a8b9e828f20491e21e8927dec35f72"
[[projects]]
name = "github.com/pkg/errors"
packages = ["."]
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
version = "v0.8.0"
[[projects]]
name = "github.com/radovskyb/watcher"
packages = ["."]
@ -86,13 +98,13 @@
branch = "master"
name = "github.com/rivo/tview"
packages = ["."]
revision = "71ecf1f4299c6d72b16d20da72405b7e85ac8720"
revision = "e643d10b365df4caec5ed32e4c1103e185af9079"
[[projects]]
branch = "master"
name = "github.com/xanzy/go-gitlab"
packages = ["."]
revision = "73e9df58a3194b1256edae4d2e819603f06d428c"
revision = "1c1cfedc5a8ffe122b1981e8b0822fe22f461643"
[[projects]]
branch = "master"
@ -107,7 +119,7 @@
"context",
"context/ctxhttp"
]
revision = "1e491301e022f8f977054da4c2d852decd59571f"
revision = "db08ff08e8622530d9ed3a0e8ac279f6d4c02196"
[[projects]]
branch = "master"
@ -119,7 +131,7 @@
"jws",
"jwt"
]
revision = "1e0a3fa8ba9a5c9eb35c271780101fdaf1b205d7"
revision = "113ce6928c4638e14fd5eba69b9e6ec899d5dd83"
[[projects]]
name = "golang.org/x/text"
@ -140,9 +152,10 @@
"calendar/v3",
"gensupport",
"googleapi",
"googleapi/internal/uritemplates"
"googleapi/internal/uritemplates",
"sheets/v4"
]
revision = "00e3bb8d04691e25ee2fccf98c866bcb7925c3ec"
revision = "2eea9ba0a3d94f6ab46508083e299a00bbbc65f6"
[[projects]]
name = "google.golang.org/appengine"
@ -158,8 +171,8 @@
"internal/urlfetch",
"urlfetch"
]
revision = "150dc57a1b433e64154302bdc40b6bb8aefa313a"
version = "v1.0.0"
revision = "b1f26356af11148e710935ed1ac8a7f5702c7612"
version = "v1.1.0"
[[projects]]
name = "gopkg.in/yaml.v2"
@ -170,6 +183,6 @@
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "fd122eb7175ffd7db7cb197de13e0b850231ec9269a63a8ca9d117a8aa50d7e5"
inputs-digest = "05d3df164ca80efbb1d5cf00a06e7ffde102690f0fabafb7d4e9860e461832db"
solver-name = "gps-cdcl"
solver-version = 1

View File

@ -77,6 +77,10 @@
name = "gopkg.in/yaml.v2"
version = "2.2.1"
[[constraint]]
branch = "master"
name = "github.com/adlio/trello"
[prune]
go-tests = true
unused-packages = true

View File

@ -1,13 +1,14 @@
BRANCH := `git rev-parse --abbrev-ref HEAD`
.PHONY: dependencies install run
.PHONY: contrib_check dependencies install run
build:
go build -o bin/wtf
contrib_check:
npx all-contributors-cli check
install:
which wtf | xargs rm || true
go install -ldflags="-X main.version=$(shell git describe --always --abbrev=6)_$(BRANCH) -X main.date=$(shell date +%FT%T%z)"
go clean
go install -ldflags="-X main.version=$(shell git describe --always --abbrev=6) -X main.date=$(shell date +%FT%T%z)"
which wtf
run: build

View File

@ -1,10 +1,5 @@
<p align="right">
<img src="https://travis-ci.com/senorprogrammer/wtf.svg?branch=master" />
</p>
<p align="center">
<img src="./docs/img/wtf.jpg?raw=true" title="WTF" width="852" height="240" />
</p>
<img src="https://travis-ci.com/senorprogrammer/wtf.svg?branch=master" /> <a href="https://gitter.im/wtfutil/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img src="https://badges.gitter.im/wtfutil/Lobby.svg" /></a> <a href="https://twitter.com/wtfutil"><img src="https://img.shields.io/badge/follow-on%20twitter-blue.svg" /></a> <a href="#contributors"><img src="https://img.shields.io/badge/all_contributors-27-orange.svg?style=flat-square" /></a>
A personal terminal-based dashboard utility, designed for
displaying infrequently-needed, but very important, daily data.
@ -15,9 +10,7 @@ displaying infrequently-needed, but very important, daily data.
## Quick Start
### Installation from Source
**Note:** WTF is _only_ compatible with Go versions **1.9.2** or later. It currently _does not_ compile with `gccgo`.
[Download and run the latest binary](https://github.com/senorprogrammer/wtf/releases) or install from source:
```bash
go get -u github.com/senorprogrammer/wtf
@ -26,12 +19,7 @@ make install
make run
```
Or [download the latest binary](https://github.com/senorprogrammer/wtf/releases).
## Support
Chat on Gitter
[![Join the chat at https://gitter.im/wtfutil/Lobby](https://badges.gitter.im/wtfutil/Lobby.svg)](https://gitter.im/wtfutil/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
**Note:** WTF is _only_ compatible with Go versions **1.9.2** or later. It currently _does not_ compile with `gccgo`.
## Documentation
@ -42,17 +30,22 @@ documentation. Here's some short-cuts:
* [Configuration](http://wtfutil.com/posts/configuration/)
* [Module Documentation](http://wtfutil.com/posts/modules/)
## Contributing
## Contributors
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests.
## Authors
Thanks goes to these wonderful people:
* Chris Cummer, [senorprogrammer](https://github.com/senorprogrammer)
<!-- 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;"/><br /><sub><b>Chris Cummer</b></sub>](https://twitter.com/senorprogrammer)<br /> | [<img src="https://avatars1.githubusercontent.com/u/34973359?v=4" width="48px;"/><br /><sub><b>Hossein Mehrabi</b></sub>](https://github.com/jeangovil)<br /> | [<img src="https://avatars0.githubusercontent.com/u/11779018?v=4" width="48px;"/><br /><sub><b>FengYa</b></sub>](https://github.com/Fengyalv)<br /> | [<img src="https://avatars2.githubusercontent.com/u/17337753?v=4" width="48px;"/><br /><sub><b>deltax</b></sub>](https://fluxionnetwork.github.io/fluxion/)<br /> | [<img src="https://avatars0.githubusercontent.com/u/1319630?v=4" width="48px;"/><br /><sub><b>Bill Keenan</b></sub>](https://github.com/BillKeenan)<br /> | [<img src="https://avatars2.githubusercontent.com/u/118081?v=4" width="48px;"/><br /><sub><b>June S</b></sub>](http://blog.sapara.com)<br /> | [<img src="https://avatars3.githubusercontent.com/u/16461061?v=4" width="48px;"/><br /><sub><b>liyiheng</b></sub>](https://github.com/XanthusL)<br /> |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars2.githubusercontent.com/u/9014288?v=4" width="48px;"/><br /><sub><b>baustinanki</b></sub>](https://github.com/baustinanki)<br /> | [<img src="https://avatars0.githubusercontent.com/u/371475?v=4" width="48px;"/><br /><sub><b>lucus lee</b></sub>](https://github.com/lixin9311)<br /> | [<img src="https://avatars1.githubusercontent.com/u/7537841?v=4" width="48px;"/><br /><sub><b>Mike Lloyd</b></sub>](https://github.com/mxplusb)<br /> | [<img src="https://avatars3.githubusercontent.com/u/10998?v=4" width="48px;"/><br /><sub><b>Sergio Rubio</b></sub>](http://rubiojr.rbel.co)<br /> | [<img src="https://avatars3.githubusercontent.com/u/17374492?v=4" width="48px;"/><br /><sub><b>Farhad Farahi</b></sub>](https://github.com/FarhadF)<br /> | [<img src="https://avatars1.githubusercontent.com/u/634604?v=4" width="48px;"/><br /><sub><b>Lasantha Kularatne</b></sub>](http://lasantha.blogspot.com/)<br /> | [<img src="https://avatars1.githubusercontent.com/u/823331?v=4" width="48px;"/><br /><sub><b>Mark Old</b></sub>](https://github.com/dlom)<br /> |
| [<img src="https://avatars0.githubusercontent.com/u/5546718?v=4" width="48px;"/><br /><sub><b>flw</b></sub>](http://flw.tools/)<br /> | [<img src="https://avatars0.githubusercontent.com/u/6024927?v=4" width="48px;"/><br /><sub><b>David Barda</b></sub>](https://github.com/davebarda)<br /> | [<img src="https://avatars2.githubusercontent.com/u/4261980?v=4" width="48px;"/><br /><sub><b>Geoff Lee</b></sub>](https://github.com/matrinox)<br /> | [<img src="https://avatars3.githubusercontent.com/u/1022918?v=4" width="48px;"/><br /><sub><b>George Opritescu</b></sub>](http://international.github.io)<br /> | [<img src="https://avatars3.githubusercontent.com/u/497310?v=4" width="48px;"/><br /><sub><b>Grazfather</b></sub>](https://twitter.com/Grazfather)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1691120?v=4" width="48px;"/><br /><sub><b>Michael Cordell</b></sub>](http://www.mikecordell.com/)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1215497?v=4" width="48px;"/><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;"/><br /><sub><b>sherod taylor</b></sub>](https://github.com/sherodtaylor)<br /> | [<img src="https://avatars2.githubusercontent.com/u/3062663?v=4" width="48px;"/><br /><sub><b>Andrew Scott</b></sub>](http://cogentia.io)<br /> | [<img src="https://avatars2.githubusercontent.com/u/3252403?v=4" width="48px;"/><br /><sub><b>Anand Sudhir Prayaga</b></sub>](https://github.com/anandsudhir)<br /> | [<img src="https://avatars1.githubusercontent.com/u/12018440?v=4" width="48px;"/><br /><sub><b>Lassi Piironen</b></sub>](https://github.com/lsipii)<br /> | [<img src="https://avatars0.githubusercontent.com/u/14799210?v=4" width="48px;"/><br /><sub><b>BlackWebWolf</b></sub>](https://github.com/BlackWebWolf)<br /> | [<img src="https://avatars0.githubusercontent.com/u/1894885?v=4" width="48px;"/><br /><sub><b>andrewzolotukhin</b></sub>](https://github.com/andrewzolotukhin)<br /> | [<img src="https://avatars1.githubusercontent.com/u/8568280?v=4" width="48px;"/><br /><sub><b>Leon Stigter</b></sub>](https://retgits.github.io)<br /> |
<!-- ALL-CONTRIBUTORS-LIST:END -->
## License
See [LICENSE.md](LICENSE.md) file for details.
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
## Acknowledgments
@ -77,4 +70,3 @@ Many thanks to all these developers.
<p align="center">
<img src="./docs/img/dude_wtf.png?raw=true" title="Dude WTF" width="251" height="201" />
</p>

View File

@ -1,6 +1,6 @@
wtf:
colors:
background: gray
#background: gray
border:
focusable: darkslateblue
focused: orange

View File

@ -44,6 +44,7 @@ gcal:
email: "chriscummer@me.com"
enabled: true
eventCount: 12
multiCalendar: true
position:
top: 0
left: 0
@ -105,6 +106,11 @@ Values: `true`, `false`.
The number of calendar events to display. <br />
Values: A positive integer, `0..n`.
`multiCalendar` <br />
Whether or not to display your primary calendar or all calendars you
have access to. <br />
Values: `true`, or `false`
`position` <br />
Where in the grid this module's widget will be displayed. <br />

View File

@ -54,6 +54,8 @@ None.
```yaml
git:
commitCount: 5
commitFormat: "[forestgreen]%h [grey]%cd [white]%s [grey]%an[white]"
dateFormat: "%H:%M %d %b %y"
enabled: true
position:
top: 0
@ -72,6 +74,13 @@ git:
The number of past commits to display. <br />
Values: A positive integer, `0..n`.
`commitFormat` <br />
_Optional_ The string format for the commit message. <br />
`dateFormat` <br />
_Optional_ The string format for the date/time in the commit message.
<br />
`enabled` <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
Values: `true`, `false`.

View File

@ -45,6 +45,7 @@ jira:
project: "ProjectA"
refreshInterval: 900
username: "chris.cummer"
verifyServerCertificate: true
```
### Multiple Jira Projects
@ -70,6 +71,7 @@ jira:
project: ["ProjectA", "ProjectB"]
refreshInterval: 900
username: "chris.cummer"
verifyServerCertificate: true
```
### Attributes
@ -113,3 +115,8 @@ Values: A positive integer, `0..n`.
`username` <br />
Your Jira username. <br />
`verifyServerCertificate` <br />
_Optional_ <br />
Determines whether or not the server's certificate chain and host name are verified. <br />
Values: `true`, `false`.

View File

@ -0,0 +1,58 @@
---
title: "Logger"
date: 2018-06-16T14:22:18-07:00
draft: false
---
Displays the contents of the WTF log file.
To log to this file in your own modules:
```golang
require "github.com/senorprogrammer/wtf/logger"
logger.Log("This is a log entry")
```
## Source Code
```bash
wtf/logger/
```
## Required ENV Variables
None.
## Keyboard Commands
Arrow keys scroll through the log file.
## Configuration
```yaml
logger:
enabled: true
position:
top: 5
left: 4
height: 2
width: 1
refreshInterval: 1
```
### Attributes
`enabled` <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
**Note:** If you're using logging and logging is _disabled_, your logs
will still be written to file, the widget just won't be shown onscreen.
If you have `logger.Log` calls in your code, regardless of this setting,
they will be written out. <br />
Values: `true`, `false`.
`position` <br />
Defines where in the grid this module's widget will be displayed. <br />
`refreshInterval` <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, `0..n`.

View File

@ -0,0 +1,87 @@
---
title: "Trello"
date: 2018-05-10T10:44:35-07:00
draft: false
---
Displays all Trello cards on specified lists.
<img src="/imgs/modules/trello.png" width="640" height="188" alt="trello screenshot" />
## Source Code
```bash
wtf/trello/
```
## Required ENV Variables
<span class="caption">Key:</span> `WTF_TRELLO_APP_KEY` <br />
<span class="caption">Value:</span> Your Trello App Key. <br />
<span class="caption">Key:</span> `WTF_TRELLO_ACCESS_TOKEN` <br />
<span class="caption">Value:</span> Your Trello Access Token. <br />
_You can get your API key at: trello.com/app-key._
## Keyboard Commands
None.
## Configuration
### Single Trello List
```yaml
trello:
board: Main
enabled: true
list: "Todo"
position:
height: 1
left: 2
top: 0
width: 1
refreshInterval: 3600
username: myname
```
### Multiple Trello Lists
If you want to monitor multiple Trello lists, use the following
configuration (note the difference in `list`):
```yaml
trello:
board: Main
enabled: true
list: ["Todo", "Done"]
position:
height: 1
left: 2
top: 0
width: 1
refreshInterval: 3600
username: myname
```
### Attributes
`board` <br />
The name of the Trello board. <br />
`enabled` <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
Values: `true`, `false`.
`list` <br />
The Trello lists to fetch cards from. <br />
`refreshInterval` <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, `0..n`.
`username` <br />
Your Trello username. <br />
`position` <br />
Where in the grid this module's widget will be displayed. <br />

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -30,6 +30,7 @@
<a href="https://github.com/senorprogrammer/wtf/releases" class="button button-small">Download Latest</a>
<a href="https://github.com/senorprogrammer/wtf" class="button button-small">Source on Github</a>
<a href="https://gitter.im/wtfutil/Lobby" class="button button-small">Chat on Gitter</a>
<a href="https://twitter.com/wtfutil" class="button button-small">Follow on Twitter</a>
<p>
<small>

View File

@ -38,6 +38,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -45,6 +46,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -3,13 +3,9 @@ package bamboohr
import (
"fmt"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
}

View File

@ -8,13 +8,9 @@ import (
"math/rand"
"time"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
var started = false
var ok = true

View File

@ -30,6 +30,25 @@ func CreateConfigDir() {
}
}
// CreateConfigFile creates a simple config file in the config directory if
// one does not already exist
func CreateConfigFile() {
filePath, err := CreateFile("config.yml")
if err != nil {
panic(err)
}
// If the file is empty, write to it
file, err := os.Stat(filePath)
if file.Size() == 0 {
err = ioutil.WriteFile(filePath, []byte(simpleConfig), 0644)
if err != nil {
panic(err)
}
}
}
// 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
@ -88,25 +107,6 @@ func ReadConfigFile(fileName string) (string, error) {
return string(fileData), nil
}
// WriteConfigFile creates a simple config file in the config directory if
// one does not already exist
func WriteConfigFile() {
filePath, err := CreateFile("config.yml")
if err != nil {
panic(err)
}
// If the file is empty, write to it
file, err := os.Stat(filePath)
if file.Size() == 0 {
err = ioutil.WriteFile(filePath, []byte(simpleConfig), 0644)
if err != nil {
panic(err)
}
}
}
const simpleConfig = `wtf:
colors:
border:

View File

@ -2,13 +2,9 @@ package circleci
import (
"fmt"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
}
@ -65,19 +61,15 @@ func (widget *Widget) contentFrom(builds []*Build) string {
return str
}
func buildColor(b *Build) string {
var color string
switch b.Status {
func buildColor(build *Build) string {
switch build.Status {
case "failed":
color = "red"
return "red"
case "running":
color = "yellow"
return "yellow"
case "success":
color = "green"
return "green"
default:
color = "white"
return "white"
}
return color
}

View File

@ -3,6 +3,8 @@ package clocks
import (
"sort"
"time"
"github.com/senorprogrammer/wtf/wtf"
)
type ClockCollection struct {
@ -10,7 +12,7 @@ type ClockCollection struct {
}
func (clocks *ClockCollection) Sorted() []Clock {
if "chronological" == Config.UString("wtf.mods.clocks.sort", "alphabetical") {
if "chronological" == wtf.Config.UString("wtf.mods.clocks.sort", "alphabetical") {
clocks.SortedChronologically()
} else {
clocks.SortedAlphabetically()

View File

@ -3,13 +3,9 @@ package clocks
import (
"time"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
@ -21,7 +17,7 @@ func NewWidget() *Widget {
TextWidget: wtf.NewTextWidget(" World Clocks ", "clocks", false),
}
widget.clockColl = widget.buildClockCollection(Config.UMap("wtf.mods.clocks.locations"))
widget.clockColl = widget.buildClockCollection(wtf.Config.UMap("wtf.mods.clocks.locations"))
return &widget
}

View File

@ -5,13 +5,9 @@ import (
"os/exec"
"strings"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
@ -24,8 +20,8 @@ func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" CmdRunner ", "cmdrunner", false),
args: wtf.ToStrs(Config.UList("wtf.mods.cmdrunner.args")),
cmd: Config.UString("wtf.mods.cmdrunner.cmd"),
args: wtf.ToStrs(wtf.Config.UList("wtf.mods.cmdrunner.args")),
cmd: wtf.Config.UString("wtf.mods.cmdrunner.cmd"),
}
widget.View.SetWrap(true)
@ -37,7 +33,7 @@ func (widget *Widget) Refresh() {
widget.UpdateRefreshedAt()
widget.execute()
title := Config.UString("wtf.mods.cmdrunner.title", widget.String())
title := wtf.Config.UString("wtf.mods.cmdrunner.title", widget.String())
widget.View.SetTitle(fmt.Sprintf("%s", title))
widget.View.SetText(fmt.Sprintf("%s", widget.result))

View File

@ -7,13 +7,9 @@ import (
"net/http"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type TextColors struct {
base struct {
name string
@ -55,17 +51,17 @@ func NewWidget() *Widget {
}
func (widget *Widget) config() {
widget.TextColors.base.name = Config.UString("wtf.mods.bittrex.colors.base.name", "red")
widget.TextColors.base.displayName = Config.UString("wtf.mods.bittrex.colors.base.displayName", "grey")
widget.TextColors.market.name = Config.UString("wtf.mods.bittrex.colors.market.name", "red")
widget.TextColors.market.field = Config.UString("wtf.mods.bittrex.colors.market.field", "coral")
widget.TextColors.market.value = Config.UString("wtf.mods.bittrex.colors.market.value", "white")
widget.TextColors.base.name = wtf.Config.UString("wtf.mods.bittrex.colors.base.name", "red")
widget.TextColors.base.displayName = wtf.Config.UString("wtf.mods.bittrex.colors.base.displayName", "grey")
widget.TextColors.market.name = wtf.Config.UString("wtf.mods.bittrex.colors.market.name", "red")
widget.TextColors.market.field = wtf.Config.UString("wtf.mods.bittrex.colors.market.field", "coral")
widget.TextColors.market.value = wtf.Config.UString("wtf.mods.bittrex.colors.market.value", "white")
}
func (widget *Widget) setSummaryList() {
sCurrencies, _ := Config.Map("wtf.mods.bittrex.summary")
sCurrencies, _ := wtf.Config.Map("wtf.mods.bittrex.summary")
for baseCurrencyName := range sCurrencies {
displayName, _ := Config.String("wtf.mods.bittrex.summary." + baseCurrencyName + ".displayName")
displayName, _ := wtf.Config.String("wtf.mods.bittrex.summary." + baseCurrencyName + ".displayName")
mCurrencyList := makeSummaryMarketList(baseCurrencyName)
widget.summaryList.addSummaryItem(baseCurrencyName, displayName, mCurrencyList)
}
@ -74,7 +70,7 @@ func (widget *Widget) setSummaryList() {
func makeSummaryMarketList(currencyName string) []*mCurrency {
mCurrencyList := []*mCurrency{}
configMarketList, _ := Config.List("wtf.mods.bittrex.summary." + currencyName + ".market")
configMarketList, _ := wtf.Config.List("wtf.mods.bittrex.summary." + currencyName + ".market")
for _, mCurrencyName := range configMarketList {
mCurrencyList = append(mCurrencyList, makeMarketCurrency(mCurrencyName.(string)))
}

View File

@ -7,14 +7,10 @@ import (
"log"
"net/http"
"github.com/olebedev/config"
"github.com/rivo/tview"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
@ -25,7 +21,7 @@ type Widget struct {
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" Blockfolio ", "blockfolio", false),
device_token: Config.UString("wtf.mods.blockfolio.device_token"),
device_token: wtf.Config.UString("wtf.mods.blockfolio.device_token"),
}
return &widget
@ -47,10 +43,10 @@ func (widget *Widget) Refresh() {
/* -------------------- Unexported Functions -------------------- */
func contentFrom(positions *AllPositionsResponse) string {
res := ""
colorName := Config.UString("wtf.mods.blockfolio.colors.name")
colorGrows := Config.UString("wtf.mods.blockfolio.colors.grows")
colorDrop := Config.UString("wtf.mods.blockfolio.colors.drop")
displayHoldings := Config.UBool("wtf.mods.blockfolio.displayHoldings")
colorName := wtf.Config.UString("wtf.mods.blockfolio.colors.name")
colorGrows := wtf.Config.UString("wtf.mods.blockfolio.colors.grows")
colorDrop := wtf.Config.UString("wtf.mods.blockfolio.colors.drop")
displayHoldings := wtf.Config.UBool("wtf.mods.blockfolio.displayHoldings")
var totalFiat float32
totalFiat = 0.0
for i := 0; i < len(positions.PositionList); i++ {

View File

@ -6,13 +6,9 @@ import (
"net/http"
"time"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
var baseURL = "https://min-api.cryptocompare.com/data/price"
var ok = true
@ -56,10 +52,10 @@ func (widget *Widget) Refresh() {
func (widget *Widget) display() {
str := ""
var (
fromNameColor = Config.UString("wtf.mods.cryptolive.colors.from.name", "coral")
fromDisplayNameColor = Config.UString("wtf.mods.cryptolive.colors.from.displayName", "grey")
toNameColor = Config.UString("wtf.mods.cryptolive.colors.to.name", "white")
toPriceColor = Config.UString("wtf.mods.cryptolive.colors.to.price", "green")
fromNameColor = wtf.Config.UString("wtf.mods.cryptolive.colors.from.name", "coral")
fromDisplayNameColor = wtf.Config.UString("wtf.mods.cryptolive.colors.from.displayName", "grey")
toNameColor = wtf.Config.UString("wtf.mods.cryptolive.colors.to.name", "white")
toPriceColor = wtf.Config.UString("wtf.mods.cryptolive.colors.to.price", "green")
)
for _, item := range widget.list.items {
str += fmt.Sprintf(" [%s]%s[%s] (%s)\n", fromNameColor, item.displayName, fromDisplayNameColor, item.name)
@ -73,7 +69,7 @@ func (widget *Widget) display() {
}
func getToList(fromName string) []*toCurrency {
toNames, _ := Config.List("wtf.mods.cryptolive.currencies." + fromName + ".to")
toNames, _ := wtf.Config.List("wtf.mods.cryptolive.currencies." + fromName + ".to")
var toList []*toCurrency
@ -88,12 +84,12 @@ func getToList(fromName string) []*toCurrency {
}
func (widget *Widget) setList() {
currenciesMap, _ := Config.Map("wtf.mods.cryptolive.currencies")
currenciesMap, _ := wtf.Config.Map("wtf.mods.cryptolive.currencies")
widget.list = &list{}
for currency := range currenciesMap {
displayName, _ := Config.String("wtf.mods.cryptolive.currencies." + currency + ".displayName")
displayName, _ := wtf.Config.String("wtf.mods.cryptolive.currencies." + currency + ".displayName")
toList := getToList(currency)
widget.list.addItem(currency, displayName, toList)
}

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -81,6 +81,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -88,6 +89,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -80,6 +80,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +88,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>
@ -128,6 +130,7 @@
<a href="https://github.com/senorprogrammer/wtf/releases" class="button button-small">Download Latest</a>
<a href="https://github.com/senorprogrammer/wtf" class="button button-small">Source on Github</a>
<a href="https://gitter.im/wtfutil/Lobby" class="button button-small">Chat on Gitter</a>
<a href="https://twitter.com/wtfutil" class="button button-small">Follow on Twitter</a>
<p>
<small>

View File

@ -6,11 +6,24 @@
<description>Recent content on WTF - A Terminal Dashboard</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 13 Jun 2018 09:29:59 -0700</lastBuildDate>
<lastBuildDate>Sat, 16 Jun 2018 14:22:18 -0700</lastBuildDate>
<atom:link href="https://wtfutil.com/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Logger</title>
<link>https://wtfutil.com/posts/modules/logger/</link>
<pubDate>Sat, 16 Jun 2018 14:22:18 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/logger/</guid>
<description>Displays the contents of the WTF log file.
To log to this file in your own modules:
require &amp;#34;github.com/senorprogrammer/wtf/logger&amp;#34; logger.Log(&amp;#34;This is a log entry&amp;#34;) Source Code wtf/logger/ Required ENV Variables None.
Keyboard Commands Arrow keys scroll through the log file.
Configuration logger:enabled:trueposition:top:5left:4height:2width:1refreshInterval:1 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen. Note: If you&amp;rsquo;re using logging and logging is disabled, your logs will still be written to file, the widget just won&amp;rsquo;t be shown onscreen.</description>
</item>
<item>
<title>Blockfolio</title>
<link>https://wtfutil.com/posts/modules/cryptocurrencies/blockfolio/</link>
@ -266,8 +279,21 @@ Key: j Action: Select the next item in the list.</description>
<description>Displays all Jira issues assigned to you for the specified project.
Source Code wtf/jira/ Required ENV Variables Key: WTF_JIRA_API_KEY Value: Your Jira API key.
Keyboard Commands None.
Configuration Single Jira Project jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:&amp;#34;ProjectA&amp;#34;refreshInterval:900username:&amp;#34;chris.cummer&amp;#34; Multiple Jira Projects If you want to monitor multiple Jira projects, use the following configuration (note the difference in project):
jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:[&amp;#34;ProjectA&amp;#34;,&amp;#34;ProjectB&amp;#34;]refreshInterval:900username:&amp;#34;chris.cummer&amp;#34; Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.</description>
Configuration Single Jira Project jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:&amp;#34;ProjectA&amp;#34;refreshInterval:900username:&amp;#34;chris.cummer&amp;#34;verifyServerCertificate:true Multiple Jira Projects If you want to monitor multiple Jira projects, use the following configuration (note the difference in project):
jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:[&amp;#34;ProjectA&amp;#34;,&amp;#34;ProjectB&amp;#34;]refreshInterval:900username:&amp;#34;chris.cummer&amp;#34;verifyServerCertificate:true Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.</description>
</item>
<item>
<title>Trello</title>
<link>https://wtfutil.com/posts/modules/trello/</link>
<pubDate>Thu, 10 May 2018 10:44:35 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/trello/</guid>
<description>Displays all Trello cards on specified lists.
Source Code wtf/trello/ Required ENV Variables Key: WTF_TRELLO_APP_KEY Value: Your Trello App Key. Key: WTF_TRELLO_ACCESS_TOKEN Value: Your Trello Access Token. You can get your API key at: trello.com/app-key.
Keyboard Commands None.
Configuration Single Trello List trello:board:Mainenabled:truelist:&amp;#34;Todo&amp;#34;position:height:1left:2top:0width:1refreshInterval:3600username:myname Multiple Trello Lists If you want to monitor multiple Trello lists, use the following configuration (note the difference in list):
trello:board:Mainenabled:truelist:[&amp;#34;Todo&amp;#34;,&amp;#34;Done&amp;#34;]position:height:1left:2top:0width:1refreshInterval:3600username:myname Attributes board The name of the Trello board.</description>
</item>
<item>
@ -280,7 +306,7 @@ jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;doma
Not: Setting up access to Google Calendars for Go is a bit unobvious. Check out Google&amp;rsquo;s Go Quickstart first and if you have problems, then take a look at this comment by WesleydeSouza which offers a slightly different approach.
Source Code wtf/gcal/ Required ENV Variables None.
Keyboard Commands None.
Configuration gcal:colors:title:&amp;#34;red&amp;#34;description:&amp;#34;lightblue&amp;#34;highlights:-[&amp;#39;1on1|1\/11&amp;#39;,&amp;#39;green&amp;#39;]-[&amp;#39;apple|google|aws&amp;#39;,&amp;#39;blue&amp;#39;]-[&amp;#39;interview|meet&amp;#39;,&amp;#39;magenta&amp;#39;]-[&amp;#39;lunch&amp;#39;,&amp;#39;yellow&amp;#39;]past:&amp;#34;gray&amp;#34;conflictIcon:&amp;#34;🚨&amp;#34;currentIcon:&amp;#34;💥&amp;#34;displayResponseStatus:trueemail:&amp;#34;chriscummer@me.com&amp;#34;enabled:trueeventCount:12position:top:0left:0height:4width:1refreshInterval:300secretFile:&amp;#34;~/.wtf/gcal/client_secret.json&amp;#34;withLocation:true Attributes colors.title The default colour for calendar event titles. Values: Any X11 color name.</description>
Configuration gcal:colors:title:&amp;#34;red&amp;#34;description:&amp;#34;lightblue&amp;#34;highlights:-[&amp;#39;1on1|1\/11&amp;#39;,&amp;#39;green&amp;#39;]-[&amp;#39;apple|google|aws&amp;#39;,&amp;#39;blue&amp;#39;]-[&amp;#39;interview|meet&amp;#39;,&amp;#39;magenta&amp;#39;]-[&amp;#39;lunch&amp;#39;,&amp;#39;yellow&amp;#39;]past:&amp;#34;gray&amp;#34;conflictIcon:&amp;#34;🚨&amp;#34;currentIcon:&amp;#34;💥&amp;#34;displayResponseStatus:trueemail:&amp;#34;chriscummer@me.com&amp;#34;enabled:trueeventCount:12multiCalendar:trueposition:top:0left:0height:4width:1refreshInterval:300secretFile:&amp;#34;~/.wtf/gcal/client_secret.json&amp;#34;withLocation:true Attributes colors.title The default colour for calendar event titles. Values: Any X11 color name.</description>
</item>
<item>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -81,6 +81,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -88,6 +89,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>
@ -105,6 +107,13 @@
<h1 class="title">Posts</h1>
<ul class="posts">
<li>
<span>
<a href="https://wtfutil.com/posts/modules/logger/">Logger</a>
<time class="pull-right post-list">Jun 16, 2018</time>
</span>
</li><li>
<span>
<a href="https://wtfutil.com/posts/modules/cryptocurrencies/blockfolio/">Blockfolio</a>
@ -229,6 +238,13 @@
<time class="pull-right post-list">May 10, 2018</time>
</span>
</li><li>
<span>
<a href="https://wtfutil.com/posts/modules/trello/">Trello</a>
<time class="pull-right post-list">May 10, 2018</time>
</span>
</li><li>
<span>

View File

@ -6,11 +6,24 @@
<description>Recent content in Posts on WTF - A Terminal Dashboard</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 13 Jun 2018 09:29:59 -0700</lastBuildDate>
<lastBuildDate>Sat, 16 Jun 2018 14:22:18 -0700</lastBuildDate>
<atom:link href="https://wtfutil.com/posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Logger</title>
<link>https://wtfutil.com/posts/modules/logger/</link>
<pubDate>Sat, 16 Jun 2018 14:22:18 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/logger/</guid>
<description>Displays the contents of the WTF log file.
To log to this file in your own modules:
require &amp;#34;github.com/senorprogrammer/wtf/logger&amp;#34; logger.Log(&amp;#34;This is a log entry&amp;#34;) Source Code wtf/logger/ Required ENV Variables None.
Keyboard Commands Arrow keys scroll through the log file.
Configuration logger:enabled:trueposition:top:5left:4height:2width:1refreshInterval:1 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen. Note: If you&amp;rsquo;re using logging and logging is disabled, your logs will still be written to file, the widget just won&amp;rsquo;t be shown onscreen.</description>
</item>
<item>
<title>Blockfolio</title>
<link>https://wtfutil.com/posts/modules/cryptocurrencies/blockfolio/</link>
@ -266,8 +279,21 @@ Key: j Action: Select the next item in the list.</description>
<description>Displays all Jira issues assigned to you for the specified project.
Source Code wtf/jira/ Required ENV Variables Key: WTF_JIRA_API_KEY Value: Your Jira API key.
Keyboard Commands None.
Configuration Single Jira Project jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:&amp;#34;ProjectA&amp;#34;refreshInterval:900username:&amp;#34;chris.cummer&amp;#34; Multiple Jira Projects If you want to monitor multiple Jira projects, use the following configuration (note the difference in project):
jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:[&amp;#34;ProjectA&amp;#34;,&amp;#34;ProjectB&amp;#34;]refreshInterval:900username:&amp;#34;chris.cummer&amp;#34; Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.</description>
Configuration Single Jira Project jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:&amp;#34;ProjectA&amp;#34;refreshInterval:900username:&amp;#34;chris.cummer&amp;#34;verifyServerCertificate:true Multiple Jira Projects If you want to monitor multiple Jira projects, use the following configuration (note the difference in project):
jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:[&amp;#34;ProjectA&amp;#34;,&amp;#34;ProjectB&amp;#34;]refreshInterval:900username:&amp;#34;chris.cummer&amp;#34;verifyServerCertificate:true Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.</description>
</item>
<item>
<title>Trello</title>
<link>https://wtfutil.com/posts/modules/trello/</link>
<pubDate>Thu, 10 May 2018 10:44:35 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/trello/</guid>
<description>Displays all Trello cards on specified lists.
Source Code wtf/trello/ Required ENV Variables Key: WTF_TRELLO_APP_KEY Value: Your Trello App Key. Key: WTF_TRELLO_ACCESS_TOKEN Value: Your Trello Access Token. You can get your API key at: trello.com/app-key.
Keyboard Commands None.
Configuration Single Trello List trello:board:Mainenabled:truelist:&amp;#34;Todo&amp;#34;position:height:1left:2top:0width:1refreshInterval:3600username:myname Multiple Trello Lists If you want to monitor multiple Trello lists, use the following configuration (note the difference in list):
trello:board:Mainenabled:truelist:[&amp;#34;Todo&amp;#34;,&amp;#34;Done&amp;#34;]position:height:1left:2top:0width:1refreshInterval:3600username:myname Attributes board The name of the Trello board.</description>
</item>
<item>
@ -280,7 +306,7 @@ jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;doma
Not: Setting up access to Google Calendars for Go is a bit unobvious. Check out Google&amp;rsquo;s Go Quickstart first and if you have problems, then take a look at this comment by WesleydeSouza which offers a slightly different approach.
Source Code wtf/gcal/ Required ENV Variables None.
Keyboard Commands None.
Configuration gcal:colors:title:&amp;#34;red&amp;#34;description:&amp;#34;lightblue&amp;#34;highlights:-[&amp;#39;1on1|1\/11&amp;#39;,&amp;#39;green&amp;#39;]-[&amp;#39;apple|google|aws&amp;#39;,&amp;#39;blue&amp;#39;]-[&amp;#39;interview|meet&amp;#39;,&amp;#39;magenta&amp;#39;]-[&amp;#39;lunch&amp;#39;,&amp;#39;yellow&amp;#39;]past:&amp;#34;gray&amp;#34;conflictIcon:&amp;#34;🚨&amp;#34;currentIcon:&amp;#34;💥&amp;#34;displayResponseStatus:trueemail:&amp;#34;chriscummer@me.com&amp;#34;enabled:trueeventCount:12position:top:0left:0height:4width:1refreshInterval:300secretFile:&amp;#34;~/.wtf/gcal/client_secret.json&amp;#34;withLocation:true Attributes colors.title The default colour for calendar event titles. Values: Any X11 color name.</description>
Configuration gcal:colors:title:&amp;#34;red&amp;#34;description:&amp;#34;lightblue&amp;#34;highlights:-[&amp;#39;1on1|1\/11&amp;#39;,&amp;#39;green&amp;#39;]-[&amp;#39;apple|google|aws&amp;#39;,&amp;#39;blue&amp;#39;]-[&amp;#39;interview|meet&amp;#39;,&amp;#39;magenta&amp;#39;]-[&amp;#39;lunch&amp;#39;,&amp;#39;yellow&amp;#39;]past:&amp;#34;gray&amp;#34;conflictIcon:&amp;#34;🚨&amp;#34;currentIcon:&amp;#34;💥&amp;#34;displayResponseStatus:trueemail:&amp;#34;chriscummer@me.com&amp;#34;enabled:trueeventCount:12multiCalendar:trueposition:top:0left:0height:4width:1refreshInterval:300secretFile:&amp;#34;~/.wtf/gcal/client_secret.json&amp;#34;withLocation:true Attributes colors.title The default colour for calendar event titles. Values: Any X11 color name.</description>
</item>
<item>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>
@ -153,6 +155,7 @@ first and if you have problems, then take a look at this <a href="https://github
</span><span class="w"> </span>email<span class="p">:</span><span class="w"> </span><span class="s2">&#34;chriscummer@me.com&#34;</span><span class="w">
</span><span class="w"> </span>enabled<span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"> </span>eventCount<span class="p">:</span><span class="w"> </span><span class="m">12</span><span class="w">
</span><span class="w"> </span>multiCalendar<span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"> </span>position<span class="p">:</span><span class="w">
</span><span class="w"> </span>top<span class="p">:</span><span class="w"> </span><span class="m">0</span><span class="w">
</span><span class="w"> </span>left<span class="p">:</span><span class="w"> </span><span class="m">0</span><span class="w">
@ -212,6 +215,11 @@ Values: <code>true</code>, <code>false</code>.</p>
The number of calendar events to display. <br />
Values: A positive integer, <code>0..n</code>.</p>
<p><code>multiCalendar</code> <br />
Whether or not to display your primary calendar or all calendars you
have access to. <br />
Values: <code>true</code>, or <code>false</code></p>
<p><code>position</code> <br />
Where in the grid this module&rsquo;s widget will be displayed. <br /></p>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>
@ -163,6 +165,8 @@ commit, and their status.</p>
<h2 id="configuration">Configuration</h2>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">git<span class="p">:</span><span class="w">
</span><span class="w"> </span>commitCount<span class="p">:</span><span class="w"> </span><span class="m">5</span><span class="w">
</span><span class="w"> </span>commitFormat<span class="p">:</span><span class="w"> </span><span class="s2">&#34;[forestgreen]%h [grey]%cd [white]%s [grey]%an[white]&#34;</span><span class="w">
</span><span class="w"> </span>dateFormat<span class="p">:</span><span class="w"> </span><span class="s2">&#34;%H:%M %d %b %y&#34;</span><span class="w">
</span><span class="w"> </span>enabled<span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"> </span>position<span class="p">:</span><span class="w">
</span><span class="w"> </span>top<span class="p">:</span><span class="w"> </span><span class="m">0</span><span class="w">
@ -179,6 +183,13 @@ commit, and their status.</p>
The number of past commits to display. <br />
Values: A positive integer, <code>0..n</code>.</p>
<p><code>commitFormat</code> <br />
<em>Optional</em> The string format for the commit message. <br /></p>
<p><code>dateFormat</code> <br />
<em>Optional</em> The string format for the date/time in the commit message.
<br /></p>
<p><code>enabled</code> <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
Values: <code>true</code>, <code>false</code>.</p>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>
@ -153,7 +155,8 @@
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w">
</span><span class="w"> </span>project<span class="p">:</span><span class="w"> </span><span class="s2">&#34;ProjectA&#34;</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">900</span><span class="w">
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span><span class="s2">&#34;chris.cummer&#34;</span></code></pre></div>
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span><span class="s2">&#34;chris.cummer&#34;</span><span class="w">
</span><span class="w"> </span>verifyServerCertificate<span class="p">:</span><span class="w"> </span><span class="kc">true</span></code></pre></div>
<h3 id="multiple-jira-projects">Multiple Jira Projects</h3>
<p>If you want to monitor multiple Jira projects, use the following
@ -174,7 +177,8 @@ configuration (note the difference in <code>project</code>):</p>
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w">
</span><span class="w"> </span>project<span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">&#34;ProjectA&#34;</span><span class="p">,</span><span class="w"> </span><span class="s2">&#34;ProjectB&#34;</span><span class="p">]</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">900</span><span class="w">
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span><span class="s2">&#34;chris.cummer&#34;</span></code></pre></div>
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span><span class="s2">&#34;chris.cummer&#34;</span><span class="w">
</span><span class="w"> </span>verifyServerCertificate<span class="p">:</span><span class="w"> </span><span class="kc">true</span></code></pre></div>
<h3 id="attributes">Attributes</h3>
<p><code>colors.rows.even</code> <br />
@ -217,6 +221,11 @@ Values: A positive integer, <code>0..n</code>.</p>
<p><code>username</code> <br />
Your Jira username. <br /></p>
<p><code>verifyServerCertificate</code> <br />
<em>Optional</em> <br />
Determines whether or not the server&rsquo;s certificate chain and host name are verified. <br />
Values: <code>true</code>, <code>false</code>.</p>
</div>
<div class="footer">

View File

@ -0,0 +1,176 @@
<!DOCTYPE html>
<html lang="en-us" class="wf-firasans-n4-active wf-active">
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Enable responsiveness on mobile devices -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="generator" content="Hugo 0.38.2" />
<title>Logger | WTF - A Terminal Dashboard</title>
<meta content="Logger - WTF - A Terminal Dashboard" property="og:title">
<meta content=" - " property="og:description">
<!-- CSS -->
<link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css">
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i|Roboto+Mono:300,300i,400,400i" rel="stylesheet">
<link rel="stylesheet" href="https://wtfutil.com/css/print.css" media="print">
<link rel="stylesheet" href="https://wtfutil.com/css/poole.css">
<link rel="stylesheet" href="https://wtfutil.com/css/hyde.css">
<link rel="stylesheet" href="https://wtfutil.com/css/syntax.css">
<link rel="stylesheet" href="https://wtfutil.com/css/wtf.css">
<!-- Font-Awesome -->
<script defer src="https://use.fontawesome.com/releases/v5.0.9/js/all.js" integrity="sha384-8iPTk2s/jMVj81dnzb/iFR2sdA7u06vHJyyLlAd4snFpCl/SnyUjRrbdJsw1pGIl" crossorigin="anonymous"></script>
<!-- Customised CSS -->
<link rel="stylesheet" href="https://wtfutil.com/css/custom.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/favicon.png">
<script async defer src="https://buttons.github.io/buttons.js"></script>
</head>
<body>
<div class="sidebar">
<div class="container">
<div class="sidebar-about text-center">
<a href="https://wtfutil.com/"> <img src="/img/wtf.png" alt="WFT Logo" class="" width=""> </a>
<p class="lead">
</p>
</div>
<div>
<h3 style="color: white;">Content</h3>
<ul style="list-style-type: none;">
<li class="sidebar-list-item-1"><a href="/posts/overview/">Overview</a></li>
<li class="sidebar-list-item-1"><a href="/posts/installation/">Installation</a></li>
<li class="sidebar-list-item-1"><a href="/posts/configuration/">Configuration</a></li>
<li class="sidebar-list-item-2"><a href="/posts/configuration/attributes/">Attributes</a></li>
<li class="sidebar-list-item-2"><a href="/posts/configuration/iterm2/">iTerm2</a></li>
<li class="sidebar-list-item-1"><a href="https://github.com/senorprogrammer/wtf/releases">Releases</a></li>
</ul>
<ul style="list-style-type: none;">
<li class="sidebar-list-item-1"><a href="/posts/modules/">Modules</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/cryptocurrencies/bittrex/">Bittrex</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/cryptocurrencies/blockfolio/">Blockfolio</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/circleci/">CircleCI</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/cryptocurrencies/cryptolive/">CryptoLive</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/cmdrunner/">CmdRunner</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">GitHub</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">Gitlab</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>
<p class="copyright">
&copy; 2018 Chris Cummer.
<br />
<a href="https://creativecommons.org/licenses/by/4.0">Some Rights Reserved</a>.
</p>
</div>
</div>
<div class="content container">
<div class="post">
<h1>Logger</h1>
<div class="col-sm-12 col-md-12">
<span class="text-left post-date meta">
Jun 16, 2018
<br/>
</span>
</div>
<p>Displays the contents of the WTF log file.</p>
<p>To log to this file in your own modules:</p>
<div class="highlight"><pre class="chroma"><code class="language-golang" data-lang="golang"><span class="nx">require</span> <span class="s">&#34;github.com/senorprogrammer/wtf/logger&#34;</span>
<span class="nx">logger</span><span class="p">.</span><span class="nx">Log</span><span class="p">(</span><span class="s">&#34;This is a log entry&#34;</span><span class="p">)</span></code></pre></div>
<h2 id="source-code">Source Code</h2>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">wtf/logger/</code></pre></div>
<h2 id="required-env-variables">Required ENV Variables</h2>
<p>None.</p>
<h2 id="keyboard-commands">Keyboard Commands</h2>
<p>Arrow keys scroll through the log file.</p>
<h2 id="configuration">Configuration</h2>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">logger<span class="p">:</span><span class="w">
</span><span class="w"> </span>enabled<span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"> </span>position<span class="p">:</span><span class="w">
</span><span class="w"> </span>top<span class="p">:</span><span class="w"> </span><span class="m">5</span><span class="w">
</span><span class="w"> </span>left<span class="p">:</span><span class="w"> </span><span class="m">4</span><span class="w">
</span><span class="w"> </span>height<span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w">
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">1</span></code></pre></div>
<h3 id="attributes">Attributes</h3>
<p><code>enabled</code> <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
<strong>Note:</strong> If you&rsquo;re using logging and logging is <em>disabled</em>, your logs
will still be written to file, the widget just won&rsquo;t be shown onscreen.
If you have <code>logger.Log</code> calls in your code, regardless of this setting,
they will be written out. <br />
Values: <code>true</code>, <code>false</code>.</p>
<p><code>position</code> <br />
Defines where in the grid this module&rsquo;s widget will be displayed. <br /></p>
<p><code>refreshInterval</code> <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, <code>0..n</code>.</p>
</div>
<div class="footer">
</div>
</div>
</body>
</html>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -0,0 +1,205 @@
<!DOCTYPE html>
<html lang="en-us" class="wf-firasans-n4-active wf-active">
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Enable responsiveness on mobile devices -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="generator" content="Hugo 0.38.2" />
<title>Trello | WTF - A Terminal Dashboard</title>
<meta content="Trello - WTF - A Terminal Dashboard" property="og:title">
<meta content=" - " property="og:description">
<!-- CSS -->
<link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css">
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i|Roboto+Mono:300,300i,400,400i" rel="stylesheet">
<link rel="stylesheet" href="https://wtfutil.com/css/print.css" media="print">
<link rel="stylesheet" href="https://wtfutil.com/css/poole.css">
<link rel="stylesheet" href="https://wtfutil.com/css/hyde.css">
<link rel="stylesheet" href="https://wtfutil.com/css/syntax.css">
<link rel="stylesheet" href="https://wtfutil.com/css/wtf.css">
<!-- Font-Awesome -->
<script defer src="https://use.fontawesome.com/releases/v5.0.9/js/all.js" integrity="sha384-8iPTk2s/jMVj81dnzb/iFR2sdA7u06vHJyyLlAd4snFpCl/SnyUjRrbdJsw1pGIl" crossorigin="anonymous"></script>
<!-- Customised CSS -->
<link rel="stylesheet" href="https://wtfutil.com/css/custom.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/favicon.png">
<script async defer src="https://buttons.github.io/buttons.js"></script>
</head>
<body>
<div class="sidebar">
<div class="container">
<div class="sidebar-about text-center">
<a href="https://wtfutil.com/"> <img src="/img/wtf.png" alt="WFT Logo" class="" width=""> </a>
<p class="lead">
</p>
</div>
<div>
<h3 style="color: white;">Content</h3>
<ul style="list-style-type: none;">
<li class="sidebar-list-item-1"><a href="/posts/overview/">Overview</a></li>
<li class="sidebar-list-item-1"><a href="/posts/installation/">Installation</a></li>
<li class="sidebar-list-item-1"><a href="/posts/configuration/">Configuration</a></li>
<li class="sidebar-list-item-2"><a href="/posts/configuration/attributes/">Attributes</a></li>
<li class="sidebar-list-item-2"><a href="/posts/configuration/iterm2/">iTerm2</a></li>
<li class="sidebar-list-item-1"><a href="https://github.com/senorprogrammer/wtf/releases">Releases</a></li>
</ul>
<ul style="list-style-type: none;">
<li class="sidebar-list-item-1"><a href="/posts/modules/">Modules</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/cryptocurrencies/bittrex/">Bittrex</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/cryptocurrencies/blockfolio/">Blockfolio</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/circleci/">CircleCI</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/cryptocurrencies/cryptolive/">CryptoLive</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/cmdrunner/">CmdRunner</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">GitHub</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">Gitlab</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>
<p class="copyright">
&copy; 2018 Chris Cummer.
<br />
<a href="https://creativecommons.org/licenses/by/4.0">Some Rights Reserved</a>.
</p>
</div>
</div>
<div class="content container">
<div class="post">
<h1>Trello</h1>
<div class="col-sm-12 col-md-12">
<span class="text-left post-date meta">
May 10, 2018
<br/>
</span>
</div>
<p>Displays all Trello cards on specified lists.</p>
<p><img src="/imgs/modules/trello.png" width="640" height="188" alt="trello screenshot" /></p>
<h2 id="source-code">Source Code</h2>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">wtf/trello/</code></pre></div>
<h2 id="required-env-variables">Required ENV Variables</h2>
<p><span class="caption">Key:</span> <code>WTF_TRELLO_APP_KEY</code> <br />
<span class="caption">Value:</span> Your Trello App Key. <br />
<span class="caption">Key:</span> <code>WTF_TRELLO_ACCESS_TOKEN</code> <br />
<span class="caption">Value:</span> Your Trello Access Token. <br /></p>
<p><em>You can get your API key at: trello.com/app-key.</em></p>
<h2 id="keyboard-commands">Keyboard Commands</h2>
<p>None.</p>
<h2 id="configuration">Configuration</h2>
<h3 id="single-trello-list">Single Trello List</h3>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">trello<span class="p">:</span><span class="w">
</span><span class="w"> </span>board<span class="p">:</span><span class="w"> </span>Main<span class="w">
</span><span class="w"> </span>enabled<span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"> </span>list<span class="p">:</span><span class="w"> </span><span class="s2">&#34;Todo&#34;</span><span class="w">
</span><span class="w"> </span>position<span class="p">:</span><span class="w">
</span><span class="w"> </span>height<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>left<span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w">
</span><span class="w"> </span>top<span class="p">:</span><span class="w"> </span><span class="m">0</span><span class="w">
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">3600</span><span class="w">
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span>myname</code></pre></div>
<h3 id="multiple-trello-lists">Multiple Trello Lists</h3>
<p>If you want to monitor multiple Trello lists, use the following
configuration (note the difference in <code>list</code>):</p>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">trello<span class="p">:</span><span class="w">
</span><span class="w"> </span>board<span class="p">:</span><span class="w"> </span>Main<span class="w">
</span><span class="w"> </span>enabled<span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"> </span>list<span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">&#34;Todo&#34;</span><span class="p">,</span><span class="w"> </span><span class="s2">&#34;Done&#34;</span><span class="p">]</span><span class="w">
</span><span class="w"> </span>position<span class="p">:</span><span class="w">
</span><span class="w"> </span>height<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>left<span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w">
</span><span class="w"> </span>top<span class="p">:</span><span class="w"> </span><span class="m">0</span><span class="w">
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">3600</span><span class="w">
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span>myname</code></pre></div>
<h3 id="attributes">Attributes</h3>
<p><code>board</code> <br />
The name of the Trello board. <br /></p>
<p><code>enabled</code> <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
Values: <code>true</code>, <code>false</code>.</p>
<p><code>list</code> <br />
The Trello lists to fetch cards from. <br /></p>
<p><code>refreshInterval</code> <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, <code>0..n</code>.</p>
<p><code>username</code> <br />
Your Trello username. <br /></p>
<p><code>position</code> <br />
Where in the grid this module&rsquo;s widget will be displayed. <br /></p>
</div>
<div class="footer">
</div>
</div>
</body>
</html>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -79,6 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -86,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -2,6 +2,11 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://wtfutil.com/posts/modules/logger/</loc>
<lastmod>2018-06-16T14:22:18-07:00</lastmod>
</url>
<url>
<loc>https://wtfutil.com/posts/modules/cryptocurrencies/blockfolio/</loc>
<lastmod>2018-06-13T09:29:59-07:00</lastmod>
@ -92,6 +97,11 @@
<lastmod>2018-05-10T10:44:35-07:00</lastmod>
</url>
<url>
<loc>https://wtfutil.com/posts/modules/trello/</loc>
<lastmod>2018-05-10T10:44:35-07:00</lastmod>
</url>
<url>
<loc>https://wtfutil.com/posts/modules/gcal/</loc>
<lastmod>2018-05-10T08:25:33-07:00</lastmod>
@ -164,7 +174,7 @@
<url>
<loc>https://wtfutil.com/posts/</loc>
<lastmod>2018-06-13T09:29:59-07:00</lastmod>
<lastmod>2018-06-16T14:22:18-07:00</lastmod>
<priority>0</priority>
</url>
@ -175,7 +185,7 @@
<url>
<loc>https://wtfutil.com/</loc>
<lastmod>2018-06-13T09:29:59-07:00</lastmod>
<lastmod>2018-06-16T14:22:18-07:00</lastmod>
<priority>0</priority>
</url>

View File

@ -81,6 +81,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -88,6 +89,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

73
flags/flags.go Normal file
View File

@ -0,0 +1,73 @@
package flags
import (
"fmt"
"os"
"path/filepath"
goFlags "github.com/jessevdk/go-flags"
"github.com/senorprogrammer/wtf/help"
"github.com/senorprogrammer/wtf/wtf"
)
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'"`
Version bool `short:"v" long:"version" description:"Show version info"`
}
func NewFlags() *Flags {
flags := Flags{}
return &flags
}
/* -------------------- Exported Functions -------------------- */
func (flags *Flags) ConfigFilePath() string {
return flags.Config
}
func (flags *Flags) Display(version string) {
if flags.HasModule() {
help.Display(flags.Module)
os.Exit(0)
}
if flags.HasVersion() {
fmt.Println(version)
os.Exit(0)
}
}
func (flags *Flags) HasConfig() bool {
return len(flags.Config) > 0
}
func (flags *Flags) HasModule() bool {
return len(flags.Module) > 0
}
func (flags *Flags) HasVersion() bool {
return flags.Version == true
}
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 {
os.Exit(0)
}
}
// If no config file is explicitly passed in as a param,
// set the flag to the default config file
if !flags.HasConfig() {
homeDir, err := wtf.Home()
if err != nil {
fmt.Printf("Error: %v\n", err)
os.Exit(1)
}
flags.Config = filepath.Join(homeDir, ".wtf", "config.yml")
}
}

View File

@ -16,6 +16,7 @@ import (
"os"
"os/user"
"path/filepath"
"sort"
"time"
"github.com/senorprogrammer/wtf/wtf"
@ -29,7 +30,7 @@ import (
func Fetch() (*calendar.Events, error) {
ctx := context.Background()
secretPath, _ := wtf.ExpandHomeDir(Config.UString("wtf.mods.gcal.secretFile"))
secretPath, _ := wtf.ExpandHomeDir(wtf.Config.UString("wtf.mods.gcal.secretFile"))
b, err := ioutil.ReadFile(secretPath)
if err != nil {
@ -47,14 +48,40 @@ func Fetch() (*calendar.Events, error) {
return nil, err
}
calendarIds, err := getCalendarIdList(srv)
// Get calendar events
var events calendar.Events
startTime := fromMidnight().Format(time.RFC3339)
eventLimit := int64(Config.UInt("wtf.mods.gcal.eventCount", 10))
events, err := srv.Events.List("primary").ShowDeleted(false).SingleEvents(true).TimeMin(startTime).MaxResults(eventLimit).OrderBy("startTime").Do()
eventLimit := int64(wtf.Config.UInt("wtf.mods.gcal.eventCount", 10))
for _, calendarId := range calendarIds {
calendarEvents, err := srv.Events.List(calendarId).ShowDeleted(false).TimeMin(startTime).MaxResults(eventLimit).SingleEvents(true).OrderBy("startTime").Do()
if err != nil {
break
}
events.Items = append(events.Items, calendarEvents.Items...)
}
if err != nil {
return nil, err
}
return events, err
// Sort events
timeDateChooser := func(event *calendar.Event) (time.Time, error) {
if len(event.Start.Date) > 0 {
return time.Parse("2006-01-02", event.Start.Date)
} else {
return time.Parse(time.RFC3339, event.Start.DateTime)
}
}
sort.Slice(events.Items, func(i, j int) bool {
dateA, _ := timeDateChooser(events.Items[i])
dateB, _ := timeDateChooser(events.Items[j])
return dateA.Before(dateB)
})
return &events, err
}
/* -------------------- Unexported Functions -------------------- */
@ -136,3 +163,33 @@ func saveToken(file string, token *oauth2.Token) {
json.NewEncoder(f).Encode(token)
}
func getCalendarIdList(srv *calendar.Service) ([]string, error) {
// Return single calendar if settings specify we should
if !wtf.Config.UBool("wtf.mods.gcal.multiCalendar", false) {
id, err := srv.CalendarList.Get("primary").Do()
if err != nil {
return nil, err
}
return []string{id.Id}, nil
}
// Get all user calendars with at the least writing access
var calendarIds []string
var pageToken string
for {
calendarList, err := srv.CalendarList.List().ShowHidden(false).MinAccessRole("writer").PageToken(pageToken).Do()
if err != nil {
return nil, err
}
for _, calendarListItem := range calendarList.Items {
calendarIds = append(calendarIds, calendarListItem.Id)
}
pageToken = calendarList.NextPageToken
if pageToken == "" {
break
}
}
return calendarIds, nil
}

View File

@ -4,25 +4,29 @@ import (
"fmt"
"regexp"
"strings"
"sync"
"time"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
"google.golang.org/api/calendar/v3"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
events *calendar.Events
ch chan struct{}
mutex sync.Mutex
}
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" Calendar ", "gcal", false),
ch: make(chan struct{}),
}
go updateLoop(&widget)
return &widget
}
@ -30,14 +34,30 @@ func NewWidget() *Widget {
func (widget *Widget) Refresh() {
events, _ := Fetch()
widget.events = events
widget.UpdateRefreshedAt()
widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(events)))
widget.display()
}
func (widget *Widget) Disable() {
close(widget.ch)
widget.TextWidget.Disable()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) display() {
if widget.events == nil || len(widget.events.Items) == 0 {
return
}
widget.mutex.Lock()
defer widget.mutex.Unlock()
widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(widget.events)))
}
// conflicts returns TRUE if this event conflicts with another, FALSE if it does not
func (widget *Widget) conflicts(event *calendar.Event, events *calendar.Events) bool {
conflict := false
@ -105,10 +125,10 @@ func (widget *Widget) dayDivider(event, prevEvent *calendar.Event) string {
}
func (widget *Widget) descriptionColor(event *calendar.Event) string {
color := Config.UString("wtf.mods.gcal.colors.description", "white")
color := wtf.Config.UString("wtf.mods.gcal.colors.description", "white")
if widget.eventIsPast(event) {
color = Config.UString("wtf.mods.gcal.colors.past", "gray")
color = wtf.Config.UString("wtf.mods.gcal.colors.past", "gray")
}
return color
@ -120,22 +140,27 @@ func (widget *Widget) eventSummary(event *calendar.Event, conflict bool) string
if widget.eventIsNow(event) {
summary = fmt.Sprintf(
"%s %s",
Config.UString("wtf.mods.gcal.currentIcon", "🔸"),
wtf.Config.UString("wtf.mods.gcal.currentIcon", "🔸"),
event.Summary,
)
}
if conflict {
return fmt.Sprintf("%s %s", Config.UString("wtf.mods.gcal.conflictIcon", "🚨"), summary)
return fmt.Sprintf("%s %s", wtf.Config.UString("wtf.mods.gcal.conflictIcon", "🚨"), summary)
} else {
return summary
}
}
func (widget *Widget) eventTimestamp(event *calendar.Event) string {
if len(event.Start.Date) > 0 {
startTime, _ := time.Parse("2006-01-02", event.Start.Date)
return startTime.Format(wtf.FriendlyDateFormat)
} else {
startTime, _ := time.Parse(time.RFC3339, event.Start.DateTime)
return startTime.Format(wtf.FriendlyDateTimeFormat)
}
}
// eventIsNow returns true if the event is happening now, false if it not
func (widget *Widget) eventIsNow(event *calendar.Event) bool {
@ -151,9 +176,9 @@ func (widget *Widget) eventIsPast(event *calendar.Event) bool {
}
func (widget *Widget) titleColor(event *calendar.Event) string {
color := Config.UString("wtf.mods.gcal.colors.title", "white")
color := wtf.Config.UString("wtf.mods.gcal.colors.title", "white")
for _, untypedArr := range Config.UList("wtf.mods.gcal.colors.highlights") {
for _, untypedArr := range wtf.Config.UList("wtf.mods.gcal.colors.highlights") {
highlightElements := wtf.ToStrs(untypedArr.([]interface{}))
match, _ := regexp.MatchString(
@ -167,14 +192,14 @@ func (widget *Widget) titleColor(event *calendar.Event) string {
}
if widget.eventIsPast(event) {
color = Config.UString("wtf.mods.gcal.colors.past", "gray")
color = wtf.Config.UString("wtf.mods.gcal.colors.past", "gray")
}
return color
}
func (widget *Widget) location(event *calendar.Event) string {
if Config.UBool("wtf.mods.gcal.displayLocation", true) == false {
if wtf.Config.UBool("wtf.mods.gcal.displayLocation", true) == false {
return ""
}
@ -190,14 +215,14 @@ func (widget *Widget) location(event *calendar.Event) string {
}
func (widget *Widget) responseIcon(event *calendar.Event) string {
if false == Config.UBool("wtf.mods.gcal.displayResponseStatus", true) {
if false == wtf.Config.UBool("wtf.mods.gcal.displayResponseStatus", true) {
return ""
}
response := ""
for _, attendee := range event.Attendees {
if attendee.Email == Config.UString("wtf.mods.gcal.email") {
if attendee.Email == wtf.Config.UString("wtf.mods.gcal.email") {
response = attendee.ResponseStatus
break
}
@ -253,3 +278,22 @@ func (widget *Widget) until(event *calendar.Event) string {
return "[lightblue]" + untilStr + "[white]"
}
func updateLoop(widget *Widget) {
interval := wtf.Config.UInt("wtf.mods.gcal.textInterval", 30)
if interval == 0 {
return
}
tick := time.NewTicker(time.Duration(interval) * time.Second)
defer tick.Stop()
outer:
for {
select {
case <-tick.C:
widget.display()
case <-widget.ch:
break outer
}
}
}

View File

@ -50,9 +50,15 @@ func (repo *GitRepo) changedFiles() []string {
}
func (repo *GitRepo) commits() []string {
numStr := fmt.Sprintf("-n %d", Config.UInt("wtf.mods.git.commitCount", 10))
numStr := fmt.Sprintf("-n %d", wtf.Config.UInt("wtf.mods.git.commitCount", 10))
arg := []string{repo.gitDir(), repo.workTree(), "log", "--date=format:\"%b %d, %Y\"", numStr, "--pretty=format:\"[forestgreen]%h [white]%s [grey]%an on %cd[white]\""}
dateFormat := wtf.Config.UString("wtf.mods.git.dateFormat", "%b %d, %Y")
dateStr := fmt.Sprintf("--date=format:\"%s\"", dateFormat)
commitFormat := wtf.Config.UString("wtf.mods.git.commitFormat", "[forestgreen]%h [white]%s [grey]%an on %cd[white]")
commitStr := fmt.Sprintf("--pretty=format:\"%s\"", commitFormat)
arg := []string{repo.gitDir(), repo.workTree(), "log", dateStr, numStr, commitStr}
cmd := exec.Command("git", arg...)
str := wtf.ExecuteCommand(cmd)

View File

@ -2,14 +2,10 @@ package git
import (
"github.com/gdamore/tcell"
"github.com/olebedev/config"
"github.com/rivo/tview"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
const HelpText = `
Keyboard commands for Git:
@ -53,7 +49,7 @@ func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
/* -------------------- Exported Functions -------------------- */
func (widget *Widget) Refresh() {
repoPaths := wtf.ToStrs(Config.UList("wtf.mods.git.repositories"))
repoPaths := wtf.ToStrs(wtf.Config.UList("wtf.mods.git.repositories"))
widget.UpdateRefreshedAt()
widget.Data = widget.gitRepos(repoPaths)

View File

@ -21,10 +21,10 @@ func (widget *Widget) display() {
str = str + widget.displayStats(repo)
str = str + "\n"
str = str + " [red]Open Review Requests[white]\n"
str = str + widget.displayMyReviewRequests(repo, Config.UString("wtf.mods.github.username"))
str = str + widget.displayMyReviewRequests(repo, wtf.Config.UString("wtf.mods.github.username"))
str = str + "\n"
str = str + " [red]My Pull Requests[white]\n"
str = str + widget.displayMyPullRequests(repo, Config.UString("wtf.mods.github.username"))
str = str + widget.displayMyPullRequests(repo, wtf.Config.UString("wtf.mods.github.username"))
widget.View.SetText(str)
}

View File

@ -2,14 +2,10 @@ package github
import (
"github.com/gdamore/tcell"
"github.com/olebedev/config"
"github.com/rivo/tview"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
const HelpText = `
Keyboard commands for Github:
@ -41,7 +37,7 @@ func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
pages: pages,
}
widget.GithubRepos = widget.buildRepoCollection(Config.UMap("wtf.mods.github.repositories"))
widget.GithubRepos = widget.buildRepoCollection(wtf.Config.UMap("wtf.mods.github.repositories"))
widget.View.SetInputCapture(widget.keyboardIntercept)

View File

@ -21,10 +21,10 @@ func (widget *Widget) display() {
str = str + widget.displayStats(project)
str = str + "\n"
str = str + " [red]Open Approval Requests[white]\n"
str = str + widget.displayMyApprovalRequests(project, Config.UString("wtf.mods.gitlab.username"))
str = str + widget.displayMyApprovalRequests(project, wtf.Config.UString("wtf.mods.gitlab.username"))
str = str + "\n"
str = str + " [red]My Merge Requests[white]\n"
str = str + widget.displayMyMergeRequests(project, Config.UString("wtf.mods.gitlab.username"))
str = str + widget.displayMyMergeRequests(project, wtf.Config.UString("wtf.mods.gitlab.username"))
widget.View.SetText(str)
}

View File

@ -4,15 +4,11 @@ import (
"os"
"github.com/gdamore/tcell"
"github.com/olebedev/config"
"github.com/rivo/tview"
"github.com/senorprogrammer/wtf/wtf"
glb "github.com/xanzy/go-gitlab"
)
// Config is a pointer to the global config object
var Config *config.Config
const HelpText = `
Keyboard commands for Gitlab:
@ -39,7 +35,7 @@ type Widget struct {
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
apiKey := os.Getenv("WTF_GITLAB_TOKEN")
baseURL := Config.UString("wtf.mods.gitlab.domain")
baseURL := wtf.Config.UString("wtf.mods.gitlab.domain")
gitlab := glb.NewClient(nil, apiKey)
if baseURL != "" {
gitlab.SetBaseURL(baseURL)
@ -56,7 +52,7 @@ func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
Idx: 0,
}
widget.GitlabProjects = widget.buildProjectCollection(Config.UMap("wtf.mods.gitlab.projects"))
widget.GitlabProjects = widget.buildProjectCollection(wtf.Config.UMap("wtf.mods.gitlab.projects"))
widget.View.SetInputCapture(widget.keyboardIntercept)

View File

@ -29,7 +29,7 @@ import (
func Fetch() ([]*sheets.ValueRange, error) {
ctx := context.Background()
secretPath, _ := wtf.ExpandHomeDir(Config.UString("wtf.mods.gspreadsheets.secretFile"))
secretPath, _ := wtf.ExpandHomeDir(wtf.Config.UString("wtf.mods.gspreadsheets.secretFile"))
b, err := ioutil.ReadFile(secretPath)
if err != nil {
@ -51,8 +51,8 @@ func Fetch() ([]*sheets.ValueRange, error) {
return nil, err
}
cells := wtf.ToStrs(Config.UList("wtf.mods.gspreadsheets.cells.addresses"))
documentId := Config.UString("wtf.mods.gspreadsheets.sheetId")
cells := wtf.ToStrs(wtf.Config.UList("wtf.mods.gspreadsheets.cells.addresses"))
documentId := wtf.Config.UString("wtf.mods.gspreadsheets.sheetId")
addresses := strings.Join(cells[:], ";")
responses := make([]*sheets.ValueRange, len(cells))

View File

@ -3,14 +3,10 @@ package gspreadsheets
import (
"fmt"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
sheets "google.golang.org/api/sheets/v4"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
}
@ -40,10 +36,10 @@ func (widget *Widget) contentFrom(valueRanges []*sheets.ValueRange) string {
return "error 1"
}
valuesColor := Config.UString("wtf.mods.gspreadsheets.colors.values", "green")
valuesColor := wtf.Config.UString("wtf.mods.gspreadsheets.colors.values", "green")
res := ""
cells := wtf.ToStrs(Config.UList("wtf.mods.gspreadsheets.cells.names"))
cells := wtf.ToStrs(wtf.Config.UList("wtf.mods.gspreadsheets.cells.names"))
for i := 0; i < len(valueRanges); i++ {
res = res + fmt.Sprintf("%s\t[%s]%s\n", cells[i], valuesColor, valueRanges[i].Values[0][0])
}

View File

@ -2,7 +2,6 @@ package help
import (
"fmt"
"os"
"github.com/senorprogrammer/wtf/git"
"github.com/senorprogrammer/wtf/github"
@ -11,14 +10,12 @@ import (
"github.com/senorprogrammer/wtf/weatherservices/weather"
)
func DisplayModuleInfo(moduleName string) {
if moduleName != "" {
fmt.Printf("%s\n", helpFor(moduleName))
} else {
func Display(moduleName string) {
if moduleName == "" {
fmt.Println("\n --module takes a module name as an argument, i.e: '--module=github'")
} else {
fmt.Printf("%s\n", helpFor(moduleName))
}
os.Exit(0)
}
func helpFor(moduleName string) string {

View File

@ -9,13 +9,9 @@ import (
"bytes"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
// Widget widget struct
type Widget struct {
wtf.TextWidget
@ -87,7 +83,7 @@ func (widget *Widget) ipinfo() {
// read module configs
func (widget *Widget) config() {
nameColor, valueColor := Config.UString("wtf.mods.ipinfo.colors.name", "red"), Config.UString("wtf.mods.ipinfo.colors.value", "white")
nameColor, valueColor := wtf.Config.UString("wtf.mods.ipinfo.colors.name", "red"), wtf.Config.UString("wtf.mods.ipinfo.colors.value", "white")
widget.colors.name = nameColor
widget.colors.value = valueColor
}

View File

@ -8,13 +8,9 @@ import (
"bytes"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
result string
@ -82,7 +78,7 @@ func (widget *Widget) ipinfo() {
// read module configs
func (widget *Widget) config() {
nameColor, valueColor := Config.UString("wtf.mods.ipinfo.colors.name", "red"), Config.UString("wtf.mods.ipinfo.colors.value", "white")
nameColor, valueColor := wtf.Config.UString("wtf.mods.ipinfo.colors.name", "red"), wtf.Config.UString("wtf.mods.ipinfo.colors.value", "white")
widget.colors.name = nameColor
widget.colors.value = valueColor
}

View File

@ -2,14 +2,10 @@ package jenkins
import (
"fmt"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
"os"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
}
@ -29,8 +25,11 @@ func (widget *Widget) Refresh() {
return
}
view, err := Create(Config.UString("wtf.mods.jenkins.url"),
Config.UString("wtf.mods.jenkins.user"), os.Getenv("WTF_JENKINS_API_KEY"))
view, err := Create(
wtf.Config.UString("wtf.mods.jenkins.url"),
wtf.Config.UString("wtf.mods.jenkins.user"),
os.Getenv("WTF_JENKINS_API_KEY"),
)
widget.UpdateRefreshedAt()
widget.View.Clear()
@ -54,7 +53,7 @@ func (widget *Widget) Refresh() {
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) contentFrom(view *View) string {
str := fmt.Sprintf(" [red]%s[white]\n", view.Name);
str := fmt.Sprintf(" [red]%s[white]\n", view.Name)
for _, job := range view.Jobs {
str = str + fmt.Sprintf(
@ -68,16 +67,12 @@ func (widget *Widget) contentFrom(view *View) string {
}
func (widget *Widget) jobColor(job *Job) string {
var color string
switch job.Color {
case "blue":
color = "green"
return "blue"
case "red":
color = "red"
return "red"
default:
color = "white"
return "white"
}
return color
}

View File

@ -2,6 +2,7 @@ package jira
import (
"bytes"
"crypto/tls"
"encoding/json"
"fmt"
"io"
@ -10,6 +11,8 @@ import (
"net/url"
"os"
"strings"
"github.com/senorprogrammer/wtf/wtf"
)
func IssuesFor(username string, projects []string, jql string) (*SearchResult, error) {
@ -52,15 +55,21 @@ func buildJql(key string, value string) string {
/* -------------------- Unexported Functions -------------------- */
func jiraRequest(path string) (*http.Response, error) {
url := fmt.Sprintf("%s%s", Config.UString("wtf.mods.jira.domain"), path)
url := fmt.Sprintf("%s%s", wtf.Config.UString("wtf.mods.jira.domain"), path)
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return nil, err
}
req.SetBasicAuth(Config.UString("wtf.mods.jira.email"), os.Getenv("WTF_JIRA_API_KEY"))
req.SetBasicAuth(wtf.Config.UString("wtf.mods.jira.email"), os.Getenv("WTF_JIRA_API_KEY"))
httpClient := &http.Client{}
verifyServerCertificate := wtf.Config.UBool("wtf.mods.jira.verifyServerCertificate", true)
httpClient := &http.Client{Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: !verifyServerCertificate,
},
},
}
resp, err := httpClient.Do(req)
if err != nil {
return nil, err

View File

@ -3,13 +3,9 @@ package jira
import (
"fmt"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
}
@ -25,7 +21,11 @@ func NewWidget() *Widget {
/* -------------------- Exported Functions -------------------- */
func (widget *Widget) Refresh() {
searchResult, err := IssuesFor(Config.UString("wtf.mods.jira.username"), getProjects(), Config.UString("wtf.mods.jira.jql", ""))
searchResult, err := IssuesFor(
wtf.Config.UString("wtf.mods.jira.username"),
getProjects(),
wtf.Config.UString("wtf.mods.jira.jql", ""),
)
widget.UpdateRefreshedAt()
@ -39,7 +39,7 @@ func (widget *Widget) Refresh() {
fmt.Sprintf(
"%s- [green]%s[white]",
widget.Name,
Config.UString("wtf.mods.jira.project"),
wtf.Config.UString("wtf.mods.jira.project"),
),
)
widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(searchResult)))
@ -66,31 +66,27 @@ func (widget *Widget) contentFrom(searchResult *SearchResult) string {
}
func (widget *Widget) issueTypeColor(issue *Issue) string {
var color string
switch issue.IssueFields.IssueType.Name {
case "Bug":
color = "red"
return "red"
case "Story":
color = "blue"
return "blue"
case "Task":
color = "orange"
return "orange"
default:
color = "white"
return "white"
}
return color
}
func getProjects() []string {
// see if project is set to a single string
configPath := "wtf.mods.jira.project"
singleProject, err := Config.String(configPath)
singleProject, err := wtf.Config.String(configPath)
if err == nil {
return []string{singleProject}
}
// else, assume list
projList := Config.UList(configPath)
projList := wtf.Config.UList(configPath)
var ret []string
for _, proj := range projList {
if str, ok := proj.(string); ok {

130
logger/log.go Normal file
View File

@ -0,0 +1,130 @@
package logger
import (
"fmt"
//"io/ioutil"
"log"
"os"
"path/filepath"
"strings"
"github.com/senorprogrammer/wtf/wtf"
)
const maxBufferSize int64 = 1024
type Widget struct {
wtf.TextWidget
filePath string
}
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" Logs ", "logger", true),
filePath: logFilePath(),
}
return &widget
}
/* -------------------- Exported Functions -------------------- */
func Log(msg string) {
if logFileMissing() {
return
}
f, err := os.OpenFile(logFilePath(), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
log.Fatalf("error opening file: %v", err)
}
defer f.Close()
log.SetOutput(f)
log.Println(msg)
}
func (widget *Widget) Refresh() {
if logFileMissing() {
return
}
widget.UpdateRefreshedAt()
widget.View.SetTitle(fmt.Sprintf("%s", widget.Name))
logLines := widget.tailFile()
widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(logLines)))
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) contentFrom(logLines []string) string {
str := ""
for _, line := range logLines {
chunks := strings.Split(line, " ")
if len(chunks) >= 4 {
str = str + fmt.Sprintf(
"[green]%s[white] [yellow]%s[white] %s\n",
chunks[0],
chunks[1],
strings.Join(chunks[3:], " "),
)
}
}
return str
}
func logFileMissing() bool {
return logFilePath() == ""
}
func logFilePath() string {
dir, err := wtf.Home()
if err != nil {
return ""
}
return filepath.Join(dir, ".wtf", "log.txt")
}
func (widget *Widget) tailFile() []string {
file, err := os.Open(widget.filePath)
if err != nil {
return []string{}
}
defer file.Close()
stat, err := file.Stat()
if err != nil {
return []string{}
}
bufferSize := maxBufferSize
if maxBufferSize > stat.Size() {
bufferSize = stat.Size()
}
startPos := stat.Size() - bufferSize
buff := make([]byte, bufferSize)
_, err = file.ReadAt(buff, startPos)
if err != nil {
return []string{}
}
logLines := strings.Split(string(buff), "\n")
// Reverse the array of lines
// Offset by two to account for the blank line at the end
last := len(logLines) - 2
for i := 0; i < len(logLines)/2; i++ {
logLines[i], logLines[last-i] = logLines[last-i], logLines[i]
}
return logLines
}

View File

@ -3,13 +3,14 @@ package newrelic
import (
"os"
"github.com/senorprogrammer/wtf/wtf"
nr "github.com/yfronto/newrelic"
)
func Application() (*nr.Application, error) {
client := nr.NewClient(os.Getenv("WTF_NEW_RELIC_API_KEY"))
application, err := client.GetApplication(Config.UInt("wtf.mods.newrelic.applicationId"))
application, err := client.GetApplication(wtf.Config.UInt("wtf.mods.newrelic.applicationId"))
if err != nil {
return nil, err
}
@ -21,7 +22,7 @@ func Deployments() ([]nr.ApplicationDeployment, error) {
client := nr.NewClient(os.Getenv("WTF_NEW_RELIC_API_KEY"))
opts := &nr.ApplicationDeploymentOptions{Page: 1}
deployments, err := client.GetApplicationDeployments(Config.UInt("wtf.mods.newrelic.applicationId"), opts)
deployments, err := client.GetApplicationDeployments(wtf.Config.UInt("wtf.mods.newrelic.applicationId"), opts)
if err != nil {
return nil, err
}

View File

@ -3,14 +3,10 @@ package newrelic
import (
"fmt"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
nr "github.com/yfronto/newrelic"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
}
@ -64,7 +60,7 @@ func (widget *Widget) contentFrom(deploys []nr.ApplicationDeployment) string {
lineColor = "lightblue"
}
var revLen = 8
revLen := 8
if revLen > len(deploy.Revision) {
revLen = len(deploy.Revision)
}
@ -79,7 +75,7 @@ func (widget *Widget) contentFrom(deploys []nr.ApplicationDeployment) string {
revisions = append(revisions, deploy.Revision)
if len(revisions) == Config.UInt("wtf.mods.newrelic.deployCount", 5) {
if len(revisions) == wtf.Config.UInt("wtf.mods.newrelic.deployCount", 5) {
break
}
}

View File

@ -4,13 +4,9 @@ import (
"fmt"
"strings"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
}
@ -45,7 +41,7 @@ func (widget *Widget) Refresh() {
func (widget *Widget) contentFrom(onCallResponse *OnCallResponse) string {
str := ""
displayEmpty := Config.UBool("wtf.mods.opsgenie.displayEmpty", true)
displayEmpty := wtf.Config.UBool("wtf.mods.opsgenie.displayEmpty", true)
for _, data := range onCallResponse.OnCallData {
if (len(data.Recipients) == 0) && (displayEmpty == false) {

View File

@ -3,13 +3,9 @@ package power
import (
"fmt"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget

View File

@ -1,3 +1,5 @@
// +build !windows
package security
import (

14
security/dns_windows.go Normal file
View File

@ -0,0 +1,14 @@
// +build windows
package security
import (
"os/exec"
"github.com/senorprogrammer/wtf/wtf"
)
func DnsServers() []string {
cmd := exec.Command("powershell.exe", "Get-DnsClientServerAddress | Select-Object ExpandProperty ServerAddresses")
return []string{wtf.ExecuteCommand(cmd)}
}

View File

@ -1,3 +1,5 @@
// +build !windows
package security
// http://applehelpwriter.com/2017/05/21/how-to-reveal-hidden-users/

25
security/users_windows.go Normal file
View File

@ -0,0 +1,25 @@
// +build windows
package security
import (
"os/exec"
"strings"
"github.com/senorprogrammer/wtf/wtf"
)
func LoggedInUsers() []string {
cmd := exec.Command("powershell.exe", "(query user) -replace '\\s{2,}', ','")
users := wtf.ExecuteCommand(cmd)
return cleanUsers(strings.Split(users, "\n")[1:])
}
func cleanUsers(users []string) []string {
cleaned := make([]string, 0)
for _, user := range users {
usr := strings.Split(user, ",")
cleaned = append(cleaned, usr[0])
}
return cleaned
}

View File

@ -1,16 +1,14 @@
// +build !windows
package security
import (
"fmt"
"strings"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
}

View File

@ -0,0 +1,55 @@
// +build windows
package security
import (
"fmt"
"strings"
"github.com/senorprogrammer/wtf/wtf"
)
type Widget struct {
wtf.TextWidget
}
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" Security ", "security", false),
}
return &widget
}
/* -------------------- Exported Functions -------------------- */
func (widget *Widget) Refresh() {
if widget.Disabled() {
return
}
data := NewSecurityData()
data.Fetch()
widget.UpdateRefreshedAt()
widget.View.Clear()
fmt.Fprintf(widget.View, "%s", widget.contentFrom(data))
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) contentFrom(data *SecurityData) string {
str := " [red]WiFi[white]\n"
str = str + fmt.Sprintf(" %8s: %s\n", "Network", data.WifiName)
str = str + fmt.Sprintf(" %8s: %s\n", "Crypto", data.WifiEncryption)
str = str + "\n"
str = str + " [red]Firewall[white] [red]DNS[white]\n"
str = str + fmt.Sprintf(" %8s: %4s %12s\n", "Enabled", data.FirewallEnabled, data.DnsAt(0))
str = str + fmt.Sprintf(" %8s: %4s %12s\n", "Stealth", data.FirewallStealth, data.DnsAt(1))
str = str + "\n"
str = str + " [red]Users[white]\n"
str = str + fmt.Sprintf(" %s", strings.Join(data.LoggedInUsers, ","))
return str
}

View File

@ -3,13 +3,9 @@ package status
import (
"fmt"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
@ -41,7 +37,7 @@ func (widget *Widget) Refresh() {
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) animation() string {
icons := []string{"👍", "🤜", "🤙", "🤜", "🤘", "🤜", "✊", "🤜", "👌", "🤜"}
icons := []string{"|", "/", "-", "\\", "|"}
next := icons[widget.CurrentIcon]
widget.CurrentIcon = widget.CurrentIcon + 1

View File

@ -1,3 +1,5 @@
// +build !windows
package system
import (
@ -49,12 +51,6 @@ func NewSystemInfo() *SystemInfo {
ProductVersion: m["Description"],
BuildVersion: m["Release"],
}
case "darwin":
sysInfo = &SystemInfo{
ProductName: m["ProductName"],
ProductVersion: m["ProductVersion"],
BuildVersion: m["BuildVersion"],
}
default:
sysInfo = &SystemInfo{
ProductName: m["ProductName"],

View File

@ -0,0 +1,36 @@
// +build windows
package system
import (
"os/exec"
"strings"
)
type SystemInfo struct {
ProductName string
ProductVersion string
BuildVersion string
}
func NewSystemInfo() *SystemInfo {
m := make(map[string]string)
cmd := exec.Command("powershell.exe", "(Get-CimInstance Win32_OperatingSystem).version")
out, err := cmd.Output()
if err != nil {
panic(err)
}
s := strings.Split(string(out), ".")
m["ProductName"] = "Windows"
m["ProductVersion"] = "Windows " + s[0] + "." + s[1]
m["BuildVersion"] = s[2]
sysInfo := SystemInfo{
ProductName: m["ProductName"],
ProductVersion: m["ProductVersion"],
BuildVersion: m["BuildVersion"],
}
return &sysInfo
}

View File

@ -4,13 +4,9 @@ import (
"fmt"
"time"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget

View File

@ -5,14 +5,10 @@ import (
"io/ioutil"
"github.com/gdamore/tcell"
"github.com/olebedev/config"
"github.com/rivo/tview"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
const HelpText = `
Keyboard commands for Textfile:
@ -33,7 +29,7 @@ func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
TextWidget: wtf.NewTextWidget(" Text File ", "textfile", true),
app: app,
filePath: Config.UString("wtf.mods.textfile.filePath"),
filePath: wtf.Config.UString("wtf.mods.textfile.filePath"),
pages: pages,
}

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