diff --git a/elodie/filesystem.py b/elodie/filesystem.py index 92d7807e..08ec3ff6 100644 --- a/elodie/filesystem.py +++ b/elodie/filesystem.py @@ -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()