For This WCC Challenge, I decided to use the Ascii art package in Python named " Art" and use that as a base to generate ASCII Wordage from prompts they entered.
If you have any of the following, you can use the code online :
A Google account to use Colab with the code to try
Jupiter Notebook
Or any Python environment of your choice (might have to install some stuff)
Below is the Code and the Output of a couple of Inputs
First Code is based of User Input
While Second is based of URL Entry
!pip install art
import random as rand
import re
from art import *
'''
#URL text approach, in case you have text you want to play with instead of the user input
import urllib.request
import requests
import urllib
from urllib.request import urlopen
import urllib3
#URL code getter
file_url = 'https://gist.githubusercontent.com/IllestPreacha/fba97ec51cba892638ab5a6d0fab7ca9/raw/2ff5bf0c47e3293d4f88aec3498318c8436237fa/Rubberband.txt'
http = urllib3.PoolManager()
response = http.request('GET', file_url)
data = response.data.decode('utf-8')
'''
#Input Information
data = input("Write/Input a Sentence of 8 or More Words: ") #TextInput
print(data) #printing data
IWTUsed = list(map(str,data.split())) #individuals words
charCount = len(data) #check how many characters
wordCount = len(IWTUsed) #wordCount
def Randomizer():
num = rand.randint(0, 27) #randomizer
#conditionals
if (num > 0 and num < 3):
fontType = "cybermedium"
elif (num > 3 and num < 6):
fontType = "yellow"
elif (num > 6 and num < 9):
fontType = "block"
elif (num > 9 and num < 12):
fontType = "red"
elif (num > 12 and num < 15):
fontType = "art"
else:
fontType = "wizard"
return fontType #return to use in the Relics_Ascii function
def Divertion_Light():
#Takes the first letter of a word that doesnt start with P,R,S,T and changes it to the letter X
text = rand.choice(IWTUsed)
x = text.startswith(('P', 'R','S','T','U','V'))
if x :
print(text)
return text #return the original text
else:
textList = list(text) #takes the string into a list
textList[0] = 'X' #takes the first variable and turns it to the letter x
newText = ''.join(textList) #Join the two list to get the new word
return newText #return the updated switch
def Divertion_Extra():
#Takes the first letter of a word that doesnt start with P,R,S,T and changes it to the letter X
text = rand.choice(IWTUsed)
textList = list(text) #takes the string into a list
if len(text) > 4:
textList[len(text)-rand.randint(1,4)] = 'Y'
textList[len(text)-rand.randint(1,4)] = 'Z'
else:
textList[len(text)-1] = 'Z' #rakes the last variable and turns it into the letter Z
textList[len(text)-2] = 'Y'
newText = ''.join(textList) #Join the two list to get the new word
new_textList = list(newText) #takes the string into a list
new_textList[0] = 'Z' #rakes the last variable and turns it into the letter Z
newerText = ''.join(new_textList) #Join the two list to get the new word
return newerText #return the updated switch
#Ascii Part
def Relics_Ascii():
tprint(rand.choice(IWTUsed).upper(),font= Randomizer()) #calling Randomizer
Block=text2art(rand.choice(IWTUsed),font='block',chr_ignore=True) #code already implemented within the art library
print(Block + rand.choice(IWTUsed))
tprint(rand.choice(IWTUsed).upper(),font="cybermedium")
tprint(Divertion_Light(),font="cybermedium")
yellowFont=text2art(rand.choice(IWTUsed),font='font="yellow"',chr_ignore=True)
print(yellowFont)
tprint(rand.choice(IWTUsed).upper(),font= Randomizer())
tprint(Divertion_Extra(),font="cyberbig")
if wordCount > 20:
Relics_Ascii()
Relics_Ascii()
else:
Relics_Ascii()
Requirement already satisfied: art in c:\users\skyis\anaconda3\lib\site-packages (5.7) Write/Input a Sentence of 8 or More Words: WHat are we trying to do with this piece of code WHat are we trying to do with this piece of code
db 88888888ba 88888888888
d88b 88 "8b 88
d8'8b 88 ,8P 88 d8'
8b 88aaaaaa8P' 88aaaaa
d8YaaaaY8b 88""""88' 88"""""
d8""""""""8b 88 8b 88 d8'
8b 88 8b 88 d8'
8b 88 `8b 88888888888
.----------------. .----------------. | .--------------. || .--------------. | | | ________ | || | ____ | | | | |_ ___ . | || | .'
. | | | | | | . \ | || | / .--. \ | | | | | | | | | || | | | | | | | | | _| |___.' / | || | \
--' / | | | | |.' | || | `..' | | | | | || | | | | '--------------' || '--------------' | '----------------' '----------------' are ____ ____ ___ ____ | | | | \ | | || |/ |_
_ _ _ _ _ ____ / || | [
_/_ | | | ___]
... _ (_][ (/,
###### ###### ###### # # # # #
# # # # #
####### ####### #####
## # ## # ##
## # ## # ##
## # ## # #######
______ ______ / / / /__
Relics_Ascii()
______ __ __ ______ ____
/__ \ /\ /\ \ /_ \ /\ \ \/_/\ \/ \ \ \_\ \ \/_/\ \/ \ \,\L\_\ \ \ \ \ \ _ \ \ \ \ \/_\__ \ \ \ \ \ \ \ \ \ \_\ \__ /\ \L\ \ \ \_\ \ \_\ \_\ /\_____\ \
_
// //// // //
.----------------. .----------------. | .--------------. || .--------------. | | | _____ _____ | || | _________ | | | ||_ || || || | | ___ | | | | | | | /\ | | | || | | |_ _| | | | | | |/ | | | || | | | _ | | | | | /\ | | || | | |/ | | | | | |/ _| | || | |___| | | | | | || | | | | '--------------' || '--------------' | '----------------' '----------------' are ___ ____ _ _ _ _ _ ____ | |/ _/ | |\ | | __ | | \ | | | | |]
_ _ ____ / |___ _/_ |
._ _ |, (_)|
###### ###### ###### ###### # # # ## # # #
# # ## # # #
## ## # ## # #####
## ## # ## # ##
## # ## # ## # ##
####### ####### ####### #######
______ ______ __ __ ______ __ _ __ __ ___/ |**/ _/ / | \ | _/
/ | _ | / | _| |
Relics_Ascii()
@@@ @@@ @@@ @@@ @@@ @@@@@@ @@@@@@@ @@! @@! @@! @@! @@@ @@! @@@ @!!
@!! !!@ @!@ @!@!@!@! @!@!@!@! @!!
!: !!: !! !!: !!! !!: !!! !!:
::.: ::: : : : : : : :
.----------------. .----------------. | .--------------. || .--------------. | | | ________ | || | ____ | | | | |_ ___ . | || | .'
. | | | | | | . \ | || | / .--. \ | | | | | | | | | || | | | | | | | | | _| |___.' / | || | \
--' / | | | | |______.' | || | `._.' | | | | | || | | | | '--------------' || '--------------' | '----------------' '----------------' we ____ ____ | | | || |
_ _ ____ / | | _/_ |__|
.
. _ | _ (.()(_](/,
@@@@@@@ @@@ @@@@@@@@ @@@@@@@ @@@@@@@@ @@! @@@ @@! @@! !@@ @@!
@!@@!@! !!@ @!!!:! !@! @!!!:!
!!: !!: !!: :!! !!:
: : : :: :: :: :: : : :: ::
______ _____ __ __ ______ / | _/ / / | | /__
Relics_Ascii()
_ _ _ _ _ _ _
() () ()()()()()
() () ()
() _ () () _ _
() ()_ () ()()()
() () () () ()
()() ()() () _ _ _ _
() () ()()()()(_)
.----------------. .----------------. | .--------------. || .--------------. | | | _________ | || | ____ | | | | | _ _ | | || | .' . | | | | |_/ | | \_| | || | / .--. \ | | | | | | | || | | | | | | | | | _| |_ | || | \
--' / | | | | |_| | || | `.____.' | | | | | || | | | | '--------------' || '--------------' | '----------------' '----------------' with _ _ _ _ _ ____ ___ | | | || || |
||| | | | | |
_ _ ____ ___ ____ / | | | \ |___ /_ || |/ |__
.
| _ (](_)
dP dP dP dP dP .d888888 d888888P 88 88 88 88 88 d8' 88 88
88 .8P .8P 88aaaaa88a 88aaaaa88a 88
88 d8' d8' 88 88 88 88 88
88.d8P8.d8P 88 88 88 88 88
8888' Y88' dP dP 88 88 dP
oooooooooooooooooooooooooooooooooooooooooooo
______ __ __ ______ / _/ / / | /__
Relics_Ascii()
oooo______oooo____oooooo____ooooooo oo____oo__oo____oo__oo____oo__oo___ oo________oo______oo_oo_____oo_oooo____ oo________oo______oo_oo_____oo_oo______ oo____oo__oo____oo__oo____oo__oo_____ __oooo______oooo____oooooo____ooooooo _______________________________________
.----------------. .----------------. .----------------. | .--------------. || .--------------. || .--------------. | | | __ | || | _______ | || | _________ | | | | / \ | || | |_ __ \ | || | |_ ___ | | | | | / /\ \ | || | | |) | | || | | |_ _| | | | | / ____ \ | || | | __ / | || | | | _ | | | | / / \ _ | || | | | \ _ | || | | |/ | | | | ||| ||| || | || || | || | |__| | | | | | || | | || | | | | '--------------' || '--------------' || '--------------' | '----------------' '----------------' '----------------' piece ____ ____ | | | || |
_ _ ____ / | | _/_ |__|
, .
-+-|_ * __ | [ )|_)
ooooooooooooo .oooooo.
8' 888 8 d8P'
Y8b
888 888 888 888 888 888 888 888 888 888 88b d88' o888o
Y8bood8P'
______ __ __ ______ / _/ / / | /__
!pip install art
import sys
import random as rand
import re
from art import *
#URL based libraries
import urllib.request
import requests
import urllib
from urllib.request import urlopen
import urllib3
#URL code getter , Can use an URL to get words from
file_url = 'https://gist.githubusercontent.com/IllestPreacha/fba97ec51cba892638ab5a6d0fab7ca9/raw/2ff5bf0c47e3293d4f88aec3498318c8436237fa/Rubberband.txt'
http = urllib3.PoolManager()
response = http.request('GET', file_url)
data = response.data.decode('utf-8')
#data = input("Write/Input a Sentence of 8 or More Words: ") #TextInput
print(data) #printing data
IWTUsed = list(map(str,data.split())) #individuals words
charCount = len(data) #check how many characters
wordCount = len(IWTUsed) #wordCount
def Randomizer():
num = rand.randint(0, 27) #randomizer
#conditionals
if (num > 0 and num < 3):
fontType = "cybermedium"
elif (num > 3 and num < 6):
fontType = "yellow"
elif (num > 6 and num < 9):
fontType = "block"
elif (num > 9 and num < 12):
fontType = "red"
elif (num > 12 and num < 15):
fontType = "art"
else:
fontType = "wizard"
return fontType #return to use in the Relics_Ascii function
def Divertion_Light():
#Takes the first letter of a word that doesnt start with P,R,S,T and changes it to the letter X
text = rand.choice(IWTUsed)
x = text.startswith(('P', 'R','S','T','U','V'))
if x :
print(text)
return text #return the original text
else:
textList = list(text) #takes the string into a list
textList[0] = 'X' #takes the first variable and turns it to the letter x
newText = ''.join(textList) #Join the two list to get the new word
return newText #return the updated switch
def Divertion_Extra():
#Takes the first letter of a word that doesnt start with P,R,S,T and changes it to the letter X
text = rand.choice(IWTUsed)
textList = list(text) #takes the string into a list
if len(text) > 4:
textList[len(text)-rand.randint(1,4)] = 'Y'
textList[len(text)-rand.randint(1,4)] = 'Z'
else:
textList[len(text)-1] = 'Z' #rakes the last variable and turns it into the letter Z
textList[len(text)-2] = 'Y'
newText = ''.join(textList) #Join the two list to get the new word
new_textList = list(newText) #takes the string into a list
new_textList[0] = 'Z' #rakes the last variable and turns it into the letter Z
newerText = ''.join(new_textList) #Join the two list to get the new word
return newerText #return the updated switch
#Ascii Part
def Relics_Ascii():
tprint(rand.choice(IWTUsed).upper(),font= Randomizer()) #calling Randomizer
Block=text2art(rand.choice(IWTUsed),font='block',chr_ignore=True) #code already implemented within the art library
print(Block + rand.choice(IWTUsed))
tprint(rand.choice(IWTUsed).upper(),font="cybermedium")
tprint(Divertion_Light(),font="cybermedium")
yellowFont=text2art(rand.choice(IWTUsed),font='font="yellow"',chr_ignore=True)
print(yellowFont)
tprint(rand.choice(IWTUsed).upper(),font= Randomizer())
tprint(Divertion_Extra(),font="cyberbig")
if wordCount > 20:
Relics_Ascii()
Relics_Ascii()
else:
Relics_Ascii()
Requirement already satisfied: art in c:\users\skyis\anaconda3\lib\site-packages (5.7) Green Yellow Red Black Purple Orange Brown Neutral Up Down Left Right Pin PinConsistent PinSwitch Diagonal PinnerChoice Short Long Medium Interior Exterior Double Single Triple oooooooo_ooooooo___oooo_ooooooo__oo______ooooooo_ oo____oo____oo___oo__oo____oo_oo______oo___ oo____oo____oo___oo__oo____oo_oo______oooo_ oo____ooooooo____oo__oooooo___oo______oo___ oo____oo____oo___oo__oo_______oo______oo___ __oo____oo_____oo_oooo_oo_______ooooooo_ooooooo _________________________________________________
.----------------. .----------------. .----------------. .----------------. .-----------------. | .--------------. || .--------------. || .--------------. || .--------------. || .--------------. | | | ______ | || | _______ | || | ____ | || | _____ _____ | || | ____ _____ | | | | |_ _ \ | || | |_ __ \ | || | .' . | || ||_ _||_ _|| || ||_ \|_ _| | | | | | |_) | | || | | |__) | | || | / .--. \ | || | | | /\ | | | || | | \ | | | | | | | __'. | || | | __ / | || | | | | | | || | | |/ \| | | || | | |\ \| | | | | | _| |__) | | || | _| | \ \_ | || | \
--' / | || | | /\ | | || | | |\ |_ | | | | |/ | || | || || | || | `..' | || | |__/ _| | || |||_| | | | | | || | | || | | || | | || | | | | '--------------' || '--------------' || '--------------' || '--------------' || '--------------' | '----------------' '----------------' '----------------' '----------------' '----------------' PinnerChoice ___ ____ _ _ ___ _ ____ | \ | | | | |] | | |/ || || |] |___ |___
Up _ _ ___
| | |] || |
. . .
|/| _ |\. .. _ | |(/,(]|(*|[ | )
___ ____ _ _ ___ _ ____ | \ | | | | |] | |_ |/ || || |] |___ |___
______ _ _ _____ ______ _______ / || | | / |
/ | | || / |
888888ba dP .d888888 a88888b. dP dP 88 8b 88 d8' 88 d8'
88 88 .d8' a88aaaa8P' 88 88aaaaa88a 88 88aaa8P'
88 8b. 88 88 88 88 88
8b. 88 .88 88 88 88 Y8. .88 88 88 88888888P 88888888P 88 88 Y88888P' dP dP oooooooooooooooooooooooooooooooooooooooooooooooooooo
.----------------. .----------------. .----------------. .-----------------. | .--------------. || .--------------. || .--------------. || .--------------. | | | ________ | || | ____ | || | _____ _____ | || | ____ _____ | | | | |_ ___ . | || | .'
. | || ||_ || || || || |_ | | | | | | | . \ | || | / .--. \ | || | | | /\ | | | || | | \ | | | | | | | | | | | || | | | | | | || | | |/ \| | | || | | |\ \| | | | | | _| |___.' / | || | \
--' / | || | | /\ | | || | | |\ | | | | | |.' | || | `.____.' | || | |/ __| | || ||*|_*| | | | | | || | | || | | || | | | | '--------------' || '--------------' || '--------------' || '--------------' | '----------------' '----------------' '----------------' '----------------' Interior ___ _ _ _ ____ _ _ _ _ ___ ____ _ _ |] | |\ | [__ | | | | | | || | | | | ] ||| | | | | |
_ _ _ ____ ____ _ _ / | || | |/
/_ | | | |__ | _
.. ,
| . -+- _ ..\ _ .. |*[ ) | (/,[ |(_)[
.--- ,. ,. ,--,--'
.--- .-,--. ,-_/ ,---. .-,--. |__ \/
- | |__ |__/ ' | | |
|__/ ,| /\ , | ,| | \ .- | | | | \ ^---
' '
-' ^---
-' --' ---'
-' `
______ _____ __ __ ______ ______ _______ / | | _/ |] / | / || | |] /___ |______
Relics_Ascii()
.--- ,. ,. ,--,--'
.--- .-,--. ,-_/ ,---. .-,--. |__ \/
- | |__ |__/ ' | | |
|__/ ,| /\ , | ,| | \ .- | | | | \ ^---
' '
-' ^---
-' --' ---'
-' `
.----------------. .----------------. .----------------. .----------------. .----------------. | .--------------. || .--------------. || .--------------. || .--------------. || .--------------. | | | _______ | || | ____ ____ | || | ____ | || | _______ | || | _________ | | | | / ___ | | || | |_ || | | || | .' . | || | |_ __ \ | || | | _ _ | | | | | | (__ \_| | || | | |__| | | || | / .--. \ | || | | |__) | | || | |_/ | | \_| | | | | '.___
-. | || | | __ | | || | | | | | | || | | __ / | || | | | | | | | |\____) | | || | _| | | |_ | || | \
--' / | || | | | \ _ | || | | | | | | | |.' | || | |||| | || | `..' | || | |**| || | || | || | | | | | || | | || | | || | | || | | | | '--------------' || '--------------' || '--------------' || '--------------' || '--------------' | '----------------' '----------------' '----------------' '----------------' '----------------' Neutral ___ _ ____ ____ _ _ |] | |*| | |_/
|] |*__ | | |___ | _
_ _ ____ _ _ ____ / | | |\ | | __ _/_ || | | |]
.__ . [__) _ | | (/,(]
eeeee e eeeee eeeee e e e e eeeee eeee e e 8 8 8 8 8 8 " 8 8 8 8 8 8 8 8 8 8eee8 8e 8e 8 8eeee 8e 8 8 8e 8e 8e 8eee8 88 88 88 8 88 88 8 8 88 88 88 88 8 88 88 88 8 8ee88 88ee8ee8 88 88 88e8 88 8
______ _______ ______ _____ __ __ ______ / |__ | \ | _/ / /_ |______ |/ | | /
Relics_Ascii()
\========================================================================= = ======= == == ==== == == ====== ===== ======= = ====== == ======== ==== ===== ===== ==== ==== ==== ======= = ===== == ======== ==== ===== ===== ==== === == === ======= = == === == ======== ==== ===== ===== === == ==== == ======= = === == == ==== ==== ===== ===== ==== ==== == ======= = ==== = == ======== ==== ===== ===== ==== == == ======= = ===== == ======== ==== ===== ===== ==== == ==== == ======= = ====== == ======== == ===== ===== ==== == ==== == ======= = ======= == === ====== ===== ==== == ==== == = =========================================================================
.----------------. .-----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. | .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. | | | _____ | || | ____ _____ | || | _________ | || | _________ | || | _______ | || | _____ | || | ____ | || | _______ | | | | |_ | | || || |_ | | || | | _ _ | | || | | ___ | | || | |_ __ \ | || | |_ | | || | .' . | || | |_ __ \ | | | | | | | || | | \ | | | || | |_/ | | \_| | || | | |_ \_| | || | | |__) | | || | | | | || | / .--. \ | || | | |__) | | | | | | | | || | | |\ \| | | || | | | | || | | _| _ | || | | __ / | || | | | | || | | | | | | || | | __ / | | | | _| |_ | || | _| |_\ |_ | || | _| |_ | || | _| |___/ | | || | _| | \ \_ | || | _| |_ | || | \
--' / | || | | | \ _ | | | | || | || |||_| | || | |**| | || | || | || | |**| || | || | || | || | `..' | || | || |**| | | | | | || | | || | | || | | || | | || | | || | | || | | | | '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' | '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' Right ____ _ ____ _ _ ___ |/ | | __ || |
| \ | |__] | | |
_ _ ____ _ _ ___ ____ ____ _
/ |___ | | | |/ || |
/_ |__ || | | \ | | |_
.__ __ .
[__)*._ ._ _ ../ `| _ * . _ | |[ )[ )(/,[ _.[ )()|(.(/,
### ### ## ## ## # # ## #
# # # # # # # # # ## # # # #
# # # # # # # # ## # # # #
# # # #### # ## # # # ## #### #
# # # # # # # # # # ## # # #
### ### # # ### ## # # # # ####
______ ______ _______ ______ ______ _______ / |/ || / | ____ | /___ | _ | | /_____ || |_