新增贴图包

main
hanasaki-misaki 2 years ago
parent 891e0061f3
commit 62abb794c8

@ -1,5 +1,5 @@
import os import os
remotepath = 'https://valinecdn.bili33.top/' remotepath = 'https://emoji.lolicon.team/'
prefix= input("请输入前缀:") prefix= input("请输入前缀:")
FilePath="." FilePath="."
def findAllFile(base): def findAllFile(base):
@ -14,7 +14,7 @@ def main():
num=1 num=1
print('# {}'.format(prefix)) print('# {}'.format(prefix))
print('MiniValine/Waline:') print('MiniValine/Waline:')
print('> https://valinecdn.bili33.top/{}'.format(prefix)) print('> https://emoji.lolicon.team/{}'.format(prefix))
print('```json') print('```json')
print('{') print('{')
for i in findAllFile(base): for i in findAllFile(base):

@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

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"
]
}

@ -13,7 +13,7 @@ def WalineGenerate():
print(files) print(files)
print('') print('')
removelist=['mini.py','Generate.py','Waline.py','index.json','info.json'] removelist=['mini.py','Generate.py','Waline.py','index.json','info.json']
currentdir = root.replace('G:\Code\ValineCDN','.') currentdir = root.replace('H:\Git_alicloud\Waline-emoji','.')
types = 'png' types = 'png'
print(currentdir) print(currentdir)
if currentdir != '.' and ('.git' in currentdir) != True: if currentdir != '.' and ('.git' in currentdir) != True:

Loading…
Cancel
Save