Skip to content

Instantly share code, notes, and snippets.

@ThatXliner
Last active September 16, 2020 23:31
Show Gist options
  • Save ThatXliner/09a27c60d9def16b5e4bb29cc2c4166a to your computer and use it in GitHub Desktop.
Save ThatXliner/09a27c60d9def16b5e4bb29cc2c4166a to your computer and use it in GitHub Desktop.
It sings 99 bottles of beer. I was bored 😐. Require python 3.6+. DEPENDACIES: pyautogui
import pyautogui as pyg
pyg.countdown(5)
pyg.write("I am the program...") # Optional.
pyg.press("enter")
for beer_count in range(99, 1, -1):
pyg.keyDown("command")
pyg.press("b")
pyg.keyUp("command")
pyg.write(f"{beer_count} BOTTLES OF BEER ON THE WALL! {beer_count} BOTTLES OF BEEER!!")
pyg.press("enter")
pyg.keyDown("command")
pyg.press("b")
pyg.keyUp("command")
pyg.write(f"TAKE ONE DOWN! PASS IT AROUND!!!! {beer_count - 1} BOTTLES OF BEER ON THE WALL!!!!")
pyg.press("enter")
#!/bin/bash
set -e
echo "Downloading file..."
curl -sSf "https://gist.githubusercontent.com/ThatXliner/09a27c60d9def16b5e4bb29cc2c4166a/raw/03cfc0888ebb28005226437ed9869720cbfb8981/99BOTTLES_OF_BEER_GOOGLE_HANGOUTS.py" -o 99_BOB.py
echo "File downloaded. Installing dependencies..."
python3 -m ensurepip --upgrade > /dev/null
python3 -m pip install pyautogui --upgrade > /dev/null
pip install pyautogui --upgrade > /dev/null
echo "\nFINISHED.\n"
echo "Run the command 'python3 99_BOB.py' to run the program.\nIn the folder the downloaded file is in."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment