Topic: Add Numbering %n, reset every n'th file: 1,2,3/1,2,3/1,2,3/...

Hi Rémi,

just thought about this. Perhaps that is something you want to add.


Add numbering %n, but reset counter every x files.
So I get counter, e.g.: 01, 02, 03 // 01, 02, 03 // 01, 02, 03 // ....


For example I have:
fileA.ext
fileB.ext
fileC.ext
fileD.ext
fileE.ext
fileF.ext
fileG.ext
...


I want 

%b_%n{2, , ,3}.%e:

fileA_01.ext
fileB_02.ext
fileC_03.ext

fileD_01.ext
fileE_02.ext
fileF_03.ext

fileG_01.ext
....


-----------------------------------------------------------------------------------------

From Help

The parameters of some "number" variables can be defined in
"Options" ("Numbers" sub-menu). They can be specified too direclty
in the expression inside a "{}" modifier (braces) that postfixes
the variable name.

For the selection numbers: %n, %np, %nc, %ncs, %ncf and %ncfs
the usage is: "{ p, s, i, r }"
    p : size (leading zero's if wanted)
    s : start
    i : step
    r : reset every n'th file     <----- new suggestion
     
    %b_%n{3,,,3}.%e          <----- new example


Related:
- reset if folder change    >> %np the selection number relative to the file path
- reset if file name change >> %nc the selection number relative to a name "collision" (same beginnings)

-------------------------------------------------------------------

I guess that should be possible already? But I can't find it at the moment. Only workaround like %T


-------------------------------------------------------------------

Find me: counter numbering serialization group of files pairs of files

Re: Add Numbering %n, reset every n'th file: 1,2,3/1,2,3/1,2,3/...

Hello Stefan,

This is a good idea. I will add it.
The reset associated to the variable (path, name etc.) will take over this new one, right ?

Thanks !

Re: Add Numbering %n, reset every n'th file: 1,2,3/1,2,3/1,2,3/...

Glad you like it.

If you are going to elevate this "%n{ p, s, i, r }" syntax
to GUI level on "File > Preferences > Numbers",
you maybe want to add also "%nr" for this
as an shortcut of "%n{<default>,<default>,<default>,<default>}"
which use the setting from that GUI dialog? Just an idea!

Ahh, %np and %nc should not inherit this "r" setting.
They still use p,s,i only.
Or do the user have to think about resetting the "r" to zero?

I think I have to deploy a sketch sad

- - -

Rémi wrote:
The reset associated to the variable (path, name etc.) will take over this new one, right ?


Sorry, I do not understood how around you mean this.

I guess you mean some variable (%np/%nc or %nr) will win an conflict if both are applied by user?
I also think this is too complex for me and over my scope ;-)

Lets see:

I think this GroupNumbering "r" will be mostly the last one?

We can use %np on same path .... and then %n{ , , , r=2}
C:\temp\fileA 1 - 1
C:\temp\fileB 2 - 2
C:\temp\fileC 3 - 1
C:\temp\fileD 4 - 2
C:\temp\fileE 5 - 1
C:\temp\fileF 6 - 2

We can use %nc on same name .... and then %n{ , , , r=2}
C:\temp\fileA 1 - 1
C:\temp\fileA 2 - 2
C:\temp\fileA 3 - 1
C:\temp\fileA 4 - 2
C:\temp\fileA 5 - 1
C:\temp\fileA 6 - 2


Sorry if I am not of an use here.
But will try to support you if I get the direction.
And I need a lot of time to get around this.

Re: Add Numbering %n, reset every n'th file: 1,2,3/1,2,3/1,2,3/...

It seems that the selection number reseting variables, %np and %nc, can use this new feature too.

For example for "%np" :

%b_%np{,,,2}.%e

C:\A\a_001.txt
C:\A\b_002.txt
C:\A\c_001.txt => reset due to maximum reached
C:\B\d_001.txt => reset due to directory change
C:\B\e_002.txt

This looks wrong for name collision, %nc, because a reset would generate a collision ...
but why blocking the user if that's what he wants and knows that the final new name won't create any
problem.

Maybe does this need more brain juice.

Re: Add Numbering %n, reset every n'th file: 1,2,3/1,2,3/1,2,3/...

Hello,

It is now of the current development version.

Now, among other things, I am going to try to make the completion window "clearer".
I am thinking to replace the simple very long lists with "trees", each node representing a set : file name, selection number, Exif GPS etc.

Do not hesitate to give me ideas.

Thanks for you help.

Remi

Re: Add Numbering %n, reset every n'th file: 1,2,3/1,2,3/1,2,3/...

Me think, there is nothing much won, if the Variables are listed in tabs or as a tree view.


My improvement ideas:

1) remember the last use tab (e.g. 'Exif'), best as an optional setting.


2) implement a search box (edit control) to filter the list.
Now a tree view would make sense, to see all e.g. 'date' related variables, no matter if from 'Base' or 'Exif' or else.



3) make that window dock-able to have it open all the time, without disturbing the view on the main app.

| Explorer       |       File list       |
|                     |                        |
|                     |                        |
|                     |                        |
|                     |                        |
|         Completion                   |
|                                            |
|                                            |




4) some work for you, but maybe an idea:

add an column for basic explanations, like:

Base:
%T{""} | Text file line | %T{"C:\\fr.txt",2}

Modifiers:
(p,n) | Substring | %b(1,8)
(s/e/f/m) | Regular Expression | %b(s/exp/replace/mod)
(tr/f/t/m) | Transliteration | %b(tr/search list/replace list/mod)

But maybe that is too much information presented.
And there is also the Help link in context menu.

Re: Add Numbering %n, reset every n'th file: 1,2,3/1,2,3/1,2,3/...

Hello,

1) Remembering the last used tab is a good idea but it may enter in conflict with the "automatic" positioning based on cursor position in the Expression edit field.
2) The search or filter box looks interesting. Maybe in a dedicated tab of the completion window.
3) A dockable window can be interesting. I'll think about it.
4) I agree with you that adding another help text associated to the variable would be redundant with the full help.

Thanks & Regards

Re: Add Numbering %n, reset every n'th file: 1,2,3/1,2,3/1,2,3/...

Hello,

I have added a "search" tab to the completion windows.
Except the "search" field it looks and behaves the same as the other one.
I have to think more about making (or not) the whole thing dockable.

Thanks for your remarks.

Remi

http://scarabee-software.net/image/Siren_3.15/completion_search_1.png

Re: Add Numbering %n, reset every n'th file: 1,2,3/1,2,3/1,2,3/...

Wow, that alone seems to be a great help :thumpsup:


I remembering scrolling the long list to find the wanted,...
and now just enter 'date' e.g., and you get filtered what you want. Great!