Quellcode durchsuchen

再整理了一下文件

nandHyf vor 1 Jahr
Ursprung
Commit
b72292c2b7
5 geänderte Dateien mit 19 neuen und 104 gelöschten Zeilen
  1. 1 1
      Controller.py
  2. 0 1
      Roadmap.md
  3. 10 10
      Stateful.py
  4. 8 5
      dev.toml
  5. 0 87
      try.txt

+ 1 - 1
Controller.py

@@ -64,7 +64,7 @@ class Client():
 
 
     # [todo 4]
-    def start(LLM_server=False):
+    def start():
         # 0. init
         
         # 1. get config

+ 0 - 1
Roadmap.md

@@ -15,7 +15,6 @@
 - Export to `.csv`
 - Search
 - Support `MongoDB`
-- Dart version
 
 
 # Future Versions(Roadmap)

+ 10 - 10
Stateful.py

@@ -114,7 +114,7 @@ def Exec_one(dbPath:str, commands:list):
     return re
 
 
-def IsExist(tableName:str, itemName:str, returnBool:bool=True):
+def IsExist(dbPath:str, tableName:str, itemName:str, returnBool:bool=True):
     # [todo 4] 这里面的.capitalize()后面需要根据config.toml里面的内容判断
     # 可能也不用, 因为KBCLEV的表名和本身并无关系
     tableName = tableName.capitalize()
@@ -136,13 +136,6 @@ def IsExist(tableName:str, itemName:str, returnBool:bool=True):
         print("err <Code>: unexpected error in existence check")
 
 
-def GenModel():# Controller里面还有一个一样的方法
-    # model IE?
-    # over write?
-    # exec
-    pass
-
-
 # ----- App commands to sqlite Methods-----
 def select():
     pass
@@ -172,10 +165,17 @@ def export():
     pass
 
 
-# ----- Interactions(with other .py) -----
+def GenModel():
+    # model IE?
+    # over write?
+    # exec
+    pass
+
+
+# ----- Interactions Handler(with other .py) -----
 def Handler():
     pass
 
 
 if __name__ == "__main__":
-    dbPath = "dev.db"
+    pass

+ 8 - 5
dev.toml

@@ -23,7 +23,6 @@ c7 = "state"
 
 # ----- App Configuration -----
 StrictMode = false
-LLM_callable = false
 
 DBType = "sqlite3"
 DBPath = "dev.db"
@@ -32,20 +31,25 @@ Lang = "en"
 ListStyle = "tree"
 DisplayTimeZone = "utc+8"
 
+Start_as_LLM_server = false
+
 
 # ----- Some Notes -----
-# status
+# compact_main.status:
 #   -10 = deleted
-#   10 = alive
+#    10 = alive
 
+# log_action.state:
+#   -10 = committed failed
+#    10 = successfully committed
 
 # Set integer prime key: <columnName> INTEGER PRIMARY KEY ASC
 # status: alive/deleted/unclassified(event only)
 #                                           ↓ Don't foget to write the method(s) for it
 # ListStyle: tree/md_table/LLM_md_table/<customName>
-# [todo 4] StrickMode: 1. Have to be full length commands; 2. err when not exist
 
 
+# ----- used sqls -----
 # CREATE TABLE "main" (
 # 	"id"	INTEGER NOT NULL,
 # 	"type"	TEXT NOT NULL,
@@ -59,7 +63,6 @@ DisplayTimeZone = "utc+8"
 # 	PRIMARY KEY("id" AUTOINCREMENT)
 # );
 
-# ----- used sqls -----
 # INSERT INTO compact_main VALUES(null, 'class', 'CL1', 'dscrp', 'n.HE', datetime('now'), 'KB1, KB2', '', 'alive');
 
 # SELECT name FROM compact_main WHERE belongBoard like '%KB1%'

+ 0 - 87
try.txt

@@ -1,87 +0,0 @@
-Command = ['add', 'board', '<boardName>']
-
-tablePath = Command[2].uper()
-
-is_exist(tablePath, name=None)
-
-if name
-SELECT * FROM {tablePath} WHERE name={name}
-
-
-add event EV1 to KB4/CL2
-add event EV1 to KB4 / CL2
-
-[dev.init]
-CREATE TABLE Board(id INTEGER PRIMARY KEY AUTOINCREMENT, name, status)
-CREATE TABLE Class(id INTEGER PRIMARY KEY AUTOINCREMENT, name, usingBoard, status)
-CREATE TABLE Event(id INTEGER PRIMARY KEY AUTOINCREMENT, name, dscrp, creator, createdTime, classCreated, classCurrent, status)
-CREATE TABLE Stucked(id INTEGER PRIMARY KEY AUTOINCREMENT, boardId, eventId, stuckedTime, solvedTime, status)
-
-
-[type == board]
-/, /KB, /KB/CL, KB/CL/EV: add board <KB2> -> ok
-
-
-[type == class]
-/: add class <CL> -> err (功能上可行但逻辑上不允许)
-/: add class <CL> to <KB> -> ok
-
-/KB: add class <CL> -> ok
-/KB, /KB/CL, /KB/CL/EV: add class <CL> to <KB2>
-    KB2 ie -> ok
-    KB2 ie false, add KB2, add CL -> ok
-        sec: KB2 not ie, create/cancel?[y/n]
-
-
-[type == event]
-/: add event <EV> -> err
-/: add event <EV> to <KB> -> ok
-    sec: no class, class in KB, choose, input()
-
-/: add event <EV> to <KB>/<CL> -> ok
-
-/KB: add event <EV> -> ok
-/KB: add event <EV> to <KB2> -> ok
-    KB2 ie, sec: no class, class in KB, choose, input() -> ok
-    KB2 ne, add KB2, sec: no class, class in KB, choose, input() -> ok
-
-# maybe a safe/strick mode = true in config.toml
-/KB: add event <EV> to <CL> -> ok
-/KB: add event <EV> to <KB2>/<CL> -> ok
-/KB: add event <EV> to <KB>/<CL> -> ok
-/KB: add event <EV> to <KB>/<CL>/,  <KB>/<CL>/<EV> -> err
-
-
-/KB/CL: add event <EV> -> ok
-/KB/CL: add event <EV> to <CL2>
-    CL2 ie in KB, -> ok
-    CL2 ne in KB, -> err
-
-/KB/CL/EV: add event <EV2> -> err
-/KB/CL/EV: add event <EV> to <KB> -> okz
-/KB/CL/EV: add event <EV> to <KB2> -> ok
-/KB/CL/EV: add event <EV> to <CL> -> ok
-/KB/CL/EV: add event <EV> to <CL2>
-    whereis CL2
-/KB/CL/EV: add event <EV2> to <KB>/<CL>
-
-/: any thing
-
-/KB:
-    KB -> ok
-    CL -> ok
-    EV -> ok
-
-/KB/CL:
-    KB -> ok
-    CL -> ok
-    EV -> ok
-
-/KB/CL/EV:
-    KB -> ok
-    CL -> ok
-    EV -> ok
-
-等等, 后端的add不需要检查这些啊?!
-
-add board <KB1>, <KB2>, <KB3>, <KB4>