Go HTML Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Godeps
bin
finance
stubs
vendor
.gitignore
README.md
build_executables
colorized_stockprice.png
install.sh
main.go

README.md

Stock Price Reporter

A CLI tool that looks up stock prices. Now you can check stock price right in your console or in VIM without losing focus on what matters 💻

$ stockprice grpn
4.10 +0.03 (0.74%)

Installation

curl -L https://raw.githubusercontent.com/simsalabim/stockprice/master/install.sh | sh

Or manually download an executable for your OS: OSX, Linux, Windows and place it in a directory listed in $PATH.

VIM Integration

As amazing as it sounds, you may now check the stock price of your interest right in your code editor.

" ~/.vimrc
function! Stockprice(symbol)
  execute system('stockprice -f vim ' . a:symbol)
endfunction

map <leader>fb :call Stockprice('fb')<cr>

Alternative VIM Integration

If you're only interested in VIM integration and not in the system binary, the following web version that uses this very package might work for you:

function! Stockprice(symbol)
  echo system("curl -s http://rebot.works/stockprice/" . a:symbol)
endfunction

More fun

What can be more fun than system aliases? You can create some for frequently checked stocks:

# .zshrc/.bashrc
alias fb="stockprice fb"

# further usage in console:
$ fb
137.72 +0.42 (0.31%)

Development

For development you will need a Go language compiler installed. I used Go v1.8.

For dependency management, please refer to Godep documentation.

To rebuild the binaries for 3 main platforms run ./build_executables.

Run tests with cd finance && go test -v

TODO

  • Atom plugin