Peters Flexible RenAmiNg Kit (PFrank) Forum Index Peters Flexible RenAmiNg Kit (PFrank)
Support and Discussion Site for the PFrank File/Folder Renaming Tool (***NEW HOME PAGE*** "http://pfrank.atwebpages.com")
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Plugin "Flexible Date Formatter" does not work

 
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
Haags



Joined: 24 Aug 2011
Posts: 6

PostPosted: Sun Aug 28, 2011 8:05 pm    Post subject: Plugin "Flexible Date Formatter" does not work Reply with quote

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
View user's profile Send private message
Haags



Joined: 24 Aug 2011
Posts: 6

PostPosted: Sun Aug 28, 2011 8:39 pm    Post subject: The solution Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com