Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions generate_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ def save_images(lines, init_time, dt=30):
image = generate_chat(messages = current_lines,
name = current_name,
time = f'{current_time.hour % 12}:{current_time.minute}',
profpic_file = f'profile_pictures/{profile_pic_dict[current_name]}')
image.save(f'chat\\{msg_number:03d}{current_name[0]}.png')
profpic_file = os.path.join('profile_pictures', profile_pic_dict[current_name]))
image.save(os.path.join('chat', f'{msg_number:03d}{current_name[0]}.png'))
# update time and msg_number for saving
current_time+=datetime.timedelta(0,dt)
msg_number+=1
Expand All @@ -106,4 +106,4 @@ def save_images(lines, init_time, dt=30):
with open(filename, encoding="utf8") as f:
lines = f.read().splitlines()
current_time = datetime.datetime.now()
save_images(lines, init_time=current_time)
save_images(lines, init_time=current_time)