#1 2008-08-11 23:39

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Insert Rule, Delete Rule and PascalScript

I've been testing ReNamer for a several hours, and I've found 3 bugs:


1)    In rule Insert, when is used option: position 1, right-to-left, it won't skip extension.
Also position 1 isn't interpreted like in Delete rule in same occasion (right-to-left).

Example:

Statement:    Insert " 2008" at Position 1 (right-to-left)


Tomcraft - Loneliness (Live @ Love Parade 2003).avi ---> Tomcraft - Loneliness (Live @ Love Parade 2003).av 2008i


2)    In rule Delete, when is used option right-to-left, delimiter options doesn't work in some occasions.

Example:

From: position: 1      Until: delimiter: Loneliness
[x]  right-to-left, [x] do not remove delimiter


Tomcraft - Loneliness (Live @ Love Parade 2003).avi remains unchanged

It should be: Tomcraft - Loneliness.avi


and this one...



From: delimiter: )      Until: delimiter: Loneliness
[x]  right-to-left [x] do not remove delimiter


Tomcraft - Loneliness (Live @ Love Parade 2003).avi remains unchanged also.


I will suggest also to add "do not remove delimiter" individually to avoid this situation:



From: delimiter: Loneliness      Until: delimiter: )
[x] do not remove delimiter


Tomcraft - Loneliness (Live @ Love Parade 2003).avi ---> Tomcraft - Loneliness).avi

I cannot determine which delimiter I don't want to remove.


3)    Pascal script error message pops up when is added with an empty code. Maybe this is intended behaviour hmm?


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#2 2008-08-12 14:13

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: Insert Rule, Delete Rule and PascalScript

That of the delimiters happend to me other day, but I didn't posted it as a bug because I changed somethings to try, and at the end it worked. neutral

Last edited by SafetyCar (2008-08-12 14:15)


If this software has helped you, consider getting your pro version. :)

Offline

#3 2008-08-12 14:34

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Insert Rule, Delete Rule and PascalScript

eR@SeR wrote:

...delimiter options doesn't work in some occasions.

SafetyCar wrote:

...and at the end it worked.

I know that, here is example:

Example:

From: position: 1      Until: delimiter: ss
[x]  right-to-left, [x] do not remove delimiter


Tomcraft - Loneliness (Live @ Love Parade 2003).avi ---> Tomcraft - Loneliness.avi

In this situation right-to-left works, but in previous one doesn't (instead ss stands Loneliness).

But if you add one more letter e, to ss (ess) then it doesn't work hmm


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#4 2008-08-17 18:37

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,376

Re: Insert Rule, Delete Rule and PascalScript

1) In rule Insert, when is used option: position 1, right-to-left, it won't skip extension.
"Skip extension" option is associated ONLY with "suffix" option, while "right-to-left" is ONLY with "position". At that is why you also don't see the "skip extension" option in the final statement of the rule when "position" is used.

2) In rule Delete, when is used option right-to-left, delimiter options doesn't work in some occasions.
This one is a logical problem/bug rather then functional. When "right-to-left" option is used the filename gets reversed, but the delimiter wasn't. So in order to make your case work you would need to reverse the delimiter character-wise when you are using "right-to-left" option. Anyway, I have changed that behaviour and now your example will work as expected. Thanks for reporting smile

3) Pascal script error message pops up when is added with an empty code. Maybe this is intended behaviour?
Yes, this is correct behaviour. PascalScript requires the code to contain at least "begin end.". And it wouldn't make any sense adding empty PascalScript rule, so I am not considering to change this behaviour.

Offline

#5 2008-08-18 17:23

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Insert Rule, Delete Rule and PascalScript

"Skip extension" option is associated ONLY with "suffix" option, while "right-to-left" is ONLY with "position". At that is why you also don't see the "skip extension" option in the final statement of the rule when "position" is used.

I know that fact before your explanation and it's obvious of course tongue
I see more natural to interpret position with "skip extension" because you'll mess up your filename and you get nothing sad (look example under 1)). Then I don't see a point of "right-to-left" option if you "touch" extensions sad

No need to redesign anything in there (or maybe must), just when it's ticked "skip extension" (after suffix radio button) it would be great to apply it on position too and to change the statement of course smile Next thing...

eR@SeR wrote:

Also position 1 isn't interpreted like in Delete rule in same occasion (right-to-left).

You can see on the shown example in first post or this simpler one:

Statement:    Insert "1" at Position 1                                Statement:    Insert "1" at Position 1 (right-to-left)

Tomcraft ---> 1Tomcraft                                             Tomcraft ---> Tomcraf1t

As you can see from second example (Position 1 (right-to-left)) result is Tomcraf1t. It should be Tomcraft1 like in first one example just reversed. Right?



This one is a logical problem/bug rather then functional. When "right-to-left" option is used the filename gets reversed, but the delimiter wasn't. So in order to make your case work you would need to reverse the delimiter character-wise when you are using "right-to-left" option. Anyway, I have changed that behaviour and now your example will work as expected. Thanks for reporting smile

Works fine now and no welcome wink... Just I hope that you'll reconsider this one little thing smile

eR@SeR wrote:

I will suggest also to add "do not remove delimiter" individually to avoid this situation:



From: delimiter: Loneliness      Until: delimiter: )
[x] do not remove delimiter


Tomcraft - Loneliness (Live @ Love Parade 2003).avi ---> Tomcraft - Loneliness).avi

I cannot determine which delimiter I don't want to remove.

...in this case both delimiters are here and maybe I wanted to remove this one ) but I couldn't smile



Yes, this is correct behaviour. PascalScript requires the code to contain at least "begin end.". And it wouldn't make any sense adding empty PascalScript rule, so I am not considering to change this behaviour.

Like I presumed tongue
Yes, that I figured out when I saw in error message "Error: Unexpected end of file"
Yes, silly me :S
Sorry for reporting this anyway roll

Last edited by eR@SeR (2008-08-18 17:30)


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#6 2008-08-19 13:44

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,376

Re: Insert Rule, Delete Rule and PascalScript

Statement:    Insert "1" at Position 1 (right-to-left)
Result:          Tomcraft ---> Tomcraf1t

Fixed.

...in this case both delimiters are here and maybe I wanted to remove this one ) but I couldn't

I don't want to over-complicate these generalized rules with too many options. You can do so using PascalScript wink

just when it's ticked "skip extension" (after suffix radio button) it would be great to apply it on position too

This is easy to do, but this will render previously saved presets invalid, where option suffix is used with skip extension. So I don't think I should do this, at least not now.

Offline

#7 2008-08-19 15:21

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Insert Rule, Delete Rule and PascalScript

Fixed.

Nice work smile

I don't want to over-complicate these generalized rules with too many options.

Mine preposition would be...just move/rearrange "do not remove delimiter" below "From" delimiter and add it below "Until" delimiter and that's it big_smile I think that isn't too many options just arranging thing. I just give mine opinion/argument which you don't have to accept of course tongue You decide wink

You can do so using PascalScript

Well, for now it's not needed. I just wanted to inform you and maybe complete Delete rule with this one little thing tongue

This is easy to do, but this will render previously saved presets invalid, where option suffix is used with skip extension. So I don't think I should do this, at least not now.

OK, look what you can do to change this in future somehow if you want of course roll... like I said

eR@SeR wrote:

Then I don't see a point of "right-to-left" option if you "touch" extensions sad

Last edited by eR@SeR (2008-08-19 15:22)


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#8 2010-01-23 17:24

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Insert Rule, Delete Rule and PascalScript

den4b wrote:

1) In rule Insert, when is used option: position 1, right-to-left, it won't skip extension.
"Skip extension" option is associated ONLY with "suffix" option, while "right-to-left" is ONLY with "position". At that is why you also don't see the "skip extension" option in the final statement of the rule when "position" is used.

After renaming file like "Sv.Vasilije Ostroski.jpg" to desired "Sv. Vasilije Ostroski.jpg" using:
1) Insert: Insert " " after "."       (After text: radio button)
I get "Sv. Vasilije Ostroski. jpg" messing file extension.
Will you change it at least for After text:?

den4b wrote:

This is easy to do, but this will render previously saved presets invalid, where option suffix is used with skip extension. So I don't think I should do this, at least not now.

roll


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#9 2010-01-23 20:25

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Insert Rule, Delete Rule and PascalScript

eR@SeR wrote:

Will you change it at least for After text:?

Would make sense to me.
For "before text" and for "after text".


Till then one may use this old trick "Use an other symbol as filename/extension delimiter"
as an work around, which belongs to the ReNamer module dogma:
1) Replace: Replace last "." with "#"
2) Insert: Insert " " after "."
3) Replace: Replace last "#" with "."


HTH? ;-) and don't prevent Denis to think about this improvement.


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#10 2010-01-25 13:00

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Insert Rule, Delete Rule and PascalScript

Would make sense to me.
For "before text" and for "after text".

Previous discussion was related to Position not "before text" tongue
Excellent solution would be if "Skip extension" affect "Suffix:", "Position:" (Right-to-left too) and "After text:"
Note: Text to describe where skip extension is used. (as in Remove, Replace rules...)

HTH?

Yes I know that, I could replace extension dot with any acceptable character (@,$...) but as you can see that are 3 rules. Why use 3 when you can use 1? wink

P.S. Sorry for late reply.


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

Board footer

Powered by FluxBB