26

(4 replies, posted in Bugs and problems)

daffdaemon, if you want you can do that even now yourself by utilizing a DOS batch, like


SirenLauncher.cmd

@ECHO OFF
REM SirenLauncher, v00.1, 2015-11-09
REM Create a backup of the Siren.INI file, then launch Siren.EXE

CD %~dp0

if exist Siren.ini.9 DEL  Siren.ini.9
if exist Siren.ini.8 REN  Siren.ini.8 Siren.ini.9
if exist Siren.ini.7 REN  Siren.ini.7 Siren.ini.8
if exist Siren.ini.6 REN  Siren.ini.6 Siren.ini.7
if exist Siren.ini.5 REN  Siren.ini.5 Siren.ini.6
if exist Siren.ini.4 REN  Siren.ini.4 Siren.ini.5
if exist Siren.ini.3 REN  Siren.ini.3 Siren.ini.4
if exist Siren.ini.2 REN  Siren.ini.2 Siren.ini.3
if exist Siren.ini.1 REN  Siren.ini.1 Siren.ini.2
if exist Siren.ini   COPY Siren.ini   Siren.ini.1

START "" Siren.exe

REM //EOF

This will save the current ini before launching Siren, and also rename the older one to keep them a little bit longer.


We could do it at the end too, but then we had to keep that DOS-window open,....
on the other hand, we could use a AHK script which could run in background.

27

(13 replies, posted in How to ...)

I tried the same trick with %T the other day too without luck ;-)

Maybe it would be possible for Rémi to enhance %T{}
to allow calculating sub-expressions like:      >>> %T{  (%pa

EDIT:
was cut...

>>> %T{  (%pa"Numfiles.txt")  } <<<

28

(7 replies, posted in Evolution requests)

Just Idea:


Instead of a second column for the filter (Passed),
how about a common usable |Process| column, smtg like:



Filter | Process | Sub.Exp

*.mp3 | Match
*.avi  | No pass
         | Apply

*.mp3 | No pass
*.avi  | Match
         | Apply



where you could show other "no match" or "error" or "un-solved" messages too.

29

(7 replies, posted in Evolution requests)

>>> "I like it already. Will test it this days......"

Oh, it is not provided for download yet.  OK, fine.


>>> "Give me your thoughts, "
was meant based on the picture then?
What can I say? Looks nice, good, nifty.
But what means "Preference"? This is an kind of expression too, isn't it?
By preference I first thought on settings from the Options dialog (Preferences).

And BTW, I would suggest to show an kind of indicator at least, that the Preferences
are not in default state anymore, but modified by user.
Smtg like: "Preferences: default"  // "Preferences: modified !"
Or just show an star * somewhere, as text editors do on modified documents.

I will take another look later, maybe I see smtg more....

Good work, Rémi !


EDIT:
>>>> "For this example the preferences contains a rule to replace "@" with "o"."

AHHH, NOW I see it big_smile big_smile big_smile


OK, I have read it before, but not understood, because I though in that row the new path\ is the main point.


All clear now.

30

(7 replies, posted in Evolution requests)

Do I see that right?

Instead of my idea to split the input-expressions at the semicolon delimiter into multiple lines,

you provide a way to show the renaming process step-by-step for each expression. As many RegEx tools do.

How clever, and could be nifty to understand the whole computing process to find own misunderstandings.

Now we can easily see where we have done a mistake and fix our expression or the order of expressions.

I like it already. Will test it this days......

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!

I hope you are still open for new ideas. If they are to wired, please feel free to drop them!!!


Evaluate a sub expression / Store results

Idea:

I don't know if that makes sense to you or if that can be implemented
in the way you have coded Siren, but here is the idea:


Calculate the result on a PART of the file name.

%(siren expression)
%#(siren expression)
%#(%b(9,10)_%nc)

Example: Add counter if signs 9 till 18 are same
%b(1,8) %#(%b(9,10)_%nc).%e

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



Store some parts or results.

I had the problem, that after my first evalution, I can't no longer access parts of the origin name.
So me thinking about storing parts for later reuse.

%[name:siren expression]

%[name:siren expression] is a named Siren capture group to store the currently evaluated result
%[name] will insert the value of the Siren capture group named 'name', if any. Else nothing.

Examples, store part for later use:
Swap file name parts
%[one:%b(1,8)]; %[two:%b(9,10)]; %[two]%[one].%e
or
%[one:%b(1,8)]; %[two:%b(9,10)_%nc]; %[one]%[two].%e
or
Swap file name parts
%[one:%b(9,10)_%nc]; %b(1,8)%[one].%e



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


Here is the callenge:

IMG_101_2015-05-15 <
IMG_102_2015-05-15
IMG_103_2015-05-17 <
IMG_104_2015-05-18 <
IMG_105_2015-05-19 <
IMG_106_2015-05-19
IMG_107_2015-05-19

I would like to rename at the end as follows:

IMG_101_2015-05-15_001 <-- #1 for day 15
IMG_102_2015-05-15_002
IMG_103_2015-05-17_001 <-- #1 for day 17
IMG_104_2015-05-18_001 <-- #1 for day 18
IMG_105_2015-05-19_001 <-- #1 for day 19
IMG_106_2015-05-19_002
IMG_107_2015-05-19_003



How would you solve this, without external scripting?

33

(7 replies, posted in Evolution requests)

Probably an idea for the Expression testbed (which deserves a icon on the right of the Expression box in the main window, btw)

Idea:

Additionally to the  current Multi-Expression mode with the semicolon as delimiter,

%expression ; %expression ; %expression


me think it would be nice to have a Multi-Line Expressions mode, with each expression on a new line.


Probably in a additional dialog box.


Something like:

----------------------------------------------------------------------
Expression    |  Resolved on Selected File as example
%expression | file name
%expression | File Name
%expression | FileName
----------------------------------------------------------------------




For a nice view, + better understanding, + debugging issues.

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.

Q:  If I use something like

%b(1,10)_%ncount.%e  (add  selection number plus the word "count")

I get names like
Filename_01ount.ext

instead of
Filename_01count.ext

Why?



A: This is because "%nc" is a Siren variable.
(add selection number relative to a name "collision" (same beginnings),...)

So Siren do not see "%n" only plus literal "count",  but %nc" plus the letters "ount".



But you can escape the "c" to drop the special meaning of "%nc"
by using an backslash like in "%n\c".


So you could use:

%b(1,10)_%n\count.%e


The same for
%b(1,10)_%npart.%e (add selection number relative to the file path)
%b(1,10)_%n\part.%e


and all other variables.


.

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.

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

39

(8 replies, posted in Comments)

Hi Rémi,

Lua seems logical for a cross-plattform scripting language, beside of Python.

Unfortunately I have never worked with it  (only with VBS, JS, PascalScript, PowerShell, AutoHotkey)
So I can't say anything about that. But it looks good, as most other language, based on the documentation.

If you not already know, there is http://rosettacode.org/wiki/Category:Lua
with comparison to other languages for a quick overview.

All the best to you.

40

(8 replies, posted in Comments)

So one year without any update?  tongue  (expression filters?  smile )
So I guess everything works fine?

Hope you all are fine too?

Just a quick



EDIT: the rest of my message was dropped  (now I remember we had that before):

Just a quick "hello again"

I didn't had to rename a  lot of files last year....

regards

Rémi wrote:

Just another relatively important change that I would like to do : the removal of the disk change monitoring feature.
Siren 3.14 tracks the modifications done to its current directory by other programs and reflect the changes in its file list.
This feature can be handy but it is heavy, sometimes not reliable and doesn't work in some cases.
What is your opinion about this step backwards ?

Today I get it.
>>Siren tracks the modifications done to its current directory by other programs

You don't mean own modifications by renaming, but really modifications by other programs?

I think, own modifications should be seen immediately.
For modifications done by other programs it would be enough *for me* to just press F5 from time to time. (on Win32)

But maybe, since you have the code already, just make it optional in the settings and disable it on default.

Rémi wrote:
Stefan wrote:

- Will this work: exif date for jpg, creation date for ALL *.* others (but NOT for jpgs)
[*.jpg]%Xdo_%f;[*.*]%dc_%f

No. If a file passes a filter (an empty filter is equivalent to "*.*" or "*") then the sub-expression is applied to it.

Ahh, OK.

But on an second thought:

%dc_%f;[*.jpg]%Xdo_%f

smile



Just another relatively important change that I would like to do : the removal of the disk change monitoring feature.
Siren 3.14 tracks the modifications done to its current directory by other programs and reflect the changes in its file list.
This feature can be handy but it is heavy, sometimes not reliable and doesn't work in some cases.
What is your opinion about this step backwards ?

Thanks for asking. I need time to think about it. Tomorrow...



- - -

? Did I really have missed this post? Sorry for late responce ;-)

Looks fine. Good idea.

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

While touching about an use, I was thinking about a folder full of MP3s and one or more album cover JPGs.
This new filter will allow me to rename e.g. the JPGs by the parent folder name, without utilizing the Filter combobox by hand.
[*.jpg]%p%ncs.%e

Add timestamp to filename; with exif date for jpg and file creation date for mp4:
[*.jpg]%Xdo_%f;[*.MP4]%dc_%f

Explanations for other readers:
[*.jpg] work only on JPG files (not implemented yet)
%p   parent directory
%n   the selection number
%nc  the selection number relative to a name "collision"
%ncs same principle as "%nc" except that it is empty for the first element of the "collision group" and prefixed by a "_" for the others.
%Xdo EXIF DateTimeOriginal
%dc the creation date and time


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

Ideas:

- first I thought, why not dropping the leading "*." part, it is superfluous, and maybe use a space as seperator,
like just [jpg nef png] instead of [*.jpg;*.nef;*.png]
But your origin idea fits better along with the command line "/S" parameter.

- invent filetype groups to use as filter: [Image] = png jpg jpeg bmp, [Video] = avi mpeg , [Audio] = wav mid mp3
[Image]Photo_%f;[Video]Video_%f

- Will this work: exif date for jpg, creation date for ALL *.* others (but NOT for jpgs)
[*.jpg]%Xdo_%f;[*.*]%dc_%f

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

Will you expand this filter feature in future?  big_smile

Just see if the expression inside the [ ] can evaluated to true.

[JPG && (%Ix -lt 100 || %Iy -lt 80)]thumbnail_%f
[%N]_numberfound_%f

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

44

(7 replies, posted in Comments)

Merry x-mas and a happy new year 2014 wink


Thank you for making Siren!



.

45

(3 replies, posted in How to ...)

Hi and welcome!

dbareis wrote:

My Expression so far is: %b(s/([0-9]+)-([0-9]+)-([0-9]+)/\3-\2-\1 \4/).%e

That gets it to: "2013-3-30  - Fred was here.txt", close but I want the month (3) padded to "03".

>>(I wish there were more examples)
>>If someone can explain why this doesn't work that would be great: 

Some tips:

1) RegEx is a pattern matching system to take some parts to keep and maybe some others to drop.
So one would e.g. match parts of the file name, store them in backreference groups and reorder them in the output.
As you did. But there is no magic as conjure up additional parts out of nowhere.

There is no such things as "padding" per se. Just matching parts and use them for some operations. As Rémi did with his
first additional expression s/-(\d)-/-0\1-/g (match single digit between hyphens and replace with '0' and matched digit)
Then you can continue whit that first output as input for the reorder-expression of you.

2) Parentheses () can be used to store what is matched for later reuse by \1 and so on.
Those backreference groups are counted from left to right.
So s/([0-9]+)-([0-9]+)-([0-9]+ will provide three backreference groups,... but you use *four* references \3-\2-\1 \4
The \4 is to much, because not matched, and not needed either as Siren provide the unmatched part on its own.

3) Instead of [0-9] you can use the shorter \d
The character class [0-9] would be used as e.g. [1-3] to match 1,2 or 3 only.
But to match any digit out of 0,1,2,3...9 you can use just \d


So your expression could be written as s/(\d+)-(\d+)-(\d+)/\3-\2-\1


That you do not need to match the text too is because which regex engine is used,
and how Rémi has implemented that.


HTH? big_smile

Rémi wrote:

This new feature is now present in Siren 3.12 beta3 build 957.

New in this release :
* Expression TestBed : new button to replace current names with the ones of the selected files   

Great, works very well.


How to:
- select (check the checkboxes) one or more files in the Siren files list.
- launch "'?' > Expression testbed" .
- click at the new button in the "Current Names" line..
... and you have a string from an real file name to play with in the testbed ;-)
Note: the current list in testbed will be overwritten.


Please note that the "Expression testbed" dialog, while still open, do not prevent you from
selecting other files in the back, and another click at the "Import" button will add those strings too.

Because I had to search myself again, I want to suggest to add this feature to the menu:

"View > Modifier Positions (Ctrl+Shift+E)"

If no combo control have the focus, prompt the user with an how-to message (the one from the help).

That way the user will learn how to use and this feature and it will be used more often.

Just an idea! I will remember it now again for the next few weeks  smile
I can remember we have talked about this already?


From Help:

Press Ctrl+Shift+E in Expression box to see positions of selected parts in the status bar.

I can't copy text from the help. ?!?

While playing I got the idea
to have an button to "import" the currently selected file names
into the "Current Names" box.

Or something like that.

First I thought about automatically use the selected files,... but that may be too many sometime?

As always, just an idea. Of course we can still utilize Ctrl+Shift+P  big_smile

49

(13 replies, posted in Announcements)

> hide the visualization window from the main View menu.

build_954 on Win7 64-bit:

- I can hide or show it left or right.
- It remembers its size after hiding.
- The settings (hide and size) are remembered after an restart of Siren

Fine.

50

(13 replies, posted in Announcements)

Of course, sorry, I've forgotten to mention:

Siren_312_beta1_build_947_windows_(19.03.2013).zip >   still crash on opening "Expression testbed" wit my INI settings
Siren_312_beta2_build_954_windows_(08.04.2013).zip >   works fine on "Expression testbed" with very same INI. Good work!


.