mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:35:42 +00:00
More headshots (#2989)
* add some more headshots * more headshots * rename headshots and upload more * lots more
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import random
|
||||||
|
from datetime import date
|
||||||
|
|
||||||
|
base_directory = '/Users/dancrosby/Documents/headshots/no_profession/'
|
||||||
|
|
||||||
|
directories = [f'{base_directory}male/', f'{base_directory}female/']
|
||||||
|
|
||||||
|
counter = 1
|
||||||
|
|
||||||
|
date_str = date.today().strftime('%Y%m%d')
|
||||||
|
|
||||||
|
for directory in directories:
|
||||||
|
for filename in os.listdir(directory):
|
||||||
|
orig_path = os.path.join(directory, filename)
|
||||||
|
|
||||||
|
if os.path.isfile(orig_path) and filename.endswith('.png') and 'photorealistic_headshot' in filename:
|
||||||
|
new_filename = f'{date_str}_{counter}_{random.randint(0, 99999999999)}.png'
|
||||||
|
counter = counter + 1
|
||||||
|
new_path = os.path.join(directory, new_filename)
|
||||||
|
print(f'moving {orig_path} to {new_path}')
|
||||||
|
os.rename(orig_path, new_path)
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user