[Req] Multy Rename Content plugin request

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Yes, as I wrote in readme - Very initial, very buggy
No prob, I thought you wanted to hear some bug reports anyway, no? ;)
I have now installed the silent update, haven't seen it before.
I wonder if any program can support an ini file with 2 keys in the same section with a same name
Oops, this doesn't work of course and is against INI standards, have not noticed that, sorry.

If you are planning to support more columns, what about a redesign like that?

Code: Select all

[column01] 
section01=Add One Leading Zero 
section02=Add Two Leading Zeros

[Add One Leading Zero] 
Find="(.+)\s(\d{2})$" 
Change="$1 0$2" 
Substitute=1 
Others=1 

[Add Two Leading Zeros] 
Find="(.+)\s(\d)$" 
Change="$1 00$2" 
Substitute=1 
Others=1
Furthermore I suggest that you rename the wdx file to regexp.wdx, mrc doesn't sound very intuitive.
I think a new combined regexp shoulld be written for adding leading zeros or a separate plugin which would be devoted only to this problem alone.
I don't know what you mean with "combined regexp", sorry. Why is another plugin needed?

Icfu
This account is for sale
User avatar
Lev
Junior Member
Junior Member
Posts: 82
Joined: 2004-12-14, 13:08 UTC

Post by *Lev »

I have now installed the silent update, haven't seen it before.
The replace function (Substitute=0) was working wrong in previous releases.
If you are planning to support more columns, what about a redesign like that?

Code: Select all

[column01] 
section01=Add One Leading Zero 
section02=Add Two Leading Zeros
I'll think about it, but i'm a programming newbee, so I cannot promise to realize it
I suggest that you rename the wdx file to regexp.wdx, mrc doesn't sound very intuitive.
I wanted to call a plugin "Multy rename content plugin", but since I cannot recreate all the functionality of the Multy Rename tool I changed the name, but I was too lazy to rename files and to change code. I'll, certainly, rename it in future versions.
I don't know what you mean with "combined regexp", sorry.
As I wrote - I'm not a regexp guru, I don't know wheather it is possible to manage to combine two regexp's in one more complicated regexp which I called a "combined regexp" :)

PS A bugfix version was uploaded.
I hope it'll not raise errors when the ini file is missing or when the find/change regexp is wrong. The plugin name was changed too :)
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I'll think about it, but i'm a programming newbee, so I cannot promise to realize it
Ah, ok. Maybe someone else with more experience can assist you or you release the source. Anyway, thanks for the idea. :)
As I wrote - I'm not a regexp guru, I don't know wheather it is possible to manage to combine two regexp's in one more complicated regexp which I called a "combined regexp"
I'll have to think about that... ;)

Thanks for the bugfix, I'll check it out later.

Icfu
This account is for sale
User avatar
Lev
Junior Member
Junior Member
Posts: 82
Joined: 2004-12-14, 13:08 UTC

Post by *Lev »

I managed to combine several regexp's, but for a defenite file extension - I've created two copies of a plugin, as described on a plugin page, created Rules for each plugin (the example is for file1-file10-file100)

Code: Select all

[0]
Find="(\D)(\d{2}\.)"
Change="$1\0$2"
Others=0

[00]
Find="(\D)(\d\.)"
Change="$1\00$2"
Others=0

[3d]
Find="(\D\d{3}\.)"
Change="$1"
Others=0
and combined them usind super_wdx plugin (you cannot combine them in a content plugin configuration field because they wil not be sorted right). I had to define an extension for sorted files in super_wdx :(
Looks odd? :)
Thanks for the bugfix, I'll check it out later.
I hope it would be a stable version, try to make it fall :)
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

This plugin has some potential, but it is very annoying having to restart tc every time i need to change my regular expression.

I don't know if there is another way of notifying the plugin.

Maybe you could make an FS plugin for the same purpose. Of course, you will loose some features with the FS approach.
______________________
David Jorge
Personal License #117854
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

You may try a button with 'cm_unloadPlugins'.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

I have already unload it.... 8)

BTW. i was just giving my opinion. If you are unconfortable with it, that's too bad!
______________________
David Jorge
Personal License #117854
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Guess it was a kind of misunderstanding. You wrote
djorge wrote:This plugin has some potential, but it is very annoying having to restart tc every time i need to change my regular expression.
So I proposed you could use a button with 'cm_unloadplugins' instead of restarting TC. I do not use this plugin so I don't know if 'cm_unloadPlugins' works in this case. But you may give it a try.
djorge wrote:BTW. i was just giving my opinion. If you are unconfortable with it, that's too bad!
Not at all. I just tried to help.

best regards

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

cm_unloadPlugins works as usual, there's no need to restart TC so I also don't understand djorge's comment. ;)

Icfu
This account is for sale
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

:oops: Yes it was a misunderstanding. My fault!! :cry:

when he wrote the comment regardin the cm_unloadplugins,i thought that he was criticizing me for saying that it was annoying restarting the plugin.
I proposed you could use a button with 'cm_unloadplugins' instead of restarting TC.
Nice tip.

Forgive me please :roll:
______________________
David Jorge
Personal License #117854
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

djorge wrote::oops: Yes it was a misunderstanding. My fault!! :cry:

Forgive me please :roll:
Never mind.

I know you for some time here in the forum and was sure you did not get my intention right.

BTW there has nothing been in your post to apologize for.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Lev
Junior Member
Junior Member
Posts: 82
Joined: 2004-12-14, 13:08 UTC

Post by *Lev »

it is very annoying having to restart tc every time i need to change my regular expression
try this version - http://wincmd.ru/files/regexp_wdx_0.1e.rar - In this version you don't need to restart TC, but some times you have to refresh current folder manually via changing dir or scrolling it up/down, 'Reread directory' does not work for me. The same behaviour I meet with a previous version of a plugin and the 'cm_unloadplugins' button :(
Note that "Section" key was renamed to "Rule"
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

In this version you don't need to restart TC, but some times you have to refresh current folder manually via changing dir or scrolling it up/down, 'Reread directory' does not work for me
Much better now!
______________________
David Jorge
Personal License #117854
rolandd
Senior Member
Senior Member
Posts: 313
Joined: 2003-06-26, 09:02 UTC
Location: Indonesia
Contact:

Post by *rolandd »

Played around with this new plugin and wondered if I am missing something. When I choose the regex option, the only option I have is Result. I have noticed I can change the output of result by manually changing the ini file entry Rule=. As this is quite burdensome I wondered if there is a way to get a choice of which regexp in the ini file I want to use?

I tried to add extra lines with Rule= but that had no effect :(

Thanks :P
Registered user #92105
kulmegil
Junior Member
Junior Member
Posts: 17
Joined: 2006-05-27, 10:36 UTC

Post by *kulmegil »

I would like to get back to this topic.
(IMHO)

The most desireble thing for me (growing over last months) are unicode support in this plugin. I know that I will have to wait for full Unicode support probably till TC 8 (sux!), and current TC_API doesn't support it. But it's also very likely that this can be achieved using some hacks and workarounds. Still being not to easy, I think it'll be worth a lot in case of this (very useful to me at least) plugin.

Multiple columns would be nice but not priority now as unicode since that can be achieved using multiple plugin copies.
Post Reply