Controller.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. # @author: nandHyf
  2. import os
  3. # import Stateful
  4. import tomlkit, sqlite3
  5. import base64, datetime
  6. class client():
  7. def __init__(self) -> None:
  8. pass
  9. def get_config():
  10. pass
  11. def excute():
  12. pass
  13. def start():
  14. pass
  15. class User:
  16. def __init__(self, command, obj0=[], tag0=None, content=[], tag1=None, obj1=None) -> None:
  17. self.enableGlobalCommand = False
  18. self.command = command
  19. self.obj0 = obj0
  20. self.tag0 = tag0
  21. self.content = content
  22. self.tag1 = tag1
  23. self.obj1 = obj1
  24. def command_help():
  25. pass
  26. # try:
  27. # with open("help.txt","r") as help:
  28. # helpText = help.read()
  29. # if helpText == '':
  30. # print("could not find correct'help.txt'")
  31. # else:
  32. # print(helpText)
  33. # except:
  34. # print("could not find correct'help.txt'")
  35. # def command_exit():
  36. # exit()
  37. def command_export():
  38. pass
  39. def list_board():
  40. pass
  41. def list_event():
  42. pass
  43. def select_board():
  44. pass
  45. def Command_add():
  46. pass
  47. def Command_edit():
  48. pass
  49. def Command_move():
  50. pass
  51. def Command_delete():
  52. pass
  53. def Command_archive():
  54. pass
  55. def Command_back2home():
  56. pass
  57. def Command_get_info():
  58. pass
  59. def Command_get_num():
  60. pass
  61. class Board(User):
  62. pass
  63. class Event(User):
  64. pass
  65. class Trigger():
  66. def __init__(self, T_obj) -> None:
  67. self.T_obj = T_obj
  68. def generate_uid(T_obj):
  69. dt_now = str(datetime.datetime.now(datetime.timezone.utc))
  70. genText = str.encode(T_obj + "_" + dt_now)
  71. uid = base64.b64encode(genText)
  72. return(uid)
  73. # ----- functions binding command to model -----
  74. class WithTxt():
  75. pass
  76. class WithToml():
  77. pass
  78. class WithSqlite3():
  79. def __init__():
  80. pass
  81. def list_():
  82. pass
  83. def add_insert():
  84. pass
  85. def edit_update():
  86. pass
  87. def del_delete():
  88. pass
  89. con = sqlite3.connect("KanbanCore.db")
  90. cur = con.cursor
  91. # class WithMd():
  92. # class WithCsv():
  93. # class WithMongo():
  94. if __name__ == "__main__":
  95. command = input()