Skip to content

Commit

Permalink
Update ceshgi.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Feller authored Mar 9, 2023
1 parent 5193d5b commit c81409b
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions ceshgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,27 @@ def batch_rename(file_dir, old_ext, new_ext):
os.path.join(file_dir, newfile))


if not os.listdir(pt):
print("为空!我切片!")
os.system('ls')
os.system('pwd')

def qiepian():
for dataname in datanames2:
if os.path.splitext(dataname)[1] == '.ISO': # 目录下包含.json的文件
print("找到iso文件!开切!")

print(datanames + "/" + dataname)
dizhi = datanames + "/" + dataname

anz=os.system('pip3 install filesplit')
val = os.system('henin -c dizhi -s 240000')
# val = os.system('henin -m zh-cn_dc141532.iso')
print (val)
else:
print("没找到iso文件")
print("没找到iso文件")



def shangchuang():


else:
print("不为空! 我上传!")
files= os.listdir(pt) #得到文件夹下的所有文件名称
s = []
url = URLKEY
Expand Down Expand Up @@ -97,7 +95,7 @@ def batch_rename(file_dir, old_ext, new_ext):
print("else-os.listdir(datanames)。。"+str(os.listdir(datanames)))
os.system('ls')
os.system('pwd')

m = MultipartEncoder(
fields={'name': file, 'puid': SCKEY,'_token': SCKEY2,
'file': (file, open(wenjiandizhi2, 'rb'))}
Expand Down Expand Up @@ -143,3 +141,13 @@ def batch_rename(file_dir, old_ext, new_ext):
f.write('\n')
f.write(toCntPercent)
print(toCntPercent)



if __name__ == '__main__':
if not os.listdir(pt):
print("为空!我切片!")
qiepian()
else:
print("不为空! 我上传!")
shangchuang()

0 comments on commit c81409b

Please sign in to comment.