sync.xys 1.7 KB

12345678910111213141516
  1. $InitialPath = "<curpath>";
  2. $GETResult = urldecode(html('<html><style>body{text-align:center}.selection{text-align:left;margin-left:10%;margin-right:10%;padding-bottom:20px}.submtbtn{padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:10px}</style><body><div><h1>repo_sync tools v1.12</h1></div><form method="get"action="xys:"><div class="selection"><span>Repo:&nbsp;&nbsp;</span><span>' . $InitialPath . '</span></div><div class="selection">Operation:<input type=radio checked name="operation"value="create">Create&nbsp;&nbsp;<input type=radio name="operation"value="push">Push&nbsp;&nbsp;<input type=radio name="operation"value="pull">Pull&nbsp;&nbsp;<input type=radio name="operation"value="delete">Delete&nbsp;&nbsp;</div><div class="selection">Platform:<input type=radio checked name="platform"value="github">Github&nbsp;&nbsp;<input type=radio name="platform"value="gitlab">Gitlab&nbsp;&nbsp;<input type=radio name="platform"value="gitee">Gitee&nbsp;&nbsp;<input type=radio name="platform"value="gogs">git.yoq.me&nbsp;&nbsp;<input type=radio name="platform"value="coding">Coding&nbsp;&nbsp;</div><div><input class="submtbtn"type="submit"name="mysubmit"value="run it"></div></form></body></html>'));
  3. IF ("$GETResult"=="") {sub "_Cancel";}
  4. // substr $GETResult, $GETResult, 1;
  5. $operation1=gettoken($GETResult, "1", "&");
  6. $platform1=gettoken($GETResult, "2", "&");
  7. $ok=gettoken($a, "3", "&");
  8. $operation=gettoken($operation1,2,"=");
  9. $platform=gettoken($platform1,2,"=");
  10. run "cmd /k cd /d F:\dist\Develop\Python\crawl_github\dist && repo_sync $operation --platform $platform --repo_path <curpath>"
  11. "_Cancel"
  12. // msg "Cancled by user";
  13. sub "_EOF";
  14. "_EOF"
  15. END 1==1;
  16. //EOF