SpecificWdx

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: sheep, Hacker, Stefan2, white

User avatar
franck8244
Power Member
Power Member
Posts: 702
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

SpecificWdx

Post by *franck8244 » 2009-03-30, 20:21 UTC

Hi,

Starting from this thread, I'm making a new wdx plugin

it will be able to -calculate- / deals with wdx informations

Number of field is dynamic (depending of the ini file)
return type of the field is also dynamic
content of the field depends on other wdx values and on the action the user wants to make

For the moment there is
For numbers: > Min / Max / is equal
for string: > is equal / concatenation

the plugin internally compares 2 possibly different wdx fields from the same wdx (it is planned to have 2 separate wdx)

any other specific need?
TC#88260 -

User avatar
nsp
Power Member
Power Member
Posts: 1219
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: SpecificWdx

Post by *nsp » 2009-03-31, 10:34 UTC

Why not adding
Numeric
simple math expression like * + - / % frac
toString, toString with format
String
Substring, RegexReplace

Ad conditional statement If exrpression THEN .... ELSIF exrpression THEN ... ELSE .... ENDIF

ALL
isNull > < !=

String
RegexMatch

...

User avatar
franck8244
Power Member
Power Member
Posts: 702
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 » 2009-03-31, 11:25 UTC

simple math expression like * + - / % frac
% means modulo,right ?
frac means ? (fraction ?), example of "value" please
=>easy to add

numeric :
->toString : what's the use in a wdx?
-> toString with format, returning values from wdx should be tested if it matches the -desired format- then be translated. can be hard toadd,what's the use?

String :
->Substring: easy to add
RegexpReplace : have to see how it can be done (or how I should implement it)

I have already implemented comparison with a -fix value-
so isNull ; < ; > ; != <=> already done

String:RegExpMatch :will depend on the regexp stuff I use but should be doable ;)
TC#88260 -

User avatar
nsp
Power Member
Power Member
Posts: 1219
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp » 2009-03-31, 12:15 UTC

franck8244 wrote: % means modulo,right ?
frac means ? (fraction ?), example of "value" please
=>easy to add
numeric :
->toString : what's the use in a wdx?
-> toString with format, returning values from wdx should be tested if it matches the -desired format- then be translated. can be hard toadd,what's the use?

String :
->Substring: easy to add
RegexpReplace :....
% is modulo (it could also be fine to add ceil() floor() and round() )
Frac is fraction you can give a look here

Format allow to have number with Zero (Left/Right) ex +99900.000999
Say you must have the Sign and minimum of 2 digit before . and from 3 to 6 digit after. (E impose you Engineer notation and S scientific ...)

toString or implicit toString is for combination of numeric (this is probabli in )
ex width@img.wdx & " x " & height@img.wdx can return "1024 x 768"

User avatar
franck8244
Power Member
Power Member
Posts: 702
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 » 2009-03-31, 12:29 UTC

ceil / floor / round : OK (return willbe ft_numeric_32)

for FRAC and format , the return value would have to be ft_string
Possibly wrong in sorting ...
toString or implicit toString is for combination of numeric (this is probabli in )
ex width@img.wdx & " x " & height@img.wdx can return "1024 x 768"
Do you want me to replace TC processing ? ;)
TC#88260 -

User avatar
nsp
Power Member
Power Member
Posts: 1219
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp » 2009-04-01, 07:35 UTC

franck8244 wrote:
toString or implicit toString is for combination of numeric (this is probabli in )
ex width@img.wdx & " x " & height@img.wdx can return "1024 x 768"
Do you want me to replace TC processing ? ;)
It could be fine to do really more..... (as almost all calculation and expression are missing in standard TC )
In fact, if you have condition in order to calculate your output field, you can build dedicated column with more than one wdx info.
use tridwdx to find real extension.....

Code: Select all

[DedicatedSize] 
if [match0.ext@trid.wdx] in ("OGG", "MP3", "WAV", "FLAC", "WV") then
   FIELD = "Duration: " & [len@Music.wdx]
elsif [match0.ext@trid.wdx] in ("PNG",""JPG", "GIF", "BMP", "TIFF", "PSD") then   
   FIELD  = "Max img Size: " & Max([width@Image.wdx],[width@Image.wdx] )
   if  ( [AspectRatio@Image.wdx] > 1 ) then
    FIELD = FIELD & "on width"
   else
    FIELD = FIELD & "on height"
   endif
   FIELD = FIELD & "(" & frac([AspectRatio@Image.wdx],16) & ")" 
else
....
Is it too much....;)

User avatar
fenix_productions
Power Member
Power Member
Posts: 1956
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions » 2009-04-01, 10:15 UTC

2nsp
nsp wrote:you can build dedicated column with more than one wdx info.
Isn't it something FileDesc (or SuperWDX IIRC) does now?
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099

User avatar
nsp
Power Member
Power Member
Posts: 1219
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp » 2009-04-01, 11:34 UTC

fenix_productions wrote:2nsp
nsp wrote:you can build dedicated column with more than one wdx info.
Isn't it something FileDesc (or SuperWDX IIRC) does now?
Yes but none have operator and both seems to be not very active anymore (Specially SuperWdx ...)

User avatar
franck8244
Power Member
Power Member
Posts: 702
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 » 2009-04-01, 13:29 UTC

Code: Select all

[DedicatedSize]
if [match0.ext@trid.wdx] in ("OGG", "MP3", "WAV", "FLAC", "WV") then
   FIELD = "Duration: " & [len@Music.wdx]
elsif [match0.ext@trid.wdx] in ("PNG",""JPG", "GIF", "BMP", "TIFF", "PSD") then   
   FIELD  = "Max img Size: " & Max([width@Image.wdx],[width@Image.wdx] )
   if  ( [AspectRatio@Image.wdx] > 1 ) then
    FIELD = FIELD & "on width"
   else
    FIELD = FIELD & "on height"
   endif
   FIELD = FIELD & "(" & frac([AspectRatio@Image.wdx],16) & ")"
else
This would be easily done with scriptcontent plugin + the use of wdx_proxy
but it can be a pain in specific.wdx ...
TC#88260 -

User avatar
nsp
Power Member
Power Member
Posts: 1219
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp » 2009-04-01, 15:29 UTC

franck8244 wrote:This would be easily done with scriptcontent plugin + the use of wdx_proxy
I do note use ScriptContent plugin for 2 reasons :
- If you want to create additional columns of the plugin then create a copy of a plugin directory. Rename wdx file, do not rename ini file. Register new wdx as new plugin and add a new column. even if 10 columns seems to be a lot, it could be beter to have autoload of all scripts in script folder and have dynamic colum names.
- no way to have object across calls and get init, StartMultifile, EndMultifiles and unload scripts.

-- edited --
Where is wdx_proxy ?? I did not find it in your website @ free.fr . Is it only embedded in file comparer ??

User avatar
fenix_productions
Power Member
Power Member
Posts: 1956
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions » 2009-04-01, 16:09 UTC

2quote
nsp wrote:Where is wdx_proxy ?? I did not find it in your website @ free.fr . Is it only embedded in file comparer ??
It will be included as DLL in SpecificWdx package IMHO.

Currently you can find it inside Comparer zip file.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099

User avatar
franck8244
Power Member
Power Member
Posts: 702
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 » 2009-04-01, 17:38 UTC

2nsp
The problem is that I would have to write all the script interpreter stuff...

the current version of Specific.wdx can be found
here (since early this morning)

wdx_proxy is also included in the archive.
This proxy was made -mostly for a colleague at first- then fenix_production was interested in using it for his tool, so I modified it - a bit ;) -

There is no complete documentation for wdx_proxy yet. If you are interested I can send you some (function prototype / order to use them...)
TC#88260 -

User avatar
nsp
Power Member
Power Member
Posts: 1219
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp » 2009-04-04, 05:54 UTC

franck8244 wrote:2nsp
The problem is that I would have to write all the script interpreter stuff...
...
There is no complete documentation for wdx_proxy yet. If you are interested I can send you some (function prototype / order to use them...)
Thx !
I've done some test, it is fine for simple expression i think it could be easier for user to write directly Max( [width.pixel@Img.wdx], [height.pixel@Img.wdx] ) than using decomposed parameter at least for version 2 ;)

It is always easy to use plugin name instead of P1,P2,P3 (except for test)....

I thing a god idea could be to use "Modified" version of SSeting (From SSeting) to populate your expression. ===> in this case the parsing could be done in the configuration app.

(info: SuperWdx is in Delphi, you can probably get SSeting sources

User avatar
franck8244
Power Member
Power Member
Posts: 702
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 » 2009-04-04, 20:22 UTC

What is SSeting , where can I find it...

(the flying season started -for me- this weekend so updates might come but ...)
TC#88260 -

User avatar
nsp
Power Member
Power Member
Posts: 1219
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp » 2009-04-05, 06:03 UTC

franck8244 wrote:What is SSettings , where can I find it...
SSetings (Sorry for the typo) is the SuperWdx-Settings tool
You can find a version in totalcmd.net Super Wdx Source
... as super wdx evolved a little lately (Dec 2008), you can ask for source to Pavel aka D1P by mail it you are interested...

Have good fly !!!

Post Reply