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
7 changes: 7 additions & 0 deletions elodie/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,13 @@ def get_file_name(self, metadata):

if('File' in config and 'capitalization' in config['File'] and config['File']['capitalization'] == 'upper'):
return name.upper()
elif('File' in config and 'capitalization' in config['File'] and config['File']['capitalization'] == 'title'):
# Mine is:
# date=%d-%H%M%S
# name=%date [%city] %original_name.%extension
# Since strings before "]" are quite stable, it ensures that they can be split properly by "]" no matter what the original name is.
# "]" is replaceable.
return name.split(']', maxsplit=1)[0].title() + ']' + name.split(']', maxsplit=1)[1]
else:
return name.lower()

Expand Down