Controller.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import kbc_alt
  2. import Stateful
  3. import datetime
  4. class kbc_controller():
  5. def get_help():
  6. pass
  7. def rewrite_config():
  8. pass
  9. # [todo 3]
  10. def InUTC(timeZone:int=0):
  11. dt_now_UTC0 = str(datetime.datetime.now(datetime.timezone.utc))
  12. return(dt_now_UTC0)
  13. # [todo 2]
  14. # 前端只检查输入数量正确, 内容正确统一代回后端检查
  15. def InputHandler():
  16. pass
  17. def TransitCommand():
  18. # do while or for (1)
  19. while(1):
  20. app_commands = input(currentPath + "/: ", ).split(" ")
  21. # Input exception check
  22. # [todo 1]
  23. # Controller.InputCheck(app_commands)
  24. # [todo 4]
  25. def GenDB():# Stateful里面还有一个一样的方法
  26. pass
  27. # 1. 先检查是否已经存在DB? y/n?
  28. # 2. 连接性检查(是否要切换到新建的DB)y/n?
  29. # [todo 4]
  30. def start():
  31. pass
  32. # 2. Valid DB
  33. # startState = Stateful.Translator(['/', app_config["dbPath"], app_config["dbType"]])
  34. # print(startState)
  35. # kbc_controller.TransitCommand()
  36. class View:
  37. def ToDisplayTime(utcTime, TimeZone):
  38. displayTime = "displayTime translation not finished"
  39. return displayTime
  40. def Refresh():
  41. pass
  42. # For ChatGLM3-6B
  43. class LLM():
  44. def call():
  45. pass
  46. def respond():
  47. pass
  48. if __name__ == "__main__":
  49. kbc_controller.start()