trego

command module
v0.0.0-...-ab63aab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2017 License: GPL-3.0 Imports: 8 Imported by: 0

README

Trego

Simple Trello console client (but with UI).

Screenshots

trego

trego2

Building

You can find built binaries for GNU/Linux, Windows and MacOS in the releases tab.

If you want to built the app by yourself, perform steps listed below:

  • Download and install golang
  • Set the GOPATH environment variable (set it to the folder, where you want to store go projects)
  • Download Trego via go get -u github.com/aqatl/trego (needs git installed)
  • Create token.json file

Trego should be in the $GOPATH/bin directory.

token.json

Getting all of the necessary tokens is still a TODO feature. So, for now you have to get them manually and put them into the token.json file. First, you will need to get application key from here. Then you will have to generate your token. Go to this url: https://trello.com/1/authorize?response_type=token&expiration=never&name=Trego&scope=read,write,account&key=YOURAPPKEY remember to replace the YOURAPPKEY with the key you got previously.

Now, create the token.json file and place it in the same directory as the Trego binary. Then, fill that file using the template below.

{
	"AppKey": "paste your key here",
	"Token": "paste your generated token here"
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
ui
dialog
Package that contains variety of dialogs Example of using InputDialog input := make(chan string) //Prevents nested dialogs and other glitches (like double handler call) for _, view := range gui.Views() { gui.DeleteKeybindings(view.Name()) } utils.ErrCheck( mngr.SelectView( gui, dialog.InputDialog("Are you sure? [y/n]", "", "", gui, input).Name())) go func() { if userInput, ok := <-input; ok { log.Print(userInput) } SetKeyBindings(gui, mngr) }() Similar example for ConfirmDialog option := make(chan bool) previousView := gui.CurrentView() log.Println("callback: ", previousView.Name()) //Prevents nested dialogs and other glitches (like double handler call) for _, view := range gui.Views() { gui.DeleteKeybindings(view.Name()) } utils.ErrCheck( mngr.SelectView( gui, dialog.ConfirmDialog("message", "title", gui, option).Name())) go func() { if choice, ok = <-option; ok { log.Printf("Choosen option: %v", choice) } mngr.currView = previousView log.Println("thread: ", mngr.currView.Name(), previousView.Name()) SetKeyBindings(gui, mngr) }() Remember! When user chooses an option, it deletes returned view, so make sure to handle it properly.
Package that contains variety of dialogs Example of using InputDialog input := make(chan string) //Prevents nested dialogs and other glitches (like double handler call) for _, view := range gui.Views() { gui.DeleteKeybindings(view.Name()) } utils.ErrCheck( mngr.SelectView( gui, dialog.InputDialog("Are you sure? [y/n]", "", "", gui, input).Name())) go func() { if userInput, ok := <-input; ok { log.Print(userInput) } SetKeyBindings(gui, mngr) }() Similar example for ConfirmDialog option := make(chan bool) previousView := gui.CurrentView() log.Println("callback: ", previousView.Name()) //Prevents nested dialogs and other glitches (like double handler call) for _, view := range gui.Views() { gui.DeleteKeybindings(view.Name()) } utils.ErrCheck( mngr.SelectView( gui, dialog.ConfirmDialog("message", "title", gui, option).Name())) go func() { if choice, ok = <-option; ok { log.Printf("Choosen option: %v", choice) } mngr.currView = previousView log.Println("thread: ", mngr.currView.Name(), previousView.Name()) SetKeyBindings(gui, mngr) }() Remember! When user chooses an option, it deletes returned view, so make sure to handle it properly.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL