This commit is contained in:
codeboss 2024-08-02 23:02:46 +08:00
parent dd9542622e
commit 75e239a92f
24 changed files with 70 additions and 43 deletions

6
.idea/encodings.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/manage/wnss.bat" charset="GBK" />
</component>
</project>

View File

@ -8,7 +8,8 @@
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/frame/ContentView.py" beforeDir="false" afterPath="$PROJECT_DIR$/frame/ContentView.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/frame/ContentView.py" beforeDir="false" afterPath="$PROJECT_DIR$/frame/ContentView.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/graph/undirected_graph/UDGPresent.py" beforeDir="false" afterPath="$PROJECT_DIR$/graph/undirected_graph/UDGPresent.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/graph/undirected_graph/UDGPresent.py" beforeDir="false" afterPath="$PROJECT_DIR$/graph/undirected_graph/UDGPresent.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/parse/StoryMap.py" beforeDir="false" afterPath="$PROJECT_DIR$/parse/StoryMap.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/manage/NovelManage.py" beforeDir="false" afterPath="$PROJECT_DIR$/manage/NovelManage.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/manage/wnss.bat" beforeDir="false" afterPath="$PROJECT_DIR$/manage/wnss.bat" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -36,33 +37,33 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;Python.CompareViews.executor&quot;: &quot;Run&quot;, "Python.CompareViews.executor": "Run",
&quot;Python.CompareWindow.executor&quot;: &quot;Run&quot;, "Python.CompareWindow.executor": "Run",
&quot;Python.ContentView.executor&quot;: &quot;Debug&quot;, "Python.ContentView.executor": "Run",
&quot;Python.DAGGraph (1).executor&quot;: &quot;Run&quot;, "Python.DAGGraph (1).executor": "Run",
&quot;Python.DAGGraph.executor&quot;: &quot;Run&quot;, "Python.DAGGraph.executor": "Run",
&quot;Python.DAGLayout (1).executor&quot;: &quot;Run&quot;, "Python.DAGLayout (1).executor": "Run",
&quot;Python.DAGLayout.executor&quot;: &quot;Run&quot;, "Python.DAGLayout.executor": "Run",
&quot;Python.DAGPresent.executor&quot;: &quot;Run&quot;, "Python.DAGPresent.executor": "Run",
&quot;Python.MergeView.executor&quot;: &quot;Run&quot;, "Python.MergeView.executor": "Run",
&quot;Python.MileStone.executor&quot;: &quot;Run&quot;, "Python.MileStone.executor": "Run",
&quot;Python.NovelManage.executor&quot;: &quot;Debug&quot;, "Python.NovelManage.executor": "Debug",
&quot;Python.ReferView.executor&quot;: &quot;Run&quot;, "Python.ReferView.executor": "Run",
&quot;Python.StoryMap.executor&quot;: &quot;Run&quot;, "Python.StoryMap.executor": "Run",
&quot;Python.UDGLayout.executor&quot;: &quot;Run&quot;, "Python.UDGLayout.executor": "Run",
&quot;Python.UDGPresent.executor&quot;: &quot;Run&quot;, "Python.UDGPresent.executor": "Run",
&quot;Python.ast_load.executor&quot;: &quot;Debug&quot;, "Python.ast_load.executor": "Debug",
&quot;Python.entry.executor&quot;: &quot;Run&quot;, "Python.entry.executor": "Run",
&quot;Python.test.executor&quot;: &quot;Run&quot;, "Python.test.executor": "Run",
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;, "RunOnceActivity.OpenProjectViewOnStart": "true",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;git-widget-placeholder&quot;: &quot;master&quot;, "git-widget-placeholder": "master",
&quot;last_opened_file_path&quot;: &quot;D:/Projects/Python/StoryTools&quot;, "last_opened_file_path": "D:/Projects/Python/StoryTools",
&quot;settings.editor.selected.configurable&quot;: &quot;debugger.dataViews&quot; "settings.editor.selected.configurable": "debugger.dataViews"
} }
}</component> }]]></component>
<component name="PyDebuggerOptionsProvider"> <component name="PyDebuggerOptionsProvider">
<option name="mySaveCallSignatures" value="true" /> <option name="mySaveCallSignatures" value="true" />
<option name="mySupportGeventDebugging" value="true" /> <option name="mySupportGeventDebugging" value="true" />
@ -181,19 +182,19 @@
<method v="2" /> <method v="2" />
</configuration> </configuration>
<list> <list>
<item itemvalue="Python.UDGPresent" />
<item itemvalue="Python.test" />
<item itemvalue="Python.UDGLayout" />
<item itemvalue="Python.ContentView" /> <item itemvalue="Python.ContentView" />
<item itemvalue="Python.DAGPresent" /> <item itemvalue="Python.DAGPresent" />
<item itemvalue="Python.UDGLayout" />
<item itemvalue="Python.UDGPresent" />
<item itemvalue="Python.test" />
</list> </list>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Python.ContentView" /> <item itemvalue="Python.ContentView" />
<item itemvalue="Python.DAGPresent" />
<item itemvalue="Python.UDGPresent" /> <item itemvalue="Python.UDGPresent" />
<item itemvalue="Python.test" /> <item itemvalue="Python.test" />
<item itemvalue="Python.UDGLayout" /> <item itemvalue="Python.UDGLayout" />
<item itemvalue="Python.DAGPresent" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>

View File

@ -4,7 +4,7 @@ from typing import Dict, List
from PyQt5.QtCore import QPoint, Qt from PyQt5.QtCore import QPoint, Qt
from PyQt5.QtGui import QTransform from PyQt5.QtGui import QTransform
from PyQt5.QtWidgets import QApplication, QWidget, QGridLayout, QSlider, QDoubleSpinBox from PyQt5.QtWidgets import QApplication, QWidget, QGridLayout, QSlider, QDoubleSpinBox
from PyQt5.QtWidgets import QMenu, QHBoxLayout from PyQt5.QtWidgets import QMenu, QHBoxLayout, QVBoxLayout
sys.path.append(os.path.dirname(os.path.dirname(__file__))) sys.path.append(os.path.dirname(os.path.dirname(__file__)))
from graph.DataType import Arrow, Point, Line from graph.DataType import Arrow, Point, Line
@ -176,13 +176,14 @@ class ArticleRefsView(QWidget):
if __name__ == "__main__": if __name__ == "__main__":
app = QApplication(sys.argv) app = QApplication(sys.argv)
#view = StorylinesView(None) view1 = StorylinesView(None)
view = ArticleRefsView(None) view2 = ArticleRefsView(None)
view.show() view1.show()
view2.show()
tool = XAST_ParseTool(global_ast_path) tool = XAST_ParseTool(global_ast_path)
# view.present_stories_graph(tool.get_story_graph()) view1.present_stories_graph(tool.get_story_graph())
view.present_volumes_graph(tool.get_article_nodes()) view2.present_volumes_graph(tool.get_article_nodes())
# view.fragment_view.highlight_graph_link(["血脉的源头", "血脉的源头&待续"]) # view.fragment_view.highlight_graph_link(["血脉的源头", "血脉的源头&待续"])

Binary file not shown.

View File

@ -249,7 +249,6 @@ class UDGPresent(QGraphicsView):
if item is not None and item.node_type() == PresentNodeType.PresentNode: if item is not None and item.node_type() == PresentNodeType.PresentNode:
vnode: PresentNode = item vnode: PresentNode = item
self.node_clicked.emit(vnode.node_name) self.node_clicked.emit(vnode.node_name)
print(vnode.node_name)
pass pass
pass pass
pass pass

View File

@ -9,6 +9,7 @@ from parse.StoryMap import XAST_ParseTool, storyline_list2map
from parse.StorylineCmp import CmpTool from parse.StorylineCmp import CmpTool
from manage.MileStone import base_store_path, current_store_path from manage.MileStone import base_store_path, current_store_path
from frame.CompareViews import CompareWindow from frame.CompareViews import CompareWindow
from frame.ContentView import StorylinesView, ArticleRefsView
def git_save(target_dir: str): def git_save(target_dir: str):
@ -61,4 +62,22 @@ if __name__ == "__main__":
all_changed = cmp_tool.graph_compare(map_new, map_old) all_changed = cmp_tool.graph_compare(map_new, map_old)
present_view = CompareWindow(map_new, all_changed, None) present_view = CompareWindow(map_new, all_changed, None)
present_view.show() present_view.show()
app.exec() pass
elif cmd_line == "wnss:-prsn":
git_save(os.getcwd())
nsc_compile(os.getcwd())
stool = XAST_ParseTool(current_store_path)
graph_curr = stool.get_story_graph()
story_lines_view = StorylinesView(None)
story_lines_view.show()
story_lines_view.present_stories_graph(graph_curr)
frags_curr = stool.get_article_nodes()
frags_refs_view = ArticleRefsView(None)
frags_refs_view.show()
frags_refs_view.present_volumes_graph(frags_curr)
pass
app.exec()

View File

@ -1,7 +1,5 @@
@echo off @echo off
for %%i in (%0) do ( set FolderPath=%~dp0
set "FolderPath=%%~dpi"
)
set "ScriptName=NovelManage.py" set "ScriptName=NovelManage.py"
set ScriptPath=%FolderPath%%ScriptName% set ScriptPath=%FolderPath%%ScriptName%
@ -10,6 +8,9 @@ set args_opt=wnss%1
if %args_opt% == wnss-cmp ( if %args_opt% == wnss-cmp (
python %ScriptPath% wnss -cmp python %ScriptPath% wnss -cmp
) else if %args_opt% == wnss-prsn (
python %ScriptPath% wnss -prsn
) else ( ) else (
echo 对比基线: wnss -cmp echo 对比基线: wnss -cmp
) echo 显示内容: wnss -prsn
)