mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Changed name to andrewzolotukhin
This commit is contained in:
parent
608815ac85
commit
da1ffdd817
10
.travis.yml
10
.travis.yml
@ -4,9 +4,9 @@ go:
|
||||
sudo: false
|
||||
before_install:
|
||||
# Make sure travis builds work for forks
|
||||
- mkdir -p $TRAVIS_BUILD_DIR $GOPATH/src/github.com/senorprogrammer
|
||||
- test ! -d $GOPATH/src/github.com/senorprogrammer/wtf && mv $TRAVIS_BUILD_DIR $GOPATH/src/github.com/senorprogrammer/wtf || true
|
||||
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/senorprogrammer/wtf
|
||||
- cd $HOME/gopath/src/github.com/senorprogrammer/wtf
|
||||
- mkdir -p $TRAVIS_BUILD_DIR $GOPATH/src/github.com/andrewzolotukhin
|
||||
- test ! -d $GOPATH/src/github.com/andrewzolotukhin/wtf && mv $TRAVIS_BUILD_DIR $GOPATH/src/github.com/andrewzolotukhin/wtf || true
|
||||
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/andrewzolotukhin/wtf
|
||||
- cd $HOME/gopath/src/github.com/andrewzolotukhin/wtf
|
||||
|
||||
script: go get ./... && go get github.com/go-test/deep && go test -v github.com/senorprogrammer/wtf/wtf_tests
|
||||
script: go get ./... && go get github.com/go-test/deep && go test -v github.com/andrewzolotukhin/wtf/wtf_tests
|
||||
|
10
README.md
10
README.md
@ -1,5 +1,5 @@
|
||||
<p align="right">
|
||||
<img src="https://travis-ci.com/senorprogrammer/wtf.svg?branch=master" />
|
||||
<img src="https://travis-ci.com/andrewzolotukhin/wtf.svg?branch=master" />
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -20,13 +20,13 @@ displaying infrequently-needed, but very important, daily data.
|
||||
**Note:** WTF is _only_ compatible with Go versions **1.9.2** or later. It currently _does not_ compile with `gccgo`.
|
||||
|
||||
```bash
|
||||
go get -u github.com/senorprogrammer/wtf
|
||||
cd $GOPATH/src/github.com/senorprogrammer/wtf
|
||||
go get -u github.com/andrewzolotukhin/wtf
|
||||
cd $GOPATH/src/github.com/andrewzolotukhin/wtf
|
||||
make install
|
||||
make run
|
||||
```
|
||||
|
||||
Or [download the latest binary](https://github.com/senorprogrammer/wtf/releases).
|
||||
Or [download the latest binary](https://github.com/andrewzolotukhin/wtf/releases).
|
||||
|
||||
## Support
|
||||
|
||||
@ -48,7 +48,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc
|
||||
|
||||
## Authors
|
||||
|
||||
* Chris Cummer, [senorprogrammer](https://github.com/senorprogrammer)
|
||||
* Chris Cummer, [andrewzolotukhin](https://github.com/andrewzolotukhin)
|
||||
|
||||
## License
|
||||
|
||||
|
@ -108,7 +108,7 @@ wtf:
|
||||
width: 3
|
||||
refreshInterval: 8
|
||||
repositories:
|
||||
- "/Users/chris/go/src/github.com/senorprogrammer/wtf"
|
||||
- "/Users/chris/go/src/github.com/andrewzolotukhin/wtf"
|
||||
github:
|
||||
enabled: true
|
||||
position:
|
||||
@ -119,8 +119,8 @@ wtf:
|
||||
refreshInterval: 300
|
||||
repositories:
|
||||
repo-name: "owner id"
|
||||
wtf: "senorprogrammer"
|
||||
username: "senorprogrammer"
|
||||
wtf: "andrewzolotukhin"
|
||||
username: "andrewzolotukhin"
|
||||
jira:
|
||||
colors:
|
||||
rows:
|
||||
|
@ -5,7 +5,7 @@ draft: false
|
||||
---
|
||||
|
||||
The following top-level attributes are configurable in `config.yml`.
|
||||
See this <a href="https://github.com/senorprogrammer/wtf/blob/master/_sample_configs/simple_config.yml">example config file</a> for more details.
|
||||
See this <a href="https://github.com/andrewzolotukhin/wtf/blob/master/_sample_configs/simple_config.yml">example config file</a> for more details.
|
||||
|
||||
```yaml
|
||||
wtf:
|
||||
|
@ -11,8 +11,8 @@ There are two ways to install WTF:
|
||||
Get this repo and install the dependencies:
|
||||
|
||||
```bash
|
||||
go get -u github.com/senorprogrammer/wtf
|
||||
cd $GOPATH/src/github.com/senorprogrammer/wtf
|
||||
go get -u github.com/andrewzolotukhin/wtf
|
||||
cd $GOPATH/src/github.com/andrewzolotukhin/wtf
|
||||
make install
|
||||
make run
|
||||
```
|
||||
@ -23,7 +23,7 @@ and that should probably do it.
|
||||
Grab the latest version from here:
|
||||
|
||||
```bash
|
||||
https://github.com/senorprogrammer/wtf/releases
|
||||
https://github.com/andrewzolotukhin/wtf/releases
|
||||
```
|
||||
|
||||
expand it, and `cd` into the resulting directory. Then run:
|
||||
|
@ -9,7 +9,7 @@ Displays your upcoming Google calendar events.
|
||||
<img src="/imgs/modules/gcal.png" width="320" height="389" alt="gcal screenshot" />
|
||||
|
||||
**Not:** Setting up access to Google Calendars for Go is a bit unobvious. Check out Google's [Go Quickstart](https://developers.google.com/calendar/quickstart/go)
|
||||
first and if you have problems, then take a look at this [comment by WesleydeSouza](https://github.com/senorprogrammer/wtf/issues/83#issuecomment-393665229) which offers a slightly different approach.
|
||||
first and if you have problems, then take a look at this [comment by WesleydeSouza](https://github.com/andrewzolotukhin/wtf/issues/83#issuecomment-393665229) which offers a slightly different approach.
|
||||
|
||||
## Source Code
|
||||
|
||||
|
@ -62,7 +62,7 @@ git:
|
||||
width: 2
|
||||
refreshInterval: 8
|
||||
repositories:
|
||||
- "/Users/chris/go/src/github.com/senorprogrammer/wtf"
|
||||
- "/Users/chris/go/src/github.com/andrewzolotukhin/wtf"
|
||||
- "/Users/user/fakeapp"
|
||||
```
|
||||
|
||||
|
@ -58,8 +58,8 @@ github:
|
||||
refreshInterval: 300
|
||||
repositories:
|
||||
wesker-api: "UmbrellaCorp"
|
||||
wtf: "senorprogrammer"
|
||||
username: "senorprogrammer"
|
||||
wtf: "andrewzolotukhin"
|
||||
username: "andrewzolotukhin"
|
||||
```
|
||||
|
||||
### Attributes
|
||||
|
@ -12,7 +12,7 @@ visible, but might check in on every now and then.
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. <a href="https://github.com/senorprogrammer/wtf/releases">Download</a> the stand-alone, compiled binary.
|
||||
1. <a href="https://github.com/andrewzolotukhin/wtf/releases">Download</a> the stand-alone, compiled binary.
|
||||
2. Unzip the downloaded file.
|
||||
3. From the command line, `cd` into the newly-created `/wtf` directory.
|
||||
4. From the command line, run the app: `./wtf`
|
||||
|
@ -27,8 +27,8 @@
|
||||
It even has weather. And clocks. And emoji.
|
||||
</p>
|
||||
|
||||
<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://github.com/andrewzolotukhin/wtf/releases" class="button button-small">Download Latest</a>
|
||||
<a href="https://github.com/andrewzolotukhin/wtf" class="button button-small">Source on Github</a>
|
||||
<a href="https://gitter.im/wtfutil/Lobby" class="button button-small">Chat on Gitter</a>
|
||||
|
||||
<p>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
//"time"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
type Item struct {
|
||||
|
@ -3,8 +3,8 @@ package bamboohr
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -8,8 +8,8 @@ import (
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
|
||||
"github.com/olebedev/config"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
func ConfigDir() (string, error) {
|
||||
@ -64,7 +64,7 @@ func LoadConfigFile(filePath string) *config.Config {
|
||||
|
||||
cfg, err := config.ParseYamlFile(absPath)
|
||||
if err != nil {
|
||||
fmt.Println("\n\n\033[1m ERROR:\033[0m Could not load '\033[0;33mconfig.yml\033[0m'.\n Please add a \033[0;33mconfig.yml\033[0m file to your \033[0;33m~/.wtf\033[0m directory.\n See \033[1;34mhttps://github.com/senorprogrammer/wtf\033[0m for details.\n")
|
||||
fmt.Println("\n\n\033[1m ERROR:\033[0m Could not load '\033[0;33mconfig.yml\033[0m'.\n Please add a \033[0;33mconfig.yml\033[0m file to your \033[0;33m~/.wtf\033[0m directory.\n See \033[1;34mhttps://github.com/andrewzolotukhin/wtf\033[0m for details.\n")
|
||||
fmt.Printf(" %s\n", err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ package clocks
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
type Clock struct {
|
||||
|
@ -3,7 +3,7 @@ package clocks
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
func (widget *Widget) display(clocks []Clock) {
|
||||
|
@ -3,8 +3,8 @@ package clocks
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
|
||||
"net/http"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -60,7 +60,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -59,7 +59,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
@ -119,8 +119,8 @@
|
||||
It even has weather. And clocks. And emoji.
|
||||
</p>
|
||||
|
||||
<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://github.com/andrewzolotukhin/wtf/releases" class="button button-small">Download Latest</a>
|
||||
<a href="https://github.com/andrewzolotukhin/wtf" class="button button-small">Source on Github</a>
|
||||
<a href="https://gitter.im/wtfutil/Lobby" class="button button-small">Chat on Gitter</a>
|
||||
|
||||
<p>
|
||||
|
@ -122,9 +122,9 @@ Quick Start Download the stand-alone, compiled binary. Unzip the downloaded fil
|
||||
<guid>https://wtfutil.com/posts/installation/</guid>
|
||||
<description>There are two ways to install WTF:
|
||||
From Source Get this repo and install the dependencies:
|
||||
go get -u github.com/senorprogrammer/wtf cd $GOPATH/src/github.com/senorprogrammer/wtf make install make run and that should probably do it.
|
||||
go get -u github.com/andrewzolotukhin/wtf cd $GOPATH/src/github.com/andrewzolotukhin/wtf make install make run and that should probably do it.
|
||||
As a Binary Grab the latest version from here:
|
||||
https://github.com/senorprogrammer/wtf/releases expand it, and cd into the resulting directory. Then run:
|
||||
https://github.com/andrewzolotukhin/wtf/releases expand it, and cd into the resulting directory. Then run:
|
||||
./wtf and that should also do it.</description>
|
||||
</item>
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
@ -114,7 +114,7 @@
|
||||
|
||||
|
||||
<p>The following top-level attributes are configurable in <code>config.yml</code>.
|
||||
See this <a href="https://github.com/senorprogrammer/wtf/blob/master/_sample_configs/simple_config.yml">example config file</a> for more details.</p>
|
||||
See this <a href="https://github.com/andrewzolotukhin/wtf/blob/master/_sample_configs/simple_config.yml">example config file</a> for more details.</p>
|
||||
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">wtf<span class="p">:</span><span class="w">
|
||||
</span><span class="w"> </span>colors<span class="p">:</span><span class="w">
|
||||
</span><span class="w"> </span>background<span class="p">:</span><span class="w"> </span><span class="s2">"red"</span><span class="w">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -60,7 +60,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -122,9 +122,9 @@ Quick Start Download the stand-alone, compiled binary. Unzip the downloaded fil
|
||||
<guid>https://wtfutil.com/posts/installation/</guid>
|
||||
<description>There are two ways to install WTF:
|
||||
From Source Get this repo and install the dependencies:
|
||||
go get -u github.com/senorprogrammer/wtf cd $GOPATH/src/github.com/senorprogrammer/wtf make install make run and that should probably do it.
|
||||
go get -u github.com/andrewzolotukhin/wtf cd $GOPATH/src/github.com/andrewzolotukhin/wtf make install make run and that should probably do it.
|
||||
As a Binary Grab the latest version from here:
|
||||
https://github.com/senorprogrammer/wtf/releases expand it, and cd into the resulting directory. Then run:
|
||||
https://github.com/andrewzolotukhin/wtf/releases expand it, and cd into the resulting directory. Then run:
|
||||
./wtf and that should also do it.</description>
|
||||
</item>
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
@ -118,8 +118,8 @@
|
||||
<h2 id="from-source">From Source</h2>
|
||||
|
||||
<p>Get this repo and install the dependencies:</p>
|
||||
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">go get -u github.com/senorprogrammer/wtf
|
||||
<span class="nb">cd</span> <span class="nv">$GOPATH</span>/src/github.com/senorprogrammer/wtf
|
||||
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">go get -u github.com/andrewzolotukhin/wtf
|
||||
<span class="nb">cd</span> <span class="nv">$GOPATH</span>/src/github.com/andrewzolotukhin/wtf
|
||||
make install
|
||||
make run</code></pre></div>
|
||||
<p>and that should probably do it.</p>
|
||||
@ -127,7 +127,7 @@ make run</code></pre></div>
|
||||
<h2 id="as-a-binary">As a Binary</h2>
|
||||
|
||||
<p>Grab the latest version from here:</p>
|
||||
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">https://github.com/senorprogrammer/wtf/releases</code></pre></div>
|
||||
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">https://github.com/andrewzolotukhin/wtf/releases</code></pre></div>
|
||||
<p>expand it, and <code>cd</code> into the resulting directory. Then run:</p>
|
||||
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">./wtf</code></pre></div>
|
||||
<p>and that should also do it.</p>
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -72,7 +72,7 @@
|
||||
<a href="/posts/configuration/iterm2/">iTerm2</a>
|
||||
</li>
|
||||
<li class="sidebar-list-item-1">
|
||||
<a href="https://github.com/senorprogrammer/wtf/releases">Releases</a>
|
||||
<a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -72,7 +72,7 @@
|
||||
<a href="/posts/configuration/iterm2/">iTerm2</a>
|
||||
</li>
|
||||
<li class="sidebar-list-item-1">
|
||||
<a href="https://github.com/senorprogrammer/wtf/releases">Releases</a>
|
||||
<a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
@ -118,7 +118,7 @@
|
||||
<p><img src="/imgs/modules/gcal.png" width="320" height="389" alt="gcal screenshot" /></p>
|
||||
|
||||
<p><strong>Not:</strong> Setting up access to Google Calendars for Go is a bit unobvious. Check out Google’s <a href="https://developers.google.com/calendar/quickstart/go">Go Quickstart</a>
|
||||
first and if you have problems, then take a look at this <a href="https://github.com/senorprogrammer/wtf/issues/83#issuecomment-393665229">comment by WesleydeSouza</a> which offers a slightly different approach.</p>
|
||||
first and if you have problems, then take a look at this <a href="https://github.com/andrewzolotukhin/wtf/issues/83#issuecomment-393665229">comment by WesleydeSouza</a> which offers a slightly different approach.</p>
|
||||
|
||||
<h2 id="source-code">Source Code</h2>
|
||||
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">wtf/gcal/</code></pre></div>
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
@ -165,7 +165,7 @@ commit, and their status.</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>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">8</span><span class="w">
|
||||
</span><span class="w"> </span>repositories<span class="p">:</span><span class="w">
|
||||
</span><span class="w"> </span>-<span class="w"> </span><span class="s2">"/Users/chris/go/src/github.com/senorprogrammer/wtf"</span><span class="w">
|
||||
</span><span class="w"> </span>-<span class="w"> </span><span class="s2">"/Users/chris/go/src/github.com/andrewzolotukhin/wtf"</span><span class="w">
|
||||
</span><span class="w"> </span>-<span class="w"> </span><span class="s2">"/Users/user/fakeapp"</span></code></pre></div>
|
||||
<h3 id="attributes">Attributes</h3>
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
@ -160,8 +160,8 @@
|
||||
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">300</span><span class="w">
|
||||
</span><span class="w"> </span>repositories<span class="p">:</span><span class="w">
|
||||
</span><span class="w"> </span>wesker-api<span class="p">:</span><span class="w"> </span><span class="s2">"UmbrellaCorp"</span><span class="w">
|
||||
</span><span class="w"> </span>wtf<span class="p">:</span><span class="w"> </span><span class="s2">"senorprogrammer"</span><span class="w">
|
||||
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span><span class="s2">"senorprogrammer"</span></code></pre></div>
|
||||
</span><span class="w"> </span>wtf<span class="p">:</span><span class="w"> </span><span class="s2">"andrewzolotukhin"</span><span class="w">
|
||||
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span><span class="s2">"andrewzolotukhin"</span></code></pre></div>
|
||||
<h3 id="attributes">Attributes</h3>
|
||||
|
||||
<p><code>enabled</code> <br />
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
@ -122,7 +122,7 @@ visible, but might check in on every now and then.</p>
|
||||
<h2 id="quick-start">Quick Start</h2>
|
||||
|
||||
<ol>
|
||||
<li><a href="https://github.com/senorprogrammer/wtf/releases">Download</a> the stand-alone, compiled binary.</li>
|
||||
<li><a href="https://github.com/andrewzolotukhin/wtf/releases">Download</a> the stand-alone, compiled binary.</li>
|
||||
<li>Unzip the downloaded file.</li>
|
||||
<li>From the command line, <code>cd</code> into the newly-created <code>/wtf</code> directory.</li>
|
||||
<li>From the command line, run the app: <code>./wtf</code></li>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<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>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/andrewzolotukhin/wtf/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"golang.org/x/oauth2"
|
||||
"golang.org/x/oauth2/google"
|
||||
"google.golang.org/api/calendar/v3"
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"google.golang.org/api/calendar/v3"
|
||||
)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
func (widget *Widget) display() {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
type GitRepo struct {
|
||||
|
@ -1,10 +1,10 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"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
|
||||
|
@ -3,7 +3,7 @@ package github
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
func (widget *Widget) display() {
|
||||
|
@ -1,10 +1,10 @@
|
||||
package github
|
||||
|
||||
import (
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"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
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"golang.org/x/oauth2"
|
||||
"golang.org/x/oauth2/google"
|
||||
sheets "google.golang.org/api/sheets/v4"
|
||||
|
@ -3,8 +3,8 @@ package gspreadsheets
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
sheets "google.golang.org/api/sheets/v4"
|
||||
)
|
||||
|
||||
|
10
help/help.go
10
help/help.go
@ -4,11 +4,11 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/senorprogrammer/wtf/git"
|
||||
"github.com/senorprogrammer/wtf/github"
|
||||
"github.com/senorprogrammer/wtf/textfile"
|
||||
"github.com/senorprogrammer/wtf/todo"
|
||||
"github.com/senorprogrammer/wtf/weather"
|
||||
"github.com/andrewzolotukhin/wtf/git"
|
||||
"github.com/andrewzolotukhin/wtf/github"
|
||||
"github.com/andrewzolotukhin/wtf/textfile"
|
||||
"github.com/andrewzolotukhin/wtf/todo"
|
||||
"github.com/andrewzolotukhin/wtf/weather"
|
||||
)
|
||||
|
||||
func DisplayModuleInfo(moduleName string) {
|
||||
|
@ -9,8 +9,8 @@ import (
|
||||
|
||||
"bytes"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"bytes"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -3,8 +3,8 @@ package jira
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -3,8 +3,8 @@ package newrelic
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
nr "github.com/yfronto/newrelic"
|
||||
)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
const TimeRegExp = "^(?:\\d|[01]\\d|2[0-3]):[0-5]\\d"
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
var batteryState string
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
const SingleQuotesRegExp = "'(.*)'"
|
||||
|
@ -3,8 +3,8 @@ package power
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
const osxFirewallCmd = "/usr/libexec/ApplicationFirewall/socketfilterfw"
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"os/exec"
|
||||
"runtime"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
// https://github.com/yelinaung/wifi-name/blob/master/wifi-name.go
|
||||
|
@ -3,8 +3,8 @@ package status
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
type SystemInfo struct {
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
|
@ -3,7 +3,7 @@ package todo
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
const checkWidth = 4
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/senorprogrammer/wtf/cfg"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/andrewzolotukhin/wtf/cfg"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
owm "github.com/briandowns/openweathermap"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
func (widget *Widget) display() {
|
||||
|
@ -3,11 +3,11 @@ package weather
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
owm "github.com/briandowns/openweathermap"
|
||||
"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.
|
||||
|
54
wtf.go
54
wtf.go
@ -6,37 +6,37 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/andrewzolotukhin/wtf/bamboohr"
|
||||
"github.com/andrewzolotukhin/wtf/bargraph"
|
||||
"github.com/andrewzolotukhin/wtf/blockfolio"
|
||||
"github.com/andrewzolotukhin/wtf/cfg"
|
||||
"github.com/andrewzolotukhin/wtf/clocks"
|
||||
"github.com/andrewzolotukhin/wtf/cmdrunner"
|
||||
"github.com/andrewzolotukhin/wtf/cryptoexchanges/bittrex"
|
||||
"github.com/andrewzolotukhin/wtf/cryptoexchanges/cryptolive"
|
||||
"github.com/andrewzolotukhin/wtf/gcal"
|
||||
"github.com/andrewzolotukhin/wtf/git"
|
||||
"github.com/andrewzolotukhin/wtf/github"
|
||||
"github.com/andrewzolotukhin/wtf/gspreadsheets"
|
||||
"github.com/andrewzolotukhin/wtf/help"
|
||||
"github.com/andrewzolotukhin/wtf/ipapi"
|
||||
"github.com/andrewzolotukhin/wtf/ipinfo"
|
||||
"github.com/andrewzolotukhin/wtf/jira"
|
||||
"github.com/andrewzolotukhin/wtf/newrelic"
|
||||
"github.com/andrewzolotukhin/wtf/opsgenie"
|
||||
"github.com/andrewzolotukhin/wtf/power"
|
||||
"github.com/andrewzolotukhin/wtf/prettyweather"
|
||||
"github.com/andrewzolotukhin/wtf/security"
|
||||
"github.com/andrewzolotukhin/wtf/status"
|
||||
"github.com/andrewzolotukhin/wtf/system"
|
||||
"github.com/andrewzolotukhin/wtf/textfile"
|
||||
"github.com/andrewzolotukhin/wtf/todo"
|
||||
"github.com/andrewzolotukhin/wtf/weather"
|
||||
"github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/radovskyb/watcher"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/senorprogrammer/wtf/bamboohr"
|
||||
"github.com/senorprogrammer/wtf/bargraph"
|
||||
"github.com/senorprogrammer/wtf/blockfolio"
|
||||
"github.com/senorprogrammer/wtf/cfg"
|
||||
"github.com/senorprogrammer/wtf/clocks"
|
||||
"github.com/senorprogrammer/wtf/cmdrunner"
|
||||
"github.com/senorprogrammer/wtf/cryptoexchanges/bittrex"
|
||||
"github.com/senorprogrammer/wtf/cryptoexchanges/cryptolive"
|
||||
"github.com/senorprogrammer/wtf/gcal"
|
||||
"github.com/senorprogrammer/wtf/git"
|
||||
"github.com/senorprogrammer/wtf/github"
|
||||
"github.com/senorprogrammer/wtf/gspreadsheets"
|
||||
"github.com/senorprogrammer/wtf/help"
|
||||
"github.com/senorprogrammer/wtf/ipapi"
|
||||
"github.com/senorprogrammer/wtf/ipinfo"
|
||||
"github.com/senorprogrammer/wtf/jira"
|
||||
"github.com/senorprogrammer/wtf/newrelic"
|
||||
"github.com/senorprogrammer/wtf/opsgenie"
|
||||
"github.com/senorprogrammer/wtf/power"
|
||||
"github.com/senorprogrammer/wtf/prettyweather"
|
||||
"github.com/senorprogrammer/wtf/security"
|
||||
"github.com/senorprogrammer/wtf/status"
|
||||
"github.com/senorprogrammer/wtf/system"
|
||||
"github.com/senorprogrammer/wtf/textfile"
|
||||
"github.com/senorprogrammer/wtf/todo"
|
||||
"github.com/senorprogrammer/wtf/weather"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
/* -------------------- Functions -------------------- */
|
||||
|
172
wtf/config_files.go
Normal file
172
wtf/config_files.go
Normal file
@ -0,0 +1,172 @@
|
||||
package wtf
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
)
|
||||
|
||||
func ConfigDir() (string, error) {
|
||||
configDir, err := ExpandHomeDir("~/.wtf/")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return configDir, nil
|
||||
}
|
||||
|
||||
// CreateConfigDir creates the .wtf directory in the user's home dir
|
||||
func CreateConfigDir() {
|
||||
configDir, _ := ConfigDir()
|
||||
|
||||
if _, err := os.Stat(configDir); os.IsNotExist(err) {
|
||||
err := os.Mkdir(configDir, os.ModePerm)
|
||||
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
|
||||
// If unsuccessful, returns an error
|
||||
func CreateFile(fileName string) (string, error) {
|
||||
configDir, err := ConfigDir()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
filePath := fmt.Sprintf("%s/%s", configDir, fileName)
|
||||
|
||||
// Check if the file already exists; if it does not, create it
|
||||
_, err = os.Stat(filePath)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
_, err = os.Create(filePath)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
} else {
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
|
||||
return filePath, nil
|
||||
}
|
||||
|
||||
// LoadConfigFile loads the config.yml file to configure the app
|
||||
func LoadConfigFile(filePath string) *config.Config {
|
||||
absPath, _ := ExpandHomeDir(filePath)
|
||||
|
||||
cfg, err := config.ParseYamlFile(absPath)
|
||||
if err != nil {
|
||||
fmt.Println("\n\n\033[1m ERROR:\033[0m Could not load '\033[0;33mconfig.yml\033[0m'.\n Please add a \033[0;33mconfig.yml\033[0m file to your \033[0;33m~/.wtf\033[0m directory.\n See \033[1;34mhttps://github.com/andrewzolotukhin/wtf\033[0m for details.\n")
|
||||
fmt.Printf(" %s\n", err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
func ReadConfigFile(fileName string) (string, error) {
|
||||
configDir, err := ConfigDir()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
filePath := fmt.Sprintf("%s/%s", configDir, fileName)
|
||||
|
||||
fileData, err := ReadFileBytes(filePath)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
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:
|
||||
focusable: darkslateblue
|
||||
focused: orange
|
||||
normal: gray
|
||||
grid:
|
||||
columns: [40, 40]
|
||||
rows: [13, 13, 4]
|
||||
refreshInterval: 1
|
||||
mods:
|
||||
clocks:
|
||||
colors:
|
||||
rows:
|
||||
even: "lightblue"
|
||||
odd: "white"
|
||||
enabled: true
|
||||
locations:
|
||||
Avignon: "Europe/Paris"
|
||||
Barcelona: "Europe/Madrid"
|
||||
Dubai: "Asia/Dubai"
|
||||
Vancouver: "America/Vancouver"
|
||||
Toronto: "America/Toronto"
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
sort: "alphabetical"
|
||||
security:
|
||||
enabled: true
|
||||
position:
|
||||
top: 1
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 3600
|
||||
status:
|
||||
enabled: true
|
||||
position:
|
||||
top: 2
|
||||
left: 0
|
||||
height: 1
|
||||
width: 2
|
||||
refreshInterval: 1
|
||||
system:
|
||||
enabled: true
|
||||
position:
|
||||
top: 0
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 3600
|
||||
textfile:
|
||||
enabled: true
|
||||
filePath: "~/.wtf/config.yml"
|
||||
position:
|
||||
top: 1
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 30
|
||||
`
|
@ -3,7 +3,7 @@ package wtf_tests
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/senorprogrammer/wtf/wtf"
|
||||
. "github.com/andrewzolotukhin/wtf/wtf"
|
||||
)
|
||||
|
||||
func TestPosition(t *testing.T) {
|
||||
|
@ -3,8 +3,8 @@ package wtf_tests
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/andrewzolotukhin/wtf/wtf"
|
||||
"github.com/go-test/deep"
|
||||
. "github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
/* -------------------- Exclude() -------------------- */
|
||||
|
Loading…
x
Reference in New Issue
Block a user