Sorting¶
Note
While using the multiprocessing option, the data are tested as given.
Why do we need it?¶
Because sorted is better, we sort by default!
How does it work?¶
Note
Want to read the code ? It’s here: PyFunceble.sort.Sort()
!
Alphabetically¶
This is the default one. The default python sorted()
function is used for that purpose.
Hierarchically¶
The objective of this is to provide sorting by service/domains.
Note
This is a simplified version of what we actually do.
- Let’s say we have
aaa.bbb.ccc.tdl
. Note
The TDL part is determined. Indeed we first look at the IANA Root Zone database the at the Public Suffix List.
- Let’s say we have
Let’s split the points. We then get a list
[aaa, bbb, ccc, tdl]
Put the TDL first. It will gives us
[tdl, aaa, bbb, ccc]
Reverse everything after the TDL. It will gives us
[tdl, ccc, bbb, aaa]
.Get the string to use for sorting. It will gives us
tdl.ccc.bbb.aaa
.
How to activate the hierarchical sorting?¶
Simply change
hierarchical_sorting: False
to
hierarchical_sorting: True
into your personal .PyFunceble.yaml
or use the --hierarchical
argument from the CLI to activate it.