Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Get plaintext patchnotes from the command line

View gist:9533710
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
function patchnotes {
ua="Battle.net/1.0.8.4217"
_baseurl="https://us.battle.net/connect/en/app"
usage="usage: $0 <product> [live|ptr|beta]\nproduct is one of wow, s2, d3, wtcg"
 
hash lynx 2>/dev/null || {
echo "You need to install Lynx first."
return 1
}
 
if [[ $1 == ("--help"|"-h") ]]; then
echo $usage
return 0
fi
 
if [[ $# == 0 || $1 != ("wow"|"s2"|"d3"|"wtcg") ]]; then
echo $usage
return 1
fi
 
if [[ $# == 1 ]]; then
product="live"
else
product=$2
fi
 
lynx -dump -useragent=$ua "$_baseurl/$1/patch-notes?productType=$product" 2> /dev/null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.