Skip to content

Instantly share code, notes, and snippets.

@Mosharush
Last active August 28, 2022 11:58
Show Gist options
  • Save Mosharush/c35080d999172e44c9db14451f50b756 to your computer and use it in GitHub Desktop.
Save Mosharush/c35080d999172e44c9db14451f50b756 to your computer and use it in GitHub Desktop.
Check if the delivery status is online on a specific restaurant in Wolt

Pre-installation requirements

MacOs:

HomeBrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null

Linux

espeak (text-to-speak engine)

sudo apt install espeak

MacOs:

brew install jq

Ubuntu:

sudo apt-get install jq

Usage

Run Without install (not recommended)

curl -s https://gist.githubusercontent.com/Mosharush/737a31066680e319d722579b74336a4cec84a362/raw/wolt-is-online.sh | bash -s fat-cow

Install

wget https://gist.githubusercontent.com/Mosharush/737a31066680e319d722579b74336a4cec84a362/raw/wolt-is-online.sh -O /usr/bin/wolt-is-online
chmod +x /usr/bin/wolt-is-online

Run

wolt-is-online fat-cow
#!/bin/bash
RESTAURANT_NAME="$1" #Ex: fat-cow
sp="/-\|"
sc=0
spin() {
printf "\b${sp:sc++:1}"
((sc==${#sp})) && sc=0
}
endspin() {
printf "\r%s\n" "$@"
}
if [[ "$OSTYPE" != "darwin"* ]]; then
say() {
echo "$1" | espeak -s 150 2>/dev/null
}
fi
while [ true ]
do
spin
sleep 0.5
if ! ((sc % 20)); then
if [ $(curl -sL https://restaurant-api.wolt.com/v3/venues/slug/$RESTAURANT_NAME | jq ".results[0].online" | grep true) ]; then
say "Orders Available Now"
break
fi
fi
done
endspin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment