added dotmatrix printer funtion

master
Name 2 years ago
parent e86fa60d21
commit d461bc8b1a

@ -1,5 +1,6 @@
#This is a script that writes rules and instructions
#First it sets variables
import os
import random
import urllib.request
#games = ["backgammon", "pokemon", "war"]
@ -55,22 +56,24 @@ def quantifier (words):
return word + "s"
#print(type(objects))
#print(objects)
def dotprint(text):
os.system('echo "'+text+'"> /dev/usb/lp0')
print(text)
#object = ["teammate", "card", "turn", "place", "board", "dice", "nice", "backgammon"]
#verb = ["choose", "pick", "give", "burn", "cut"]
#Then it writes a title
print("~*"*60)
print("\n" + " " *10+"How to play " + random.choice(gamenames)+"\n")
print(random.choice(introductions))
print("\n" + "~*"*60 +"\n")
dotprint("~*"*60)
dotprint("\n" + " " *10+"How to play " + random.choice(gamenames)+"\n")
dotprint(random.choice(introductions))
dotprint("\n" + "~*"*60 +"\n")
#Then it loops through instructions
for i in range(random.randrange(5,10)):
print("Action " + str(random.randrange(100,1000)) + ": "+ random.choice(verbs) + " " + quantifier (objects) + " with " + random.choice(tools) + " from the " + random.choice(themes) + " section to " + random.choice(spaces))
dotprint("Action " + str(random.randrange(100,1000)) + ": "+ random.choice(verbs) + " " + quantifier (objects) + " with " + random.choice(tools) + " from the " + random.choice(themes) + " section to " + random.choice(spaces))
#f"{a:02}"
print("\n" + "~*"*60 +"\n")
print("After you finish playing the game, please proceed to the pen plotter station to contribute in the collective writing process. (and answer the question How do we library that? or somethin specific) \n")
print("""
dotprint("\n" + "~*"*60 +"\n")
dotprint("After you finish playing the game, please proceed to the pen plotter station to contribute in the collective writing process. (and answer the question How do we library that? or somethin specific) \n")
dotprint("""
wWWWw wWWWw
vVVVv (___) wWWWw (___) vVVVv
(___) ~Y~ (___) vVVVv ~Y~ (___)

Loading…
Cancel
Save