新增贴图包
@ -0,0 +1,53 @@
|
|||||||
|
import os
|
||||||
|
remotepath = 'https://valinecdn.bili33.top/'
|
||||||
|
prefix= input("请输入前缀:")
|
||||||
|
FilePath="."
|
||||||
|
def findAllFile(base):
|
||||||
|
for root, ds, fs in os.walk(base):
|
||||||
|
for f in fs:
|
||||||
|
if f!='Generate.py':
|
||||||
|
yield f
|
||||||
|
|
||||||
|
def walkFile(FilePath):
|
||||||
|
print("正在生成MiniValine所需的index.json文件")
|
||||||
|
S='''{"0":['''
|
||||||
|
for root, dirs, files in os.walk(FilePath):
|
||||||
|
for f in files:
|
||||||
|
if f!='Generate.py':
|
||||||
|
Path=os.path.join(root, f)
|
||||||
|
S+='"'+f+'",'
|
||||||
|
S+="]}"
|
||||||
|
S=S.replace(",]}", "]}")
|
||||||
|
print("正在写入文件,这通常不会太久...")
|
||||||
|
with open("./index.json","wb") as ff:
|
||||||
|
ff.write(S.encode("utf-8"))
|
||||||
|
print("恭喜,已成功完成")
|
||||||
|
|
||||||
|
def main():
|
||||||
|
base = './'
|
||||||
|
linklist=[]
|
||||||
|
num=1
|
||||||
|
print('# {}'.format(prefix))
|
||||||
|
print('MiniValine:')
|
||||||
|
print('> https://valinecdn.bili33.top/{}'.format(prefix))
|
||||||
|
print('```json')
|
||||||
|
print('{')
|
||||||
|
for i in findAllFile(base):
|
||||||
|
if i!='Generate.py':
|
||||||
|
print('\"{}{}\": \"{}/{}\",'.format(prefix,num,prefix,i))
|
||||||
|
num=num+1
|
||||||
|
print('}')
|
||||||
|
print('```')
|
||||||
|
num=1
|
||||||
|
for i in findAllFile(base):
|
||||||
|
if i!='Generate.py':
|
||||||
|
print('![{}{}]({}{}/{})'.format(prefix,num,remotepath,prefix,i))
|
||||||
|
num=num+1
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
print("请坐和放宽,我们正帮你搞定一切......")
|
||||||
|
try:
|
||||||
|
walkFile(FilePath)
|
||||||
|
except Exception as e:
|
||||||
|
print("生成失败!我们都有不顺利的时候.")
|
||||||
|
print(e)
|
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 238 KiB |
After Width: | Height: | Size: 228 KiB |
After Width: | Height: | Size: 201 KiB |
After Width: | Height: | Size: 204 KiB |
After Width: | Height: | Size: 234 KiB |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 217 KiB |
After Width: | Height: | Size: 277 KiB |
After Width: | Height: | Size: 187 KiB |
After Width: | Height: | Size: 178 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 247 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 174 KiB |
After Width: | Height: | Size: 230 KiB |
After Width: | Height: | Size: 225 KiB |
After Width: | Height: | Size: 159 KiB |
After Width: | Height: | Size: 276 KiB |
After Width: | Height: | Size: 211 KiB |
After Width: | Height: | Size: 200 KiB |
After Width: | Height: | Size: 278 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 210 KiB |
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"0": [
|
||||||
|
"file_4147888.png",
|
||||||
|
"file_4147889.png",
|
||||||
|
"file_4147890.png",
|
||||||
|
"file_4147891.png",
|
||||||
|
"file_4147892.png",
|
||||||
|
"file_4147893.png",
|
||||||
|
"file_4147894.png",
|
||||||
|
"file_4147895.png",
|
||||||
|
"file_4147896.png",
|
||||||
|
"file_4147897.png",
|
||||||
|
"file_4147898.png",
|
||||||
|
"file_4147899.png",
|
||||||
|
"file_4147900.png",
|
||||||
|
"file_4147901.png",
|
||||||
|
"file_4147902.png",
|
||||||
|
"file_4147903.png",
|
||||||
|
"file_4147904.png",
|
||||||
|
"file_4147905.png",
|
||||||
|
"file_4147906.png",
|
||||||
|
"file_4147907.png",
|
||||||
|
"file_4147908.png",
|
||||||
|
"file_4147909.png",
|
||||||
|
"file_4147910.png",
|
||||||
|
"file_4147911.png",
|
||||||
|
"file_4147912.png"
|
||||||
|
]
|
||||||
|
}
|