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>
This commit is contained in:
commit
4702263d0a
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
raw/
|
10
getinfo
Executable file
10
getinfo
Executable file
@ -0,0 +1,10 @@
|
||||
#!/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"
|
6
readdelta
Executable file
6
readdelta
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
#read days change from raw info
|
||||
# 19 Aug 2020 - H.B.
|
||||
|
||||
cat raw/$1 | head -n-10 | tail -n+5
|
6
readprice
Executable file
6
readprice
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
#read last price from raw info file
|
||||
|
||||
|
||||
cat raw/$1 | head -n-12 | tail -n+3
|
Loading…
Reference in New Issue
Block a user