12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- import Alt, Stateful
- import datetime
-
- class Client():
- def get_config():
-
- configs = ['DBType', 'DBPath', 'lang', 'listStyle', 'displayTime']
-
- rl = Stateful.matchTomlKeys("config.toml", configs)
-
- global lang, listStyle, dbType, dbPath
- dbType = rl[0]
- dbPath = rl[1]
- lang = rl[2]
- listStyle = rl[3]
- displayTimeZone = rl[4]
- 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 TransitCommand():
-
- while(1):
- app_commands = input(currentPath + "/: ", ).split(" ")
-
-
-
- app_commands.append(dbPath)
- app_commands.append(dbType)
- Stateful.PackHandler(app_commands)
- def start():
-
- Client.get_config()
- global currentPath
- currentPath = " "
-
-
-
- startState = Stateful.TransitHandler(['list', 'board', dbPath, dbType])
- print(startState)
- Client.TransitCommand()
- class View:
- def ToDisplayTime(utcTime, TimeZone):
- displayTime = "displayTime translation not finished"
- return displayTime
-
- def Refresh():
- pass
-
- if __name__ == "__main__":
- Client.start()
|