initial commit
This commit is contained in:
commit
16137dce12
80 changed files with 1757 additions and 0 deletions
16
import_mess/resize_batch.py
Normal file
16
import_mess/resize_batch.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/python3
|
||||
import subprocess
|
||||
import glob
|
||||
|
||||
"""
|
||||
check recursively every directory
|
||||
for each image, create resize
|
||||
|
||||
"""
|
||||
for f in glob.iglob('../static/files/images/**/*.jpg', recursive=True):
|
||||
parent_dir = '/'.join(f.split('/')[:-1])
|
||||
print(parent_dir)
|
||||
subprocess.call(['convert', f, '-resize', '350x', parent_dir + '/' + 'thumb-250.jpg'])
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue