Last active
September 16, 2020 23:31
-
-
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
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
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") | |
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
#!/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