12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- import Alt, Stateful
- import datetime
-
- class Client():
- def get_config():
-
- configs = ['DBType', 'DBPath', 'lang', 'listStyle', 'displayTimeZone']
-
- rl = Stateful.MatchTomlKeys("dev_config.toml", configs)
-
- global lang, listStyle, dbType, dbPath, displayTimeZone, currentPath
- dbType = rl[0]
- dbPath = rl[1]
- lang = rl[2]
- listStyle = rl[3]
- displayTimeZone = rl[4]
- currentPath = ""
-
- def get_help():
- print(Stateful.MatchTomlKey("clean_config.toml", lang, "command-help"))
-
- def InUTC(timeZone=0):
- dt_now_UTC0 = str(datetime.datetime.now(datetime.timezone.utc))
- return(dt_now_UTC0)
-
-
-
- def InputCheck(inputs):
- pass
- def TransitCommand():
-
- while(1):
- app_commands = input(currentPath + "/: ", ).split(" ")
-
-
-
-
- if len(app_commands) < 5:
-
- app_commands.append(currentPath)
- app_commands.append(dbPath)
- app_commands.append(dbType)
- Stateful.Handler(app_commands)
- elif len(app_commands) >= 5:
- print("app_commands >5 error")
-
- def GenDB():
- pass
-
-
-
- def start():
-
-
-
- Client.get_config()
-
- startState = Stateful.Handler(['/', dbPath, dbType])
- print(startState)
- Client.TransitCommand()
- class View:
- def ToDisplayTime(utcTime, TimeZone):
- displayTime = "displayTime translation not finished"
- return displayTime
-
- def Refresh():
- pass
- class LLMCall():
- pass
- if __name__ == "__main__":
- Client.start()
|