2022-02-14 06:50:59 +00:00
|
|
|
|
#!/usr/bin/env python2
|
|
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
#coding: utf-8
|
|
|
|
|
|
|
|
|
|
import os, io, sys, platform, shutil, urllib3, time, json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def ReadLists(filename):
|
|
|
|
|
if os.path.getsize(filename) == 0:
|
|
|
|
|
print("\n清单中没有项目!")
|
|
|
|
|
sys.exit()
|
|
|
|
|
else:
|
|
|
|
|
with open("./"+filename,mode='r',newline='') as f:
|
|
|
|
|
templists=list(f)
|
|
|
|
|
rlist=[]
|
|
|
|
|
for templist in templists:
|
|
|
|
|
rlist.append(templist.replace('\n',''))
|
|
|
|
|
return rlist
|
|
|
|
|
|
|
|
|
|
mylists=ReadLists("add")
|
|
|
|
|
|
|
|
|
|
# 批量处理,创建项目文件夹,issue
|
|
|
|
|
for mylist in mylists:
|
|
|
|
|
print("处理 "+mylist+" ...\n")
|
2022-07-14 06:37:34 +00:00
|
|
|
|
os.system("cp -R roles/Template roles/" + mylist)
|
2022-02-14 07:51:25 +00:00
|
|
|
|
os.system("echo '' > add")
|
2022-02-14 06:50:59 +00:00
|
|
|
|
|
2022-07-14 06:35:10 +00:00
|
|
|
|
print("\n执行完成,并清空列表")
|