From 905fe1589027d607352b51ec720fd814fac9ddfe Mon Sep 17 00:00:00 2001 From: codeboss <2422523675@qq.com> Date: Mon, 29 Jul 2024 12:50:59 +0800 Subject: [PATCH] 'save-at:1722228659.2170475' --- manage/NovelManage.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/manage/NovelManage.py b/manage/NovelManage.py index a8d679b..8b929ee 100644 --- a/manage/NovelManage.py +++ b/manage/NovelManage.py @@ -2,6 +2,9 @@ import sys, os import subprocess as xsub import time from typing import List +from parse.StoryMap import XAST_ParseTool, StoryMap, FragmentSlice, storyline_list2map +from parse.StorylineCmp import CmpTool, ModifyReason +from manage.MileStone import base_store_path, current_store_path def git_save(target_dir: str): @@ -42,4 +45,12 @@ if __name__ == "__main__": #wnss:-cmp if cmd_line == "wnss:-cmp": git_save(os.getcwd()) - nsc_compile(os.getcwd()) \ No newline at end of file + nsc_compile(os.getcwd()) + ast_old = XAST_ParseTool(base_store_path) + ast_new = XAST_ParseTool(current_store_path) + map_old = storyline_list2map(ast_old.story_list) + map_new = storyline_list2map(ast_new.story_list) + + cmp_tool = CmpTool() + all_changed = cmp_tool.graph_compare(map_new, map_old) + print(all_changed) \ No newline at end of file