kbc.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import kbc_alt
  2. import kbc_toml
  3. import kbc_sqlite
  4. import kbc_llm
  5. import datetime
  6. # class config def read(), reload()
  7. class kbc_controller():
  8. def get_app_config(returnDict:bool=True):
  9. tomls = kbc_toml.MatchTomlTable("dev.toml", "app_config", "dict")
  10. global app_config
  11. app_config = tomls["app_config"]
  12. if returnDict == True:
  13. return app_config
  14. def get_help():
  15. pass
  16. def rewrite_config():
  17. pass
  18. # [todo 4]
  19. def display_in_timezone():
  20. pass
  21. # [todo 2]
  22. # 前端只检查输入数量正确, 内容正确统一代回后端检查
  23. def validCheck():
  24. pass
  25. def makeLog():
  26. pass
  27. def transitCommand():
  28. # do while or for (1)
  29. while(1):
  30. app_commands = input(currentPath + "/: ", ).split(" ")
  31. # Input exception check
  32. # [todo 1]
  33. # Controller.InputCheck(app_commands)
  34. # [todo 4]
  35. def start():
  36. pass
  37. # 2. Valid DB
  38. # startState = Stateful.Translator(['/', app_config["dbPath"], app_config["dbType"]])
  39. # print(startState)
  40. # kbc_controller.TransitCommand()
  41. if __name__ == "__main__":
  42. kbc_controller.start()