----- Changes: lfrc, rateUSD

+ Added #!/bin/sh on rateUSD (cuz i can)
+ Added open_with to lf
This commit is contained in:
ziro 2020-05-19 07:28:27 +07:00
parent cda9be2bf2
commit 1b9fe5b22f
2 changed files with 3 additions and 0 deletions

View file

@ -21,6 +21,8 @@ cmd open ${{
esac
}}
cmd open_with ${{ [ -z "$1" ] && echo "$f" || $1 "$f" }}
cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')"
cmd touch $touch "$(echo $* | tr ' ' '\ ')"

View file

@ -1,3 +1,4 @@
#!/bin/sh
# get rate value from cnbcindonesia.com
[ ! "$(stat -c %y ~/.cache/rateUSD.txt 2> /dev/null | cut -d' ' -f1)" = "$(date "+Y-%m-%d")" ] &&
curl -s "https://www.cnbcindonesia.com/market-data/currencies/IDR=/USD-IDR" | grep -A1 'class="mark_val"' | cut -d'"' -f2 | cut -d'<' -f2 | cut -d'>' -f2 > ~/.cache/rateUSD.txt