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%)
Or manually download an executable for your OS: OSX, Linux, Windows and place it in a directory listed in $PATH.
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>
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
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%)
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
- Atom plugin