BRU 3.4.2.0 Case (4) Change of Expected Operation

Post any Bulk Rename Utility support requirements here. Open to all registered users.

BRU 3.4.2.0 Case (4) Change of Expected Operation

Postby BogStandard » Sun Feb 07, 2021 11:41 pm

In 3.4.2.0 the action of Case (4) has changed with respect to 3.4.1.0 in that it removes double spaces when Title is chosen, but not when the other options (Same, Lower, Upper) are chosen.

Is this intentional because Remove (5) has D/S to remove double spaces.
BogStandard
 
Posts: 17
Joined: Sun Feb 07, 2021 11:25 pm

Re: BRU 3.4.2.0 Case (4) Change of Expected Operation

Postby Admin » Mon Feb 08, 2021 12:04 am

Hi, yes, it is part of the new Title casing algorithm.
Admin
Site Admin
 
Posts: 2059
Joined: Tue Mar 08, 2005 8:39 pm

Re: BRU 3.4.2.0 Case (4) Change of Expected Operation

Postby BogStandard » Mon Feb 08, 2021 12:57 am

Thanks for the prompt reply.

The next software action, Remove (5) has D/S to remove double spaces to deal with that requirement.

So can it be reverted?

My Use Case (I shall include my settings for the applicable options):
Regex (1) adds a space where a one digit number needs to be shifted right to position it correctly where there are otherwise two digit numbers.
(Match: (.*)( Vol| Pt| Bk)( )([0-9][\-a-zA-Z])(.*)
Replace: \1\2\3\3\4\5)
Case (4) deals wih words that shoud be Title Case plus my Excep.
<rnup>: about : above : across : ad : against : along : among : an : are : around : at : before : behind : below : beneath : beside : between : beyond : d': de : der : des : down : du : during : ed : et : etc : except : from : inside : into : it : its : l': la : le : les : like : near : off : out : since : sjs: sur : that : their : this : through : toward : under : until : up : upon : von : which : with : within : BC :BBC :BMW :BP : EEA : EFTA : EU : HMS :HP :IPCC: MS : MSS : PRO : UK : USA :x32:x64:CB:cbv:ChessOK:CPT:CQL:epd: FEN :nps:pgn:TWIC:UCI :CPI :CPIH :RPI :RPIJ :html:

But Regex (1) is undone by removing double spaces inside the Case (4) Title option which duplicates the Remove (5) option which, of course, I do not have set.

I have tried including double space in my Case (4) Excep. but that doesn't suppress it removing double spaces.

Thanks for considering the issue.

Of course I should say that this is an amazing peice of software and thankyou for providing it.
BogStandard
 
Posts: 17
Joined: Sun Feb 07, 2021 11:25 pm

Re: BRU 3.4.2.0 Case (4) Change of Expected Operation

Postby Luuk » Mon Feb 08, 2021 9:36 am

Greetings BogStandard, Im thinking the Case(4) "Title" must always be "New York Times Title Case rules" because not finding it inside the .ini file?? Maybe in future, the Case(4) grants more rules, but Im thinking its a lot more programming. If its me, Im using... \1\2\30\4\5 to invent " 0" before the lonely number.

But if to prefer two spaces before the lonely number, this the only way Im yet inventing...
(.*)( Vol| Pt| Bk) ([0-9][-a-zA-Z].*)
\1\2 | \3

This so that Case(4) admits the " | ", so then using Remove(5) to destroy the "|" using "Chars".
Luuk
 
Posts: 325
Joined: Fri Feb 21, 2020 10:58 pm

Re: BRU 3.4.2.0 Case (4) Change of Expected Operation

Postby BogStandard » Mon Feb 08, 2021 1:21 pm

Hi Luuk.

I had a solution whereby I did two passes; the first with Case (4) Active then with Case (4) Inactive which lets in the extra space. But it was inelegant given the power of BRU.

I didn't want to introduce a leading zero as the script is for .pdf book and dcocument titles and Vol 09 does not look as good as Vol 9 where it is in the original title.

I like your solution and choice of "|" (which is an invalid character in filenames) that is deleted by Remove (5).

Thanks, it is now incorporated and means I can use BRU 3.4.2.0.
BogStandard
 
Posts: 17
Joined: Sun Feb 07, 2021 11:25 pm

Re: BRU 3.4.2.0 Case (4) Change of Expected Operation

Postby BogStandard » Mon Feb 08, 2021 1:26 pm

BogStandard wrote:Hi Luuk.

I had a solution whereby I did two passes; the first with Case (4) Active then with Case (4) Inactive which lets in the extra space. But it was inelegant given the power of BRU.

I didn't want to introduce a leading zero as the script is for .pdf book and dcocument titles and Vol 09 does not look as good as Vol 9 where it is in the original title.

I like your solution and choice of "|" (which is an invalid character in filenames) that is deleted by Remove (5).

Thanks, it is now incorporated and means I can use BRU 3.4.2.0.


After submitting this reply I noticed double spaces are stripped!
So Vol<space><space>9 was changed to Vol<space>9 above.
BogStandard
 
Posts: 17
Joined: Sun Feb 07, 2021 11:25 pm

Re: BRU 3.4.2.0 Case (4) Change of Expected Operation

Postby BogStandard » Tue Feb 09, 2021 3:37 pm

An update. I failed to use both good and bad filenames when I tested my implementation of Luuk's suggestion.

I had to adjust the RegEx(1)Match to detect both a single AND double space.

So from RegEx(1)Match
(.*)( Vol| Pt| Bk)( )([0-9][ \-a-zA-Z])(.*)
to RegEx(1)Match
(.*)( Vol| Pt| Bk)( | )([0-9][ \-a-zA-Z])(.*)

with RegEx(1)Replace
\1\2\3|\3\4\5
or
\1\2 | \4\5

The reason is that my filenames already having the allowed double space failed the RegEx(1)Match so passed straight on to Case(4)Title and got changed to single space.
BogStandard
 
Posts: 17
Joined: Sun Feb 07, 2021 11:25 pm

Re: BRU 3.4.2.0 Case (4) Change of Expected Operation

Postby Luuk » Tue Feb 09, 2021 3:50 pm

Its unfortunate, but the double spaces seem to be illegal on many forums now, so your match is looking to everyone like "( | )".
Lol, Im already know that you were really typing "(Space|SpaceSpace)". Also you can type "( +)" to say "one or more spaces".
Nice work!
Luuk
 
Posts: 325
Joined: Fri Feb 21, 2020 10:58 pm

Re: BRU 3.4.2.0 Case (4) Change of Expected Operation

Postby Admin » Tue Mar 16, 2021 9:22 am

We have released the new version with this fix 8)
Admin
Site Admin
 
Posts: 2059
Joined: Tue Mar 08, 2005 8:39 pm


Return to BRU Support