Browse Source

added list of intact words and changed capitalisation rules

master
Your Name 3 years ago
parent
commit
d3e6b954fe
  1. 5
      api.py
  2. 1
      intact_words.py
  3. BIN
      queermottoapi.db

5
api.py

@ -50,6 +50,8 @@ def build_word_dict():
for y in range(len(current)): for y in range(len(current)):
charNeeded = current[y] charNeeded = current[y]
for item in wordList: for item in wordList:
if item not in intact:
item = item.lower()
if (len(item)-1) >= y: if (len(item)-1) >= y:
addKey = str(y) + item[y] addKey = str(y) + item[y]
if addKey not in toChooseFrom.keys(): if addKey not in toChooseFrom.keys():
@ -185,8 +187,11 @@ def api_args():
testKey = str(y) + current[y] testKey = str(y) + current[y]
# print(current[y],random.choice(toChooseFrom[testKey])) # print(current[y],random.choice(toChooseFrom[testKey]))
api_phrase.append(random.choice(toChooseFrom[testKey])) api_phrase.append(random.choice(toChooseFrom[testKey]))
api_phrase[0] = api_phrase[0].capitalize()
api_phrase_str_word = ' '.join(api_phrase) api_phrase_str_word = ' '.join(api_phrase)
print('api_phrase_str_word: ',api_phrase_str_word)
api_phrase_str = api_phrase_str + '\\n' + api_phrase_str_word api_phrase_str = api_phrase_str + '\\n' + api_phrase_str_word
print('api_phrase_str: ',api_phrase_str)
api_phrase_str_word = '' api_phrase_str_word = ''
api_phrase_str = api_phrase_str[2:] api_phrase_str = api_phrase_str[2:]

1
intact_words.py

@ -0,0 +1 @@
intact = ["Black","Indigenous"]

BIN
queermottoapi.db

Binary file not shown.
Loading…
Cancel
Save