Created
January 2, 2018 23:12
-
-
Save jackdpage/16c50e629f867dbe9e4e36bf271e0915 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMMAND1="" | |
get_push () { | |
COMMAND2=$(curl -s --header 'Access-Token: <<PUT YOUR ACCESS TOKEN HERE>>' --data-urlencode limit=1 --get https://api.pushbullet.com/v2/pushes | sed 's/.*body":"\(.*\)"}].*/\1/' | tr [:lower:] [:upper:]) | |
} | |
get_osc () { | |
while read line; do | |
case "$line" in | |
*"$COMMAND2"*) | |
python3 sendosc.py "$(echo $line | sed 's/.*,\(.*\)/\1/')" 1 | |
break | |
esac | |
done < translations.csv | |
} | |
while true; do | |
get_push | |
if [ "$COMMAND1" != "$COMMAND2" ]; then | |
COMMAND1=$COMMAND2 | |
get_osc | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment