update
This commit is contained in:
parent
5314985b7b
commit
50e84af838
|
@ -7,8 +7,6 @@
|
||||||
<list default="true" id="f609c0f2-cd0d-4eea-87f1-8caf02d3f04f" name="Changes" comment="">
|
<list default="true" id="f609c0f2-cd0d-4eea-87f1-8caf02d3f04f" name="Changes" comment="">
|
||||||
<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$/manage/NovelManage.py" beforeDir="false" afterPath="$PROJECT_DIR$/manage/NovelManage.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/manage/NovelManage.py" beforeDir="false" afterPath="$PROJECT_DIR$/manage/NovelManage.py" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/parse/StoryMap.py" beforeDir="false" afterPath="$PROJECT_DIR$/parse/StoryMap.py" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/parse/StorylineCmp.py" beforeDir="false" afterPath="$PROJECT_DIR$/parse/StorylineCmp.py" 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" />
|
||||||
|
@ -41,7 +39,7 @@
|
||||||
"Python.CompareWindow.executor": "Run",
|
"Python.CompareWindow.executor": "Run",
|
||||||
"Python.MergeView.executor": "Run",
|
"Python.MergeView.executor": "Run",
|
||||||
"Python.MileStone.executor": "Run",
|
"Python.MileStone.executor": "Run",
|
||||||
"Python.NovelManage.executor": "Debug",
|
"Python.NovelManage.executor": "Run",
|
||||||
"Python.ReferView.executor": "Run",
|
"Python.ReferView.executor": "Run",
|
||||||
"Python.StoryMap.executor": "Run",
|
"Python.StoryMap.executor": "Run",
|
||||||
"Python.ast_load.executor": "Debug",
|
"Python.ast_load.executor": "Debug",
|
||||||
|
@ -198,15 +196,4 @@
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="XDebuggerManager">
|
|
||||||
<breakpoint-manager>
|
|
||||||
<breakpoints>
|
|
||||||
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
|
|
||||||
<url>file://$PROJECT_DIR$/manage/NovelManage.py</url>
|
|
||||||
<line>25</line>
|
|
||||||
<option name="timeStamp" value="13" />
|
|
||||||
</line-breakpoint>
|
|
||||||
</breakpoints>
|
|
||||||
</breakpoint-manager>
|
|
||||||
</component>
|
|
||||||
</project>
|
</project>
|
|
@ -6,7 +6,6 @@ from typing import List
|
||||||
|
|
||||||
def git_save(target_dir: str):
|
def git_save(target_dir: str):
|
||||||
retls = xsub.run("git status", shell=True, capture_output=True)
|
retls = xsub.run("git status", shell=True, capture_output=True)
|
||||||
print(retls.stdout)
|
|
||||||
outlist = str(retls.stdout).split(r'\n')
|
outlist = str(retls.stdout).split(r'\n')
|
||||||
has_changed:bool = False
|
has_changed:bool = False
|
||||||
|
|
||||||
|
@ -14,6 +13,7 @@ def git_save(target_dir: str):
|
||||||
for o in outlist:
|
for o in outlist:
|
||||||
modified_flag = r"\tmodified:"
|
modified_flag = r"\tmodified:"
|
||||||
new_flag = r"\tnew file:"
|
new_flag = r"\tnew file:"
|
||||||
|
delete_flag = r"\tdeleted:"
|
||||||
if o.startswith(modified_flag):
|
if o.startswith(modified_flag):
|
||||||
has_changed = True
|
has_changed = True
|
||||||
files_path.append(o[len(modified_flag):])
|
files_path.append(o[len(modified_flag):])
|
||||||
|
@ -22,14 +22,24 @@ def git_save(target_dir: str):
|
||||||
has_changed = True
|
has_changed = True
|
||||||
files_path.append(o[len(new_flag):])
|
files_path.append(o[len(new_flag):])
|
||||||
|
|
||||||
|
elif o.startswith(delete_flag):
|
||||||
|
has_changed = True
|
||||||
|
files_path.append(o[len(delete_flag):])
|
||||||
|
|
||||||
if has_changed:
|
if has_changed:
|
||||||
xsub.run(f"git add {" ".join(files_path)}", shell=True)
|
xsub.run(f"git add {" ".join(files_path)}", shell=True)
|
||||||
xsub.run(f"git commit -m 'save-at:{time.time()}'")
|
xsub.run(f"git commit -m 'save-at:{time.time()}'")
|
||||||
|
|
||||||
|
|
||||||
|
def nsc_compile(target_dir: str):
|
||||||
|
retls = xsub.run("nsc --path ./ --dest E:/", shell=True)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
print(sys.argv)
|
print(sys.argv)
|
||||||
cmd_line = ":".join(sys.argv[1:])
|
cmd_line = ":".join(sys.argv[1:])
|
||||||
|
|
||||||
#wnss:-cmp
|
#wnss:-cmp
|
||||||
if cmd_line == "wnss:-cmp":
|
if cmd_line == "wnss:-cmp":
|
||||||
git_save(os.getcwd())
|
git_save(os.getcwd())
|
||||||
|
nsc_compile(os.getcwd())
|
|
@ -0,0 +1,10 @@
|
||||||
|
@echo off
|
||||||
|
for %%i in (%0) do (
|
||||||
|
set "FolderPath=%%~dpi"
|
||||||
|
)
|
||||||
|
|
||||||
|
set "ScriptName=NovelManage.py"
|
||||||
|
set ScriptPath=%FolderPath%%ScriptName%
|
||||||
|
|
||||||
|
@echo on
|
||||||
|
python %ScriptPath% wnss -cmp
|
Loading…
Reference in New Issue