mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:35:42 +00:00
* add some more headshots * more headshots * rename headshots and upload more * lots more
24 lines
792 B
Python
Executable File
24 lines
792 B
Python
Executable File
#!/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) |