Page 2 of 3
Re: new sorting option: ignore articles
Posted: 03 Apr 2014 22:26
by TheQwerty
ladner wrote:"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?
First try reading this:
http://regex101.com/r/iP3lU8
I suspect it does a better job of explaining than I can.
Plus it's colorful!
^ means the match must start at the beginning.
(...) is a group - usually used for capturing the contents but in this case it aids the OR.
the means match 'the'.
| means match either the left side or the right side (the group limits it to 'the' OR 'an?' instead of everything to the left/right of the |.
an? means match 'a' followed by zero or one instances of 'n'.
\b means the previous matches must take place at a word boundary - not really needed because of the next part.
\s+ means all of the previous must be follow by 1 or more white space characters.
http://www.regular-expressions.info/ is another great source.
EDIT: Curiously enough popular Ebook manager Calibre took a stab at listing the articles for other languages:
https://github.com/kovidgoyal/calibre/b ... ks.py#L219
Re: new sorting option: ignore articles
Posted: 04 Apr 2014 00:13
by ladner
TheQwerty wrote:ladner wrote:"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?
First try reading this:
http://regex101.com/r/iP3lU8
I suspect it does a better job of explaining than I can.
Plus it's colorful!
^ means the match must start at the beginning.
(...) is a group - usually used for capturing the contents but in this case it aids the OR.
the means match 'the'.
| means match either the left side or the right side (the group limits it to 'the' OR 'an?' instead of everything to the left/right of the |.
an? means match 'a' followed by zero or one instances of 'n'.
\b means the previous matches must take place at a word boundary - not really needed because of the next part.
\s+ means all of the previous must be follow by 1 or more white space characters.
http://www.regular-expressions.info/ is another great source.
EDIT: Curiously enough popular Ebook manager Calibre took a stab at listing the articles for other languages:
https://github.com/kovidgoyal/calibre/b ... ks.py#L219
Thanks again. I did some reading before asking the question but could not find "an? means match 'a' followed by zero or one instances of 'n'.".
Now I understand.
Re: new sorting option: ignore articles
Posted: 04 Apr 2014 00:19
by ladner
Although I am satisfied with this script solution it is not as good as an ignore article feature built into the product for 2 reasons:
1) I now have an extra name column for sorting purposes which clutters my view. I cannot remove the original name column because I need to keep it for renaming purposes.
2) The "type a few letters to find an item in the list" feature does not work on the scripted column.
Anyway it's good enough as is. Maybe someday this will become a native feature.
Re: new sorting option: ignore articles
Posted: 04 Apr 2014 00:28
by ladner
JRiver Media Center uses the following multi-language list of ignored articles:
a;an;the;ein;eine;das;der;die;el;il;la;las;le;les;los;un;une;de l';de la;des;du;l';la;le;les;un;une
And Collectorz.com Movie Collector uses:
the
a
an
de
het
een
die
der
das
des
dem
der
ein
eines
einer
einen
la
le
l'
les
un
une
el
las
los
las
un
una
unos
unas
o
a
os
as
um
uma
uns
umas
en
et
il
lo
uno
gli
Re: new sorting option: ignore articles
Posted: 04 Apr 2014 10:03
by admin
OK, I will try to add something more streamlined...
Re: new sorting option: ignore articles
Posted: 04 Apr 2014 18:29
by admin
Check beta v13.90.0008...
Re: new sorting option: ignore articles
Posted: 04 Apr 2014 19:03
by ladner
admin wrote:Check beta v13.90.0008...
Wonderful news. Thanks!
I tried beta 13.90.008 but was unable to get the new sort option to work. Perhaps I am not applying the tweak correctly?
I added the lines
SortIgnoreLeadingWords=1
SortLeadingWordsToIgnore="a;an;the"
to the [Settings] section of XYplorer.ini
Maybe I need to add these settings to the registry instead?
Re: new sorting option: ignore articles
Posted: 04 Apr 2014 19:05
by admin
Re: new sorting option: ignore articles
Posted: 04 Apr 2014 19:17
by ladner
Got it. The new sort feature works well.
Much appreciated. XYP is perfect now. You should be very proud of your product.
Re: new sorting option: ignore articles
Posted: 04 Apr 2014 19:50
by admin
Well, it's just a hobby.

Re: new sorting option: ignore articles
Posted: 04 Apr 2014 20:58
by ladner
A very satisfying hobby I suspect.
I found one small problem. Typing a few characters to find an item in the list does not work for items with an ignored article.
If this is difficult to fix it is probably ok to leave as is.
Re: new sorting option: ignore articles
Posted: 04 Apr 2014 21:09
by admin
The ignoring is only done for sorting.
If you want typing you have to go the earlier way (scripted column), and tick Use sorted column (Menus, Mouse, Safety - Type Ahead Find).
Re: new sorting option: ignore articles
Posted: 05 Apr 2014 08:12
by admin
PS: Or you select "Match anywhere" in "Enable type ahead find" (Menus, Mouse, Safety - Type Ahead Find).
Re: new sorting option: ignore articles
Posted: 05 Apr 2014 22:56
by ladner
admin wrote:PS: Or you select "Match anywhere" in "Enable type ahead find" (Menus, Mouse, Safety - Type Ahead Find).
A good suggestion but does not behave as expected since it matches words in the middle of the name. I need to keep it set to match at the beginning to find the first item in an alphabetically sorted list.
Not a problem. It is plenty good enough as is.
Re: new sorting option: ignore articles
Posted: 11 Apr 2014 14:41
by admin
Feature now available in config:
Code: Select all
v13.90.0105 - 2014-04-11 14:10
+ Configuration | Sort and Rename | Sort: Added option "Ignore articles when
sorting". Elevates tweak SortIgnoreLeadingWords to UI.
Still to be tweaked is which articles are ignored. This is the factory
default:
SortLeadingWordsToIgnore=a;an;the