-
Notifications
You must be signed in to change notification settings - Fork 4
Description
It would be cool to have a slash command for searching sphinx documentation. All sphinx docs generate an object.inv
file, which can be downloaded, parsed, and cached.
For example, the python docs: https://docs.python.org/3/
The objects.inv file is: https://docs.python.org/3/objects.inv
I found some great documentation on how to parse this https://sphobjinv.readthedocs.io/en/latest/syntax.html. Once parsed, it can be cached, and then we can probably use some sort of fuzzy search. The cached version of documentation can be set to expire after 24 hours.
For the slash command, I was thinking something like this:
/rtm query: <query> [docs-url: <docs-url="https://docs.python.org/3/">]
The docs-url can have autocomplete (and we can list more common projects), but will let you specify any valid sphinx url. If the url hasn't been used yet, it'll download/parse/cache it first.