stonks/getinfo
HeshamTB 4702263d0a initial commit:
- Basic tools. getinfo: curl from 'mubasher' as raw numbers
	readprice: read last price from raw info
	readdelta: read day's change in price
	stonks: still empty (interface)
	- Version 0.1-alpha
	- gitignore: raw/ folder

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-08-19 22:16:30 +03:00

11 lines
260 B
Bash
Executable File

#!/bin/bash
# 19 Aug 2020 - H.B
#read arg and get info from mubasher
raw=$(curl -s "https://english.mubasher.info/markets/TDWL/stocks/$1" | \
html2text2 | \
sed -n '/Last update:/,$p' | \
sed -n '/Stock Statistics/q;p')
mkdir -p raw
echo "$raw" > "raw/$1"