Last active
May 20, 2019 23:07
-
-
Save XChrisUnknownX/c58c60a6729815d0940bba8d0ad3d035 to your computer and use it in GitHub Desktop.
Creates stenography finger drills based on a preset list OR allows for custom lists
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 time | |
import random | |
# creates times | |
hr = 1 | |
min = 0 | |
times = [] | |
identifier = "a.m." | |
while hr <= 12: | |
min = 0 | |
for i in range(0,120): | |
if min >= 60: | |
min = 59 | |
else: | |
pass | |
if min >= 60: | |
min = 0 | |
else: | |
pass | |
if i > 60: | |
identifier = "p.m." | |
else: | |
identifier = "a.m." | |
pass | |
if min == 0: | |
mins = "00" | |
elif min == 1: | |
mins = "01" | |
elif min == 2: | |
mins = "02" | |
elif min == 3: | |
mins ="03" | |
elif min == 4: | |
mins="04" | |
elif min == 5: | |
mins = "05" | |
elif min == 6: | |
mins = "06" | |
elif min == 7: | |
mins ="07" | |
elif min == 8: | |
mins = "08" | |
elif min == 9: | |
mins = "09" | |
else: | |
mins = str(min) | |
hrs = str(hr) | |
clock = hrs + ":"+mins+" "+identifier | |
times.append(clock) | |
min += 1 | |
if min == 60: | |
min = 0 | |
else: | |
pass | |
hr += 1 | |
# creates number list up to 1000 | |
min = 0 | |
num3000 = [] | |
for a in range(0,1001): | |
mins = str(min) | |
num3000.append(mins) | |
min += 1 | |
#creates number list up to 1000000 | |
min = 0 | |
nummillion = [] | |
for b in range(0,1000001): | |
mins = str(min) | |
nummillion.append(mins) | |
min += 1 | |
min = 1960 | |
years = [] | |
while min <= 2030: | |
mins = str(min) | |
years.append(mins) | |
min += 1 | |
# load all the lists between these comments. | |
times = times | |
num3000 = num3000 | |
nummillion = nummillion | |
years = years | |
letters = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"] | |
individualkeysbeginner = ["initial S","initial T","Initial K","Initial P","Initial W","Initial H","Initial R","Initial A","Initial O","Asterisk","Final E","Final U","Final F","Final R","Final P","Final B","Final L","Final G","Final T","Final S","Final D","Final Z"] | |
individualkeysadvanced = ["initial S","initial T","Initial K","Initial P","Initial W","Initial H","Initial R","Initial A","Initial O","Asterisk","Final E","Final U","Final F","Final R","Final P","Final B","Final L","Final G","Final T","Final S","Final D","Final Z","Initial D","Initial B","Initial L","Initial V","Initial Z","Initial C","Initial X","Long A","Long I","Long O","Long U","Final SH","Final CH","Final N","Final NCH","Final M"] | |
conwords = ["contempt","convert","converted","contemporaneous","contemporaneousness","contemptuous","confident","contiguous","continue","continuous","continued","confidential","conflate","conflated","conflates","conjure","conjecture","conjured","conjures","congruent","congruency","confluent","continual","continuity","conniption","continent","conjugal","concept","conceptual","conceptualize","connect","connection","connectivity","constitute","constitution","constitutional","conduct","conducting","conducive","continental","conducts","conductivity","content","contented","contentedness","contend","contents","contending","contends","congruency","congress","congregation","congressional","congregational","confirmation","confirm","confirms","confirming","conflating","connotation","conspire","con","conspires","conspiring","conspired","consorted","consort","congeal","congeals","congealing","congrats","congratulations","congratulating","conglomerate","conglomerates","conglomeration","conglomerating","concession","concessions","condescending","condescend","condescends","confusion","contusion","consequence","consequential","consequence","consequences","control","contraceptive","contract","contracts","contracting","contraction","contractions","contraceptives","contrail","contrails","controls","controlling","contradiction","contradict","controversy","controvert","controversial","controversion","condyle","console","condolence","convalescent","condolences","condone","condones","condoning","convalescence","condom","conundrum","constituent","constituency","contraclockwise","conflagration","constant","consistent","contain","contains","container","containing","consistency","constants","consonants","consonant","contraindicated","contraindicate","contraindication","condition","conditions","conditioning","connective","contravene","contravening","contravenes","contrary","contrarian","controller","convey","conveyor"] | |
wouldcould = ["would","could","should","would've","could've","should've","would have","could have","should have","wouldn't","couldn't","shouldn't","would not","could not","should not","won't","don't","isn't","wasn't","weren't","I'd","she'd","he'd","will not","do not","is not","was not","were not","I would","they'd","they would","she would","he would","would have been","should have been","may have been"] | |
likeas = ["like","as","as a","as of","as if","like a","like we","as we","like they","as they","as intended","like he","like she","as he","as she","as to"] | |
whowhat = ["who","what","why","where","when","why","how"] | |
# load all the lists between these comments. | |
# create logic to choose the list, equate the chosen list to the variable named group. | |
print("You may generate a drill for the following categories: ") | |
time.sleep(.5) | |
print("1 : Times") | |
time.sleep(.5) | |
print("2 : Individual keys, beginner") | |
time.sleep(.5) | |
print("3 : Individual keys, advanced") | |
time.sleep(.5) | |
print("4 : Con words") | |
time.sleep(.5) | |
print("5 : Contractions") | |
time.sleep(.5) | |
print("6 : Like and as") | |
time.sleep(.5) | |
print("7 : Who, what, where, when, why, how") | |
time.sleep(.5) | |
print("8 : Numbers under 1000") | |
time.sleep(.5) | |
print("9 : Numbers under 1000000") | |
time.sleep(.5) | |
print("10 : Letters A through Z") | |
time.sleep(.5) | |
print("11 : Years 1960 to 2030.") | |
time.sleep(.5) | |
print("12 : Create custom list.") | |
time.sleep(.5) | |
print("13 : Load a custom list.") | |
while True: | |
group = input("Enter the number of the category you wish to generate a drill for: ") | |
try: | |
groupi = int(group) | |
if groupi == 1: | |
group = times | |
elif groupi == 2: | |
group = individualkeysbeginner | |
elif groupi == 3: | |
group = individualkeysadvanced | |
elif groupi == 4: | |
group = conwords | |
elif groupi == 5: | |
group = wouldcould | |
elif groupi == 6: | |
group = likeas | |
elif groupi == 7: | |
group = whowhat | |
elif groupi == 8: | |
group = num3000 | |
elif groupi == 9: | |
group = nummillion | |
elif groupi == 10: | |
group = letters | |
elif groupi == 11: | |
group = years | |
elif groupi == 12: | |
print("You have chosen to create a custom list. You MUST enter one word at a time.") | |
time.sleep(.5) | |
print("Type any word. Type DISPLAY to display your drill list. Type END to save your list and continue.") | |
time.sleep(.5) | |
group = [] | |
while True: | |
addition = input("Enter a word for your custom list: ") | |
if addition == "DISPLAY": | |
print(group) | |
continue | |
# elif continue here | |
elif addition == "END": | |
save = open("Custom List.txt","w") | |
size = int(len(group)) - 1 | |
for item in group: | |
save.write("%s\n" % item) | |
save.write(" ") | |
save.close() | |
break | |
else: | |
group.append(addition) | |
elif groupi == 13: | |
print("You have chosen to load a custom list. Lists musts have ONE word separated by spaces.") | |
time.sleep(.5) | |
while True: | |
group = input("Please input the name of the file you wish to load, including the .txt: ") | |
try: | |
load = open(group,"r") | |
group = load.read() | |
group = group.split() | |
load.close() | |
break | |
except: | |
print("Incorrect file name. Try again.") | |
continue | |
else: | |
print("You must enter a valid number.") | |
continue | |
break | |
except: | |
print("You must type a number only.") | |
continue | |
# check | |
while True: | |
wpm = input("Enter words per minute: ") | |
try: | |
wpmi = int(wpm) | |
break | |
except: | |
print("You must enter a number.") | |
continue | |
while True: | |
minutes = input("Enter minutes of dictation: ") | |
try: | |
minutesi = int(minutes) | |
break | |
except: | |
print("You must enter a number.") | |
continue | |
words = wpmi * minutesi | |
drill = open("Generated Drill.txt","w") | |
for i in range(0,words): | |
pick = random.choice(group) | |
drill.write(pick) | |
drill.write(", ") | |
drill.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment