Hidden Color Filter Feature

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
admin
Site Admin
Posts: 66364
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Hidden Color Filter Feature

Post by admin »

The next beta (v9.60.0112) will support color filters based on file size (files only, list only -- not folders, not tree).
Add these examples to the top of your color filters list (in LM / Color Filters) to see and believe:

Code: Select all

+/sizemax:0>4199E0,CDCFE2
+/sizemin:1000000>DE4466,E0DECF
The first means: color all files with a size of maximally 0 bytes.
The 2nd means: color all files with a size of at least 1000000 bytes.

Why hidden? Damn it, but I have no time to document it.
Why did I add it? Damn it, I needed it!
:mrgreen:

RalphM
Posts: 2090
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Hidden Color Filter Feature

Post by RalphM »

If you copy/paste it to the List Mode, do it without the leading "+" for it to work...
In Editor Mode the "+" can be copied and is interpreted as set it active.
Ralph :)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Hidden Color Filter Feature

Post by TheQwerty »

RalphM wrote:If you copy/paste it, do it without the leading "+" for it to work...
... or paste it into Editor mode. ;)

EDIT: As you added via Edit. :P

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Hidden Color Filter Feature

Post by TheQwerty »

I'm not crazy about your choice of pattern here... I'd prefer to see:

Code: Select all

/size:min:max
If either argument is omitted it is unbounded.

With the way you have it now it can be confusing to do something like:

Code: Select all

+/sizemax:0>FF0000,
+/sizemin:10>00FF00,
+/sizemin:1;/sizemax:9>0000FF,
Because in the last pattern they are OR-ed thus the order of the filters becomes extremely important.

You also made this impossible:

Code: Select all

+/sizemax:0>FF0000,
+/sizemin:10>00FF00,
+/sizemin:5;/sizemax:9>00FFFF,
+/sizemin:1;/sizemax:4>0000FF,
as well as finding a file of an exact size:

Code: Select all

+/sizemin:42;/sizemax:42>101010,
Where my suggestion would make it:

Code: Select all

+/size::0>FF0000,
+/size:10:>00FF00,
+/size:5:9>00FFFF,
+/size:1:4>0000FF,
+/size:42:42>101010,
And it removes the dependence on the sort order so I can define them in a more sensible manner:

Code: Select all

+/size::0>FF0000,
+/size:1:4>0000FF,
+/size:5:9>00FFFF,
+/size:10:>00FF00,
+/size:42:42>101010,
Further, not that it's a big difference but you'd only have to document one pattern instead of two plus a note on the importance of ordering. :P

admin
Site Admin
Posts: 66364
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Hidden Color Filter Feature

Post by admin »

If your regions overlap then order becomes important as well. IMO there is not much won overall. My current scheme is more intuitive I think.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Hidden Color Filter Feature

Post by TheQwerty »

admin wrote:If your regions overlap then order becomes important as well. IMO there is not much won overall. My current scheme is more intuitive I think.
I wasn't trying to eliminate the importance of order by rather lessen its impact.

And yes I realize I did mistakenly claim some of the possible impossible with your scheme, though the fact that I so easily made that mistakes points out that the current scheme is not so immediately intuitive.

Code: Select all

+/sizemin:10>00FF00,
+/sizemin:5>00FFFF,
+/sizemin:1>0000FF,
+/sizemin:0>FF0000,
Still no easy way to highlight files of a specific size, though. :P

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Hidden Color Filter Feature

Post by j_c_hallgren »

admin wrote:If your regions overlap then order becomes important as well. IMO there is not much won overall. My current scheme is more intuitive I think.
Looking at this and using TheQwerty's examples, I find his idea of just a 'size' and both limits to be very intuitive and less wordy as well...sorry, Don.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

admin
Site Admin
Posts: 66364
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Hidden Color Filter Feature

Post by admin »

TheQwerty wrote:+/size::0>FF0000,
+/size:10:>00FF00,
+/size:5:9>00FFFF,
+/size:1:4>0000FF,
+/size:42:42>101010,
[/code]
Why the second ":"? It looks better (more intuitive) to me with a "-" instead:

Code: Select all

+/size:0>FF0000,
+/size:10->00FF00,
+/size:5-9>00FFFF,
+/size:1-4>0000FF,
+/size:42>101010,
Or:

Code: Select all

+/size:0>FF0000,
+/size:-4>0000FF,
+/size:-9>00FFFF,
+/size:10->00FF00,

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Hidden Color Filter Feature

Post by SkyFrontier »

I'm trying to set a visual filter to tell me the safest value Nero can handle when burning a 702.5 MB data CD.
Bit calculators tell me the value is 736624640 bytes (1024 bytes)/702500000 (1000 bytes).
Forums, 736970752 (reporting as 702 MB despite the value being larger - rounded, perhaps...).
And I can't remember the name of a tool I had to create dummy files and effectively try a real burning session...
Can someone enlighten me on the safest, allowed for burning value?
Thanks!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Hidden Color Filter Feature

Post by TheQwerty »

admin wrote:Why the second ":"? It looks better (more intuitive) to me with a "-" instead:
I only picked ':' because you were using it to separate the pattern and value already, so I figured it would be safe choice that probably wouldn't conflict with your existing parsing.

'-' will make an omitted min look like a negative max, and while that makes zero sense in this instance I'm not sure it's the best alternative. Then again it's also common usage when writing 'number through number'.

Using '.' or ',' might be confused as a decimal place (especially since there may come pressure in the future to allow the use of units other than bytes and it might be nice to do 1.5MB then instead). I believe some programming languages use '..' when using indexes to slice an array, so maybe that's an okay choice?

All told, I don't really have a preference of what you use to delimit them, I'm just thinking of the functionality. ;)


If instead of dealing with omitted character you wanted to make it:
/size:min-max;>RRGGBB
/size:<n;>RRGGBB
/size:>n;>RRGGBB
That's cool too, but since > already has special meaning it's probably not as easy.

admin
Site Admin
Posts: 66364
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Hidden Color Filter Feature

Post by admin »

TheQwerty wrote:
admin wrote:Why the second ":"? It looks better (more intuitive) to me with a "-" instead:
I only picked ':' because you were using it to separate the pattern and value already, so I figured it would be safe choice that probably wouldn't conflict with your existing parsing.

'-' will make an omitted min look like a negative max, and while that makes zero sense in this instance I'm not sure it's the best alternative. Then again it's also common usage when writing 'number through number'.

Using '.' or ',' might be confused as a decimal place (especially since there may come pressure in the future to allow the use of units other than bytes and it might be nice to do 1.5MB then instead). I believe some programming languages use '..' when using indexes to slice an array, so maybe that's an okay choice?

All told, I don't really have a preference of what you use to delimit them, I'm just thinking of the functionality. ;)


If instead of dealing with omitted character you wanted to make it:
/size:min-max;>RRGGBB
/size:<n;>RRGGBB
/size:>n;>RRGGBB
That's cool too, but since > already has special meaning it's probably not as easy.
> would indeed be unnecessarily problematic.
I think - is totally ok in this context (common usage, as you said already). I currently see no heavy obstacles, but will wait a little before I change it...

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Hidden Color Filter Feature

Post by TheQwerty »

admin wrote:> would indeed be unnecessarily problematic.
Thinking back you could avoid overloading '>' with: :P
/size:min-max;>RRGGBB
/size:<n;>RRGGBB
/size:n<;>RRGGBB
admin wrote:I think - is totally ok in this context (common usage, as you said already). I currently see no heavy obstacles, but will wait a little before I change it...
Yeah, '-' should make perfectly fine sense given the context.

admin
Site Admin
Posts: 66364
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Hidden Color Filter Feature

Post by admin »

TheQwerty wrote:
admin wrote:> would indeed be unnecessarily problematic.
Thinking back you could avoid overloading '>' with: :P
/size:min-max;>RRGGBB
/size:<n;>RRGGBB
/size:n<;>RRGGBB
Well, "n<" will raise questions... I know my users (a little)...

Actually I think it could be parsed like this, but the ">" before the color starts looking a bit stupid now...
/size:min-max;>RRGGBB
/size:<n;>RRGGBB
/size:>n;>RRGGBB

admin
Site Admin
Posts: 66364
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Hidden Color Filter Feature

Post by admin »

OK, I worked it out and am satisfied with the following now:

Code: Select all

+/size:0 >4199E0,CDCFE2
+/size:<500 >004080,ABBBD3
+/size:2000-3000 >EEE033,585858
+/size:>100000 >FFFFFF,000000
(The blank before > is just for views, not necessary.)

You get it only tomorrow, of course. :P

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Hidden Color Filter Feature

Post by TheQwerty »

admin wrote:OK, I worked it out and am satisfied with the following now:

Code: Select all

+/size:0 >4199E0,CDCFE2
+/size:<500 >004080,ABBBD3
+/size:2000-3000 >EEE033,585858
+/size:>100000 >FFFFFF,000000
(The blank before > is just for views, not necessary.)
Looks good!
admin wrote:You get it only tomorrow, of course. :P
(Emphasis mine).. :shock: I'm pretty sure this feature will be useful beyond just tomorrow. I'd like to see it as part of XY for at least a couple of weeks, maybe more! But keeping v9.60.0113 (or whatever) around just for this feature probably won't be worth it to me. :P

Post Reply