-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add script to sort glossary entries. #481
base: master
Are you sure you want to change the base?
Conversation
9894cfa
to
39b3ff4
Compare
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.
Let me know what you think. Thanks @cjerdonek!
sort-glossary.py
Outdated
|
||
# Keep the intro at the beginning. | ||
first_part = parts[0] | ||
parts = sorted(parts[1:]) |
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.
I think that this should probably read sorted(parts[1:], key=lambda s: s.lower())
and declare the file as Python2.
Good point re: case-sensitivity. I half-noticed that but wasn't sure your preference. Done! |
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.
Looks great. Thanks, @cjerdonek!
No prob! (Btw, FWIW you can also run the script with Python 3, which is what I used.) |
As discussed here.
I don't know where you wanted the script, so I just put it at the top level. Also, I noticed there's a redundant file
docs/glossary_concepts.txt
, so I removed it.