Skip to content

Instantly share code, notes, and snippets.

View kinsluck's full-sized avatar
🏉
Focusing

kins kinsluck

🏉
Focusing
View GitHub Profile
@kinsluck
kinsluck / AlltoGIF.py
Created April 25, 2018 03:00
A simple script to transfer all image format to GIF format.
import os
import glob
from PIL import Image
for infile in os.listdir('.'):
if infile in glob.glob('*.py'):
pass
else:
f, e = os.path.splitext(infile)
outfile = f + ".gif"
import os
dd = ['十', '一', '二', '三', '四', '五', '六', '七', '八', '九']
for item in os.listdir('.'):
fname = str(item)
# a=len(fname)
new = ''
for i in range(len(fname)):
if fname[i] in dd: