67 lines
1.5 KiB
Python
67 lines
1.5 KiB
Python
from enum import Enum
|
|
from os import F_OK
|
|
import tempText_Module
|
|
import time
|
|
import config as config
|
|
|
|
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
|
|
|
|
|
|
api:Flask = Flask(__name__)
|
|
api.config["DEBUG"] = True
|
|
|
|
def init():
|
|
print("starting up... ",)
|
|
|
|
|
|
@api.route('/')
|
|
def hello_world():
|
|
return 'I can see your Ghost!'
|
|
|
|
@api.route('/chyron')
|
|
def textSource_chyron():
|
|
tempModule = chyron_module.Chyron_Module()
|
|
return tempModule.getChyronFile()
|
|
|
|
@api.route('/text/<file_name>/')
|
|
def textSource_tempText(filename):
|
|
print("trying file: ", filename)
|
|
tempModule = tempText_Module.tempText_Module()
|
|
return tempModule.getTempTextFile(filename)
|
|
|
|
@api.route('/timer/<timer_name>/')
|
|
def textSource_timers(filename):
|
|
#print("trying file: ", filename)
|
|
#tempModule = tempText_Module.tempText_Module()
|
|
#tempModule.getTempTextFile(filename)
|
|
return "Coming Soon"
|
|
|
|
if __name__ == "__main__":
|
|
init()
|
|
api.run(host="0.0.0.0", port = 5500)
|
|
|
|
|
|
#testModule_2 = webSource_Module()
|
|
#threads = []
|
|
|
|
#credentials_manager = credentials.Credentials_Module()
|
|
#credentials_manager.load_credentials()
|
|
#testModule.dbCredential = credentials_manager.find_DB_Credential(config.credentialsNickname)
|
|
|
|
#thread_ = threading.Thread(target=testModule.main(port_=6000))
|
|
#threads.append(thread_)
|
|
#thread_.start()
|
|
|
|
#for t in threads:
|
|
#t.join() |