#21 2009-08-06 21:33

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

Re: New Swap or Rearrange rule

Let me tell my opinion but everything is already said...
First of all I'm glad that Denis made rule draft cause I have it on my mind but didn't have real image of it.

So here it is:

Stefan already realized some situations and asked good questions... Excellent job wink

den4b wrote:

So far, there are 3 suggestions:
* use "/" as a separator for multiple delimiters;
* assign groups to delimiters;
* don't bother and make them all learn RegEx! tongue

For now everything can be possible but I will eliminate 3rd one, cause we should create rule without using RegEx. The main goal is to create easy rule.

narayan wrote:

I would strongly suggest a LIVE preview of the NEW names within the rule window (may be placed at the bottom of the dialog).

Wouldn't be bad to have one...

narayan wrote:

The name of the rule can be "freeform" or something (it is much more than swap)

Adding metatags would definately change things. Then "Free Form" can fit to that rule name...

krtek wrote:

I would quit the idea of "keep delimiters" and let user insert them (and any other text) in new order:

Yes, "keep delimiters" is surplus.

narayan wrote:

I think there is no need to separate the delimiters at all. Just list them all!

Yes, it would be much simpler.

Stefan wrote:

What would be your separator? An Blank?
How will you use an blank as delimiter then?

Just hit space button as blank (separator) in delimiters box and that's it. No need for repeating...

Stefan wrote:

Like sometimes user want to add an space before uppercase letters like 
From:
ThisIsALongSentenceWithoutSpaces.txt
To:
This Is A Long Sentence Without Spaces.txt

Delimiter: {uc}
New Order: {part} {part}

I'm for it and for provided regex feature {uc} too (we have to use it in order to do desired job).

narayan wrote:

I use "delimiter" to mean the character at which ReNamer splits the original name.
The resultant tokens do NOT have this character.

(I do not favor "keep the delimiter" scheme because it is not required at all.)

Create the new name by arranging all tokens with spaces (or any other characters).
ReNamer would insert these extra characters literally.

As I though...have to repeat..."New order" box should be literally presented!

narayan wrote:

1. If multiple delimiters are used in the same name, they are all listed without  any separator. This would work just like the Strip Rule.

2. You cannot use a blank as delimiter. ReNamer has to use a character as delimiter.
Space can be used as a delimiter (is that what you meant by "blank"?)

Totally agree. I think we solved this issues and should go for next: How to design a rule window??? hmm

narayan wrote:

And as your long list shows, a lot of popular demand is going to be met with this ONE single rule.

One more reason to call it "Free Form" for example...

narayan wrote:

Can we have one more screenshot please, so that we can visualize the whole thing in integrated form?

That would be great with our help off course wink

Stefan,
Why you used backslashes in your examples? They are only needed if you want to add number(s) instead position... Look at Denis's pattern wink

Nice start by Stefan, even better finish by narayan smile


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

Offline

#22 2009-08-07 01:49

prologician
Member
Registered: 2009-01-30
Posts: 84

Re: New Swap or Rearrange rule

<Puts forth a few thoughts on the proposed ideas...>

"You can do this via a RegEx" - Well, sure you can. You can also do insert/remove via RegEx. You can do any RegEx using PascalScript, too. The elegance of Renamer is that there are bunches of ways to do things. That way, if you want to rename things one way, you can do it in the most obvious sense that you see. smile

"Preview in the Swap rule" - I'm gonna be the dissenting vote on this one. Although yes, I do see that having a preview would be nice... no other rule has a built-in preview (of particular note is RegEx, where sometimes you mistype something, and then need to go back and revise it). Not to mention, we already have an all-enveloping "Preview" button when you close the rule window. Just hit preview there... if you need to tweak, then edit the rule. I don't really see why a Swap rule should be an exception.

"Uppercase delimiting" - I have mixed feelings on this one. I mean, yes... we can introduce some character classes. My question here, is if we really want to make this rule to handle that much. At this moment, I'm feeling that incorporating classes might be going overboard (I mean, I ~was~ able to do one of the examples posted via regex...). I'm also wondering to what extent these classes should go, if they are included.... do we delimit on numbers? Non-letters? Whitespace in general (This might not be a bad option, actually, since it's harder to type in whitespace stuff into the box... and according to Wikipedia, one feasibly can have strange whitespace in a filename)?

(And now, to actually be constructive.... I don't wanna be negative ALL through this post. wink )

One thought that came to mind, is the possibility of needing to enter strange characters, not unlike a RegEx's \x## structure, as either for a delimiter or as the reordering pattern. Should there be some escape character to allow for this? Is there a real need to have it at all (and I'm just inventing a need)? I dunno, this might be something better left for a RegEx situation to address, and to actually keep it out of this rule.

Offline

#23 2009-08-07 08:49

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

Re: New Swap or Rearrange rule

> Stefan: Why you used backslashes in your examples?
> They are only needed if you want to add number(s) instead position...

Because i want to add literal numbers without any escape signs, that's why i use \ to indicate parts.
I find this more logically smile



>I think there is no need to separate the delimiters at all. Just list them all!

Then you can't use strings as separator (if Denis want to implement this)
Delimiter: / /The/feat./-/
(ok then we would need "case sensitive" and "whole word only" too,  maybe too much for this new rule)


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

#24 2009-08-07 08:58

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

Re: New Swap or Rearrange rule

My dreaming are going too far, sorry.
Perhaps this new Swap Rule should only do what it was thought off: SplitString(string, char) and RegExFind(string, amount)
Split an string and reorder the parts. That's it. Leaving all other options for the other rules.


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

#25 2009-08-07 15:30

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: New Swap or Rearrange rule

I like Stefan's idea about using literal numbers literally and \1, \2 etc for "tokens" created from the original name.

@need to use a string as delimiter:
In most cases, the delimiters would be a symbol (space, comma, hyphen, etc.)
In some cases it would be a character.
Use of a whole string as a "delimiter" would be very rare.
And even that can be achieved easily: Use any of the characters that are banned in normal filenames.

e.g. <StringAsDelimiter>

Simple. Easy to remember. Easy to type.

Similarly, the case symbols can be realized with escape characters.
e.g. \L for all lowercase, \U for uppercase, etc.
And refer to the "tokens" as \1, \2, etc.

So a \L\1 means first token in all lowercase.

Last edited by narayan (2009-08-07 15:34)

Offline

#26 2009-08-07 21:36

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

Re: New Swap or Rearrange rule

prologician wrote:

"Preview in the Swap rule" -...

It would be nice to have it in the rule, but if Denis thinks that it should be without it, that could go through.

prologician wrote:

"Uppercase delimiting" -...

As I said, this rule should be without RegEx but {uc} will be better solution than
([a-z])([A-Z]) --> $1 $2 since it can separate single lettered word, like in Stefan's example or maybe I wrong... hmm
I don't know which classes can go here except {uc}...?

Stefan wrote:

Because i want to add literal numbers without any escape signs, that's why i use \ to indicate parts.
I find this more logically

narayan wrote:

I like Stefan's idea about using literal numbers literally and \1, \2 etc for "tokens" created from the original name.

I don't know, I think that Denis's way is easier for novice users, and I'm for it. \ will be used for literal numbers.

Stefan wrote:

Then you can't use strings as separator (if Denis want to implement this)

Heh, guys, we have already excellent solution in Remove and Replace rule; *|* (Separate multiple items). How did we forget it big_smile What do you think? If only can be interpreted as single class that would be excellent i.e. to remove it, hit only once backspace/del, not 3 times). roll

narayan wrote:

In most cases, the delimiters would be a symbol (space, comma, hyphen, etc.)
In some cases it would be a character.
Use of a whole string as a "delimiter" would be very rare.
And even that can be achieved easily: Use any of the characters that are banned in normal filenames.

Ok, but what about Analyze sample text (Shift+A)? You can find all of them there too wink
I think that we solved that issue by using Separate multiple items I guess. Then every character or class can be entered in Delimiter box.

narayan wrote:

Similarly, the case symbols can be realized with escape characters.
e.g. \L for all lowercase, \U for uppercase, etc.
And refer to the "tokens" as \1, \2, etc.

Hm...I don't know. Should we use lower/uppercase in Swap (Free Form) rule after all??? There is no end of possible features yikes

P.S. Denis, don't forget to add this rule to localizable resource strings wink


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

Offline

#27 2009-08-08 02:56

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: New Swap or Rearrange rule

Nice summary, eR@SeR! Even without the screenshot Denis will get a clear idea in one place.

eR@SeR wrote:

what about Analyze sample text (Shift+A)? You can find all of them there too

Well, since the < and > characters cannot occur in the filenames, we cannot test such characters in the sample text also. Otherwise the results  would be different in this box and in actual renaming.

I have not tested the Analyze sample text rule for such illegal characters, but I expect it to follow the Windows rules and report errors.

BTW we can drop the case conversion if that gets too complicated. We can simply stack the CASE rule after this rule. In fact we should avoid duplication of functionality amongst different rules.

I have often needed the "insert space before capitalized letters" function. We do have a script for that, but its access is rather complicated. A direct access can be given in the CleanUp rule as a checkbox. (The "insert space before capitalized letters" function is very close to "replace these characters with space" option.)

Last edited by narayan (2009-08-08 03:51)

Offline

#28 2009-08-08 15:25

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

Re: New Swap or Rearrange rule

It is great to see such an active discussion! big_smile

I have read all the proposed ideas. They are all good and useful, but I think many of them have deviated off course a little. The important aspect or a "goal" of this new rule is to be very simple and intuitive, so novice users don't have to dig into the complex Regular Expressions or yet another syntax in order to do simple manipulations like swapping parts of the filename.

I have reworked the dummy GUI for this rule, here it is:
renamerswaprulev2.gif

I would like to propose following points:

  • Only 1 input for the delimiters, whether they are positions or actual delimiters;

  • Use "|" (pipe, vertical bar) as a separator for delimiters (possibly add a helper button to insert the pipe);

  • Use "$" (dollar sign) as a marker for back references in the new order ("\" can be used in the name to create folders);

  • New order to accept custom format, not just the ordered list;

  • No built-in preview;

Offline

#29 2009-08-08 15:47

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: New Swap or Rearrange rule

Well, I suppose that would serve the purpose, but the one we settled on was not so complicated at all. There are no regex patterns in it. It has some literal text added.

The alternative is to use the Insert Rule at multiple positions, which is very tedious.

What is "custom format"?

BTW it is better NOT to separate the delimiters in the upper input box. They can be simply listed next to each other, such as ,- _, (note the space in the middle). That's the simplest form.

A special note: The rule as envisaged by us can be used easily by beginners also. They will simply not use the advanced features, which themselves are simple enough (not even as complex as RegEx). In fact, I think even newbies can manage to add meta tags once they know which tag means what.

Can I persuade you at this stage with a simplified version of the screetshot? tongue

Last edited by narayan (2009-08-08 16:47)

Offline

#30 2009-08-08 22:41

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

Re: New Swap or Rearrange rule

I am not sure which one you are referring to when you say "one we settled on"... I thought I actually used the proposed syntax, but I might have missed something. Delimiters need a separator because delimiters can be whole strings, not just individual characters, like proposed before.

By "custom format" I meant that you can specify the whole new pattern, not just the order, for example: "$1 and $3 - $2". You can also insert Meta Tags in the pattern, that is "a given" for any rule because meta tags are replaced with their values after each processed rule during the preview process.

Oh, and I also changed the name to "Reorder", as it is more appropriate name since it does more than swapping.

Here is how it looks right now:
renamerswaprulev3.gif

I am coding it up right now. What do you guys think? Any final alterations?

P.S. narayan, check out the CleanUp rule in the latest dev version!

Offline

Board footer

Powered by FluxBB