'save-at:1722225148.8869774'

This commit is contained in:
codeboss 2024-07-29 11:52:28 +08:00
parent a6222ab188
commit cc00240574
3 changed files with 50 additions and 0 deletions

21
manage/MileStone.py Normal file
View File

@ -0,0 +1,21 @@
import sys
import shutil as cmd
base_store_path = r"E:\baseline_core\milestone.xast"
current_store_path = r"E:\storyline.xast"
def milestone_new(f_from: str, f_to: str) -> str:
return cmd.copy2(f_from, f_to)
if __name__ == "__main__":
print(sys.argv)
if len(sys.argv) <= 1:
exit(0)
# milestone:new
if "".join(sys.argv[1:]) == "milestone:new":
milestone_new(current_store_path, base_store_path)
pass

29
manage/NovelManage.py Normal file
View File

@ -0,0 +1,29 @@
import sys, os
import subprocess as xsub
import time
def git_save(target_dir: str):
retls = xsub.run("git status", shell=True, capture_output=True)
print(retls.stdout)
outlist = str(retls.stdout).split(r'\n')
has_changed:bool = False
for o in outlist:
if o.startswith(r"\tmodified:"):
has_changed = True
break
elif o.startswith(r"\tnew file:"):
has_changed = True
break
if has_changed:
xsub.run("git add .", shell=True)
xsub.run(f"git commit -m 'save-at:{time.time()}'")
if __name__ == "__main__":
print(sys.argv)
cmd_line = ":".join(sys.argv[1:])
#wnss:-cmp
if cmd_line == "wnss:-cmp":
git_save(os.getcwd())

0
manage/__init__.py Normal file
View File