master branch updates #19

Merged
alex_orid merged 32 commits from master into db-module 2021-04-09 20:43:03 +00:00
3 changed files with 65 additions and 19 deletions
Showing only changes of commit ecffe6083b - Show all commits

View File

View File

@ -1,19 +1,23 @@
import chyron_config
import config
class Chyron_Module():
def __init__(self):
super().__init__()
self.chyron_string = ""
self.chyron_computedString = ""
self.chyron_items:list = []
def testmain():
pass
def chyron_string_updater(self):
pass
def chyron_stringUpdater(self):
newString = ""
for c in self.chyron_items:
c.item_stringUpdater()
newString = newString + c.itemComputedString
for x in range(config.chyronListSpaceCount):
newString = newString + " "
self.chyron_computedString = newString
def addItem(self, name, title, content):
newItem = ChyronItem.setupItem(name, title, content)
newItem:ChyronItem = ChyronItem()
newItem.setupItem(name, title, content)
self.chyron_items.append(newItem)
def removeItem(self, name):
@ -26,15 +30,55 @@ class ChyronItem():
def __init__(self):
super().__init__()
self.itemName = ""
self.includeTitle = True
self.itemTitle = ""
self.itemContent = ""
self.itemComputedString = ""
def setupItem(self, name, title, content):
print("Setting up Item {", name,"}[", title, content, "]")
self.itemName = name
self.itemTitle = title
self.itemContent = content
def item_stringUpdater(self):
newString = ""
if self.includeTitle == True:
newString = newString + self.itemTitle
newString = newString + self.itemContent
self.itemComputedString = newString
if __name__ == "__main__":
testModule = Chyron_Module()
testModule.testmain()
testModule.addItem(
"test",
"Now: ",
"Coding Stream")
testModule.addItem(
"FriSat",
"► Friday & Saturday: ",
"Coding Stream")
testModule.addItem(
"Commands",
"► Commands: ",
"!animal, !climateclock, !discord, !page, !roll")
testModule.addItem(
"Website",
"► Want to read about my various projects? visit: ",
"TheCuriousNerd.com")
testModule.addItem(
"Follow",
"",
"► If you like what you see, hit that follow button to see more!")
testModule.addItem(
"Discord",
"► Want to join our discord? type \" !d \" in chat to get the link or visit: ",
"discord.io/thecuriousnerd")
testModule.chyron_stringUpdater()
test = testModule.chyron_computedString + "<<<|"
print(test)

View File

@ -41,19 +41,15 @@ blockAll_TTS_URL_Discord = True
autoEnabled_Discord_rgbLightControl = False
#Chyron Module Configs
chyronListSpaceCount = 25
#General Configs
skip_splashScreen = False
skip_splashScreenClear = False
skip_splashScreenSleep = False
class Speaker(Enum):
GOOGLE_TEXT_TO_SPEECH = 1
STREAMLABS_API = 2
currentSpeaker = Speaker.GOOGLE_TEXT_TO_SPEECH
botList = ("Nightbot", "StreamElements", "Moobot", "Praxis Bot", "praxis_bot", "MEE6 +", "Nerdy", "Rythm", "Groovy")
class FileNameStrategy(Enum):
TIME_BASED = 1
@ -69,6 +65,13 @@ class DBStrategy(Enum):
dbStrategy = DBStrategy.SQLite
#TTS Configs
class Speaker(Enum):
GOOGLE_TEXT_TO_SPEECH = 1
STREAMLABS_API = 2
currentSpeaker = Speaker.GOOGLE_TEXT_TO_SPEECH
class PollyVoices(Enum):
Aditi = "Aditi"
Amy = "Amy"
@ -134,8 +137,7 @@ class PollyVoices(Enum):
PollyVoice = PollyVoices.Justin
botList = ("Nightbot", "StreamElements", "Moobot", "Praxis Bot", "praxis_bot", "MEE6 +", "Nerdy", "Rythm", "Groovy")
#Misc Configs
slurList = badwords.slurList
praxisVersion_Alpha = "A.0 "