sync.xys 2.4 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>Local Path:&nbsp;&nbsp;</span><span>' . $InitialPath . '</span></div><div class="selection">Operation:&nbsp;&nbsp;<input id="operation_create"type=radio checked name="operation"value="create"><label for="operation_create">Create&nbsp;&nbsp;</label><input id="operation_push"type=radio name="operation"value="push"><label for="operation_push">Push&nbsp;&nbsp;</label><input id="operation_pull"type=radio name="operation"value="pull"><label for="operation_pull">Pull&nbsp;&nbsp;</label><input id="operation_clone"type=radio name="operation"value="clone"><label for="operation_clone">Clone&nbsp;&nbsp;</label><input id="operation_delete"type=radio name="operation"value="delete"><label for="operation_delete">Delete&nbsp;&nbsp;</label></div><div class="selection">Platform:&nbsp;&nbsp;<input id="platform_github"type=radio checked name="platform"value="github"><label for="platform_github">Github&nbsp;&nbsp;</label><input id="platform_gitlab"type=radio name="platform"value="gitlab"><label for="platform_gitlab">Gitlab&nbsp;&nbsp;</label><input id="platform_gitee"type=radio name="platform"value="gitee"><label for="platform_gitee">Gitee&nbsp;&nbsp;</label><input id="platform_gogs"type=radio name="platform"value="gogs"><label for="platform_gogs">git.yoq.me&nbsp;&nbsp;</label><input id="platform_coding"type=radio name="platform"value="coding"><label for="platform_coding">Coding&nbsp;&nbsp;</label></div><div><input class="submtbtn"type="submit"name="mysubmit"value="run it"></div></form></body><script></script></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