NATSORT(1)
π NATSORT(1) β the natsort girlies' guide β¨
okay so bestie, welcome to natsort π¦ this is the manual page for natsort 8.4.0, and it's genuinely one of those lil tools that just works and makes your life better. natural sort!! no more file10 before file2!! we love to see it π
πΈ NAME πΈ
natsort β manual page for natsort 8.4.0 β¨
π SYNOPSIS π
natsort [-h] [--version] [-p] [-f LOW HIGH] [-F LOW HIGH] [-e EXCLUDE]
[-r] [-t {int,float,real,f,i,r}] [--nosign] [-s] [--noexp] [-l]
[entries ...]
π« DESCRIPTION π«
Performs a natural sort on entries given on the command-line. that's the whole vibe, honestly π
Arguments are read from sys.argv. yep, straight from there, no cap π«Ά
π§ positional arguments:
entriesβ the entries to sort. taken fromstdinif nothing is given on the command line. so like, if you're feeling lazy you can just pipe stuff in, it's fine, we support you π
β¨ options:
-h,--helpβ show this help message and exit. the classic. the icon π--versionβ show program's version number and exit. short, sweet, slay π-p,--pathsβ interpret the input as file paths. okay so ngl this is not strictly necessary to sort all file paths, but bestie listen: in cases where there are OS-generated file paths like"Folder/"and"Folder (1)/", you need this option to make the paths sorted in the order you expect ("Folder/"before"Folder (1)/"). that's the tea β-f,--filter_LOW_ _HIGH_ β used for keeping only the entries that have a number falling in the given range. filtering but make it cute π-F,--reverse-filter_LOW_ _HIGH_ β used for excluding the entries that have a number falling in the given range. the opposite of the one above, iconic behaviour π-e,--exclude_EXCLUDE_ β used to exclude an entry that contains a specific number. bye bye specific numbers π-r,--reverseβ returns in reversed order. sometimes you just wanna go backwards, and honestly? valid π-t,--number-type,--number_type{int,float,real,f,i,r}β choose the type of number to search for."float"will search for floating-point numbers."int"will only search for integers."real"is a shortcut for"float"with--sign."i"is a synonym for"int","f"is a synonym for"float", and"r"is a synonym for"real". the default isintβ--nosignβ do not consider"+"or"-"as part of a number, i.e. do not take sign into consideration. this is the default π¦-s,--signβ consider"+"or"-"as part of a number, i.e. take sign into consideration. the default is unsigned π₯--noexpβ do not consider an exponential as part of a number, i.e.1e4would be considered as1,"e", and4, not as10000. this only effects the--number-type=float. heads up bestie, it's exponent-free from here on out π-l,--localeβ causesnatsortto use locale-aware sorting. you will get the best results if you installPyICUπ
okay tiny reminder:--nosignand--noexpand--signare all real flags with real consequences, and-lreally does wantPyICUfor best results β that's straight from the page, not me guessing π
π«Ά sign-off π«Ά
this lil beauty is natsort 8.4.0, dated July 2023 β go forth and sort naturally, bestie, you're literally the main character of your own directory ππ
π¦ where this page comes from
- opensuse-leap 16.0: python313-natsort 8.4.0-160000.2.2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms