Last active
February 15, 2018 20:37
-
-
Save loisaidasam/bd22da7d193dd5794fff90273c9562c2 to your computer and use it in GitHub Desktop.
Get a dose of what those silly folks at asciiartfarts.com are up to ...
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 | |
# Note, requires `pup` | |
# https://github.com/ericchiang/pup/ | |
# https://stackoverflow.com/questions/368744/shell-scripting-die-on-any-error/368754#368754 | |
set -e | |
# Temp files | |
file_html=$(mktemp) | |
file_ascii=$(mktemp) | |
# Download html | |
curl -Ss "http://www.asciiartfarts.com/random.cgi" > "$file_html" | |
# Write header + newline | |
cat "$file_html" | pup --plain 'td center h1 text{}' | tr '\n' ' ' > "$file_ascii" | |
echo "" >> "$file_ascii" | |
# Write ASCII | |
cat "$file_html" | pup --plain 'pre text{}' >> "$file_ascii" | |
# Echo | |
cat "$file_ascii" | |
# Remove temp files | |
rm ${file_html} ${file_ascii} | |
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
$ ./ascii-art-farts.sh | |
# 2204 : DON'T FORGET AHMET AND DIVA | |
_ ____ ____ ___ ___ _ _ _____ _ | |
/ \ / ___| / ___|_ _|_ _| / \ _ __| |_ | ___|_ _ _ __| |_ ___ | |
/ _ \ \___ \| | | | | | / _ \ | '__| __| | |_ / _` | '__| __/ __| | |
/ ___ \ ___) | |___ | | | | / ___ \| | | |_ | _| (_| | | | |_\__ \ | |
/_/ \_\____/ \____|___|___| /_/ \_\_| \__| |_| \__,_|_| \__|___/ | |
,@@@@@@@@@, REPEAT: | |
@@@@@@@@@@@@@@@ WHAT KIND OF ASSHOLE NAMES | |
@@@@@@@@@@@@@@@@@ HIS KIDS DWEEZIL AND MOON UNIT | |
@@@@@@@@@@@@@@@@@ | |
@@@@@'_ _'@@@@@ | |
@@@| o o |@@@ YOUR DEATH DOES NOT ALLEVIATE | |
'@| (_) |@' YOUR MORTAL SIN AGAINST HUMANITY | |
\ ___ / IN THE FORM OF UNREASONABLE | |
|\_`~`_/| CHILD NAMING PROCEDURES SIR | |
____/: `"` :\____ | |
/`}}}}}\ /{{{{{`\ | |
/ {{{{{ \ / }}}}} \ | |
/ }}}}} \.-./ {{{{{ \ | |
| {{{{{ / | \ }}}}} | | |
jgs | }}}}} \/|\/ {{{{{ | | |
| /{{{{{ '-' }}}}}\ | | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment