Add README.md
This commit is contained in:
48
README.md
Normal file
48
README.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# stocks.sh
|
||||
|
||||
> Real-time stock tickers from the command-line.
|
||||
|
||||
`stocks.sh` is a simple shell script using the Yahoo Finance API as a data source. It features colored output and is able to display pre- and post-market prices (denoted with `*`).
|
||||
|
||||

|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ curl -o ticker.sh https://raw.githubusercontent.com/pstadler/ticker.sh/master/ticker.sh
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
- [jq](https://stedolan.github.io/jq/), a versatile command-line JSON processor.
|
||||
- [yq](https://github.com/kislyuk/yq), a versatile command-line YAML processor (Python version).
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
# Single symbol:
|
||||
$ ./ticker.sh AAPL
|
||||
|
||||
# Multiple symbols:
|
||||
$ ./ticker.sh AAPL MSFT GOOG BTC-USD
|
||||
|
||||
# Read from file:
|
||||
$ echo "AAPL MSFT GOOG BTC-USD" > ~/.ticker.conf
|
||||
$ ./ticker.sh $(cat ~/.ticker.conf)
|
||||
|
||||
# Use different colors:
|
||||
$ COLOR_BOLD="\e[38;5;248m" \
|
||||
COLOR_GREEN="\e[38;5;154m" \
|
||||
COLOR_RED="\e[38;5;202m" \
|
||||
./ticker.sh AAPL
|
||||
|
||||
# Disable colors:
|
||||
$ NO_COLOR=1 ./ticker.sh AAPL
|
||||
|
||||
# Update every five seconds:
|
||||
$ watch -n 5 -t -c ./ticker.sh AAPL MSFT GOOG BTC-USD
|
||||
# Or if `watch` is not available:
|
||||
$ while true; do clear; ./ticker.sh AAPL MSFT GOOG BTC-USD; sleep 5; done
|
||||
```
|
||||
|
||||
|
||||
BIN
screenshot.jpg
Normal file
BIN
screenshot.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
Reference in New Issue
Block a user