55 lines
1.3 KiB
Python
55 lines
1.3 KiB
Python
from enum import Enum
|
|
from os import F_OK
|
|
import tempText_Module
|
|
import time
|
|
import config as config
|
|
import db
|
|
import tts
|
|
|
|
from flask import Flask
|
|
|
|
import credentials
|
|
|
|
import commands.loader as command_loader
|
|
from commands.command_base import AbstractCommand
|
|
|
|
from cooldowns import Cooldown_Module
|
|
|
|
import utilities_script as utility
|
|
|
|
import chyron_module
|
|
|
|
class webSource_Module():
|
|
webSources:Flask = Flask('webSources')
|
|
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.dbCredential: credentials.DB_Credential
|
|
|
|
def main(self):
|
|
self.webSources.run(host="0.0.0.0")
|
|
|
|
@webSources.route('/')
|
|
def hello_world():
|
|
return 'I can see your Ghost!'
|
|
|
|
@webSources.route('/chyron')
|
|
def textSource_chyron():
|
|
tempModule = chyron_module.Chyron_Module()
|
|
return tempModule.getChyronFile()
|
|
|
|
@webSources.route('/' + 'brb')
|
|
def textSource_tempText():
|
|
tempModule = tempText_Module.tempText_Module()
|
|
return tempModule.getTempTextFile("brb")
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
testModule = webSource_Module()
|
|
|
|
credentials_manager = credentials.Credentials_Module()
|
|
credentials_manager.load_credentials()
|
|
testModule.dbCredential = credentials_manager.find_DB_Credential(config.credentialsNickname)
|
|
|
|
testModule.main() |