new sorting option: ignore articles

Features wanted...
ladner
Posts: 39
Joined: 30 Sep 2011 18:44

new sorting option: ignore articles

Post by ladner »

A new sorting option to ignore articles (the, a, an) would be very useful when managing media files like music and movies.

A quick way to turn this option on and off will be desirable so a new tool bar button may be required.

Thanks for giving this consideration.

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: new sorting option: ignore articles

Post by serendipity »

ladner wrote:A new sorting option to ignore articles (the, a, an) would be very useful when managing media files like music and movies.

A quick way to turn this option on and off will be desirable so a new tool bar button may be required.

Thanks for giving this consideration.
Hmmm, seems too much like a media manager kind of wish. Not sure how many will really use it. I for one, won't.

ladner
Posts: 39
Joined: 30 Sep 2011 18:44

Re: new sorting option: ignore articles

Post by ladner »

I have a great media manager however there are times when I need to work on media within the file system and ignoring articles would be helpful. Just a small suggestion to make the product better. I'm told that Directory Opus has this feature.

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

Re: new sorting option: ignore articles

Post by admin »

This will probably remain one of the differences to DO.

ladner
Posts: 39
Joined: 30 Sep 2011 18:44

Re: new sorting option: ignore articles

Post by ladner »

bump

I continue to think this would be a great addition to XYP.

I am a long time heavy user of XYP and this is the only important feature I feel is missing.

I would use it on a daily basis when navigating movies and music files.

Please reconsider.

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

Re: new sorting option: ignore articles

Post by admin »

Seems like you are alone with this wish...

prino
Posts: 337
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Re: new sorting option: ignore articles

Post by prino »

He's probably not alone, it would be nice to have, but I personally would not be using it all that much.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
At last, a tiny bit of programming here... :mrgreen:

ladner
Posts: 39
Joined: 30 Sep 2011 18:44

Re: new sorting option: ignore articles

Post by ladner »

bump

The new custom columns feature in 13.90 makes it easier to manage audio and image media files. I think this is a good direction for XYplorer and I encourage you to keep going.

1) Please add the "ignore articles" feature suggested by me at the start of this thread. This would make it much more convenient to use XYplorer for managing audio and video files.

2) Please add some custom columns for video file types such as video duration, video codec, video resolution, video bit rate, audio codec, and audio bit rate.

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

Re: new sorting option: ignore articles

Post by admin »

Easy for English, but we have 17 languages here...

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

Re: new sorting option: ignore articles

Post by SkyFrontier »

@ladner:

1. is scripted custom column an acceptable solution?

2. if so, please provide a set of such words to ignore and I'll see what I can do.
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...

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

Re: new sorting option: ignore articles

Post by admin »

SkyFrontier wrote:1. is scripted custom column an acceptable solution?
Bingo, good idea!

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: new sorting option: ignore articles

Post by Marco »

SkyFrontier wrote:1. is scripted custom column an acceptable solution?
You nailed it, I was thinking about the same solution!
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

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

Re: new sorting option: ignore articles

Post by SkyFrontier »

Well.

This can be achieved by two different approaches, each with flaws and strengths:

Code: Select all

   $dic = "the|a";
   $tst = gettoken(getpathcomponent(<cc_item>, base), 1, " ");
   while($tk != "") {
   $op++;
   $tk = gettoken($dic, $op, |);
   if($tst LikeI $tk) { return gettoken(getpathcomponent(<cc_item>, base), 2, " ", , 2); end 1; }
   else {  }
                    }

  return getpathcomponent(<cc_item>, base);
-potentially slower;
-can be customised at the "$dic" part (first line).

Code: Select all

   $files = gettoken(getpathcomponent(<cc_item>, base), 2, " ", , 2);
  return "$files";
-potentially faster;
-dumber: it just removes the first token from " ", returning all the rest.

Tech note: couldn't make the $dic work along with foreach loops - the list seems to return the first valid result and stuck there. :!: As stepping doesn't work for debugging CCs, it's hard to tell for sure.
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: new sorting option: ignore articles

Post by TheQwerty »

This is one place that I'd actually suggest RegexReplace...

Code: Select all

return RegexReplace(<cc_name>, '^(the|an?)\b\s+');
return ends script execution intentionally.

ladner
Posts: 39
Joined: 30 Sep 2011 18:44

Re: new sorting option: ignore articles

Post by ladner »

TheQwerty wrote:This is one place that I'd actually suggest RegexReplace...

Code: Select all

return RegexReplace(<cc_name>, '^(the|an?)\b\s+');
return ends script execution intentionally.
This works really well. Thanks kindly!

Gotta learn Regex some day :)

"a" and "an" are ignored as expected but "at" is not ignored. This is what I want but I am curious how it works. Can you please translate the Regex dictionary item "an?" into English for me?

Post Reply