-
Notifications
You must be signed in to change notification settings - Fork 64
Create and order interface lists #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create and order interface lists #9
Conversation
|
@qduk, a friend needed a solution to this very problem today, so I put something together that I believe addresses the issues we found along the way. Basically, it separates characters into classes with weights and does a 2-stage sort. Feel free to copy/paste it to your heart's content. https://gist.github.com/dgjustice/84117af73541728ece78cb33c6d37ecb |
|
@dgjustice Finally had a chance to dive into this. There was a lot I didn't understand at first but what you wrote is super cool! One issue I ran into is that it sorts interface without "/" or "." not in numerical order. For example, if I use the test data of I ended up solving that by sorting the list in place using I'm sure there is a way to do it in the iteration of the tree but the above method seemed to work. I also ran into an issue where it seemed to be skipping interfaces. When I used this test data I'm not really sure why it's missing the |
|
@qduk I'll submit my own PR with tests. |
jeffkala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple small ones.
No description provided.