View previous topic :: View next topic |
Author |
Message |
Haags
Joined: 24 Aug 2011 Posts: 6
|
Posted: Sun Aug 28, 2011 8:05 pm Post subject: Plugin "Flexible Date Formatter" does not work |
|
|
Hello,
i insertered the code for Date Formatter Plugin. Unluckily no change of date format.
Situation:
I have file names with this format:
"171207 name xyz"
To be:
"17.12.2007 name xyz" or better "2007.12.17 name”
My scan result list was empty. I have no idea, what to change in the settings, to make such re-format of existing date numbers in the file string happen.
My current setups:
1. plugin log looks fine:
Aug 28 2011 21:52:17 ***User Defined Command File (Plugin) Validation Summary
User Defined Command (Plugin) Loading Successful
'(User) - Add 1.1 to First Number'
'(User) - Create 10 Folders Before Scan'
'(User) - Insert Raw Image Date/Time before '
'(User) - Insert Matched Content before'
'(User) - Insert Matched Content after'
'(User) - Insert Video Aspect Ratio before'
'(User) - Insert Video Aspect Ratio after'
'Convert dates using date formatter in'
8 Plugins Loaded into 'Pre-Defined Command' Selection
2. Pre defined command:
I selected the *Convert dates using date formatter in*All* within Prefix
3. Options -> date formatter
Custom Format: %d.%m.%Y
3. Options -> General
Radiobutton Pyhthon Regex
4. Options -> rename scan
Field separator char: “….” No entry
=> No result after scan
What else I need to setup ?
Thanks,
Stefan |
|
Back to top |
|
 |
Haags
Joined: 24 Aug 2011 Posts: 6
|
Posted: Sun Aug 28, 2011 8:39 pm Post subject: The solution |
|
|
I only copied the code of class DateReFormatter, because this was mentioned in the readme section.
After i added the code starting with If __name... it worked !!!
UserRenamerList = [
DateReFormatter(), # format date as specified by PFrank Date Formatter Option
]
if __name__ != '__main__' :
standardDateFormat = configurator.optionlist[SEARCHREP_OPTIONDATEFORMAT_ID]
customDateFormat = configurator.optionlist[SEARCHREP_OPTIONCUSTOMDATE_ID]
useCustomDate = configurator.optionlist[SEARCHREP_CUSTOMORFIXEDDATE_ID] == "Custom Format" |
|
Back to top |
|
 |
|