A plugin to suggest documentation links when someone asks a basic question.
Project description
sopel-rtfm
A plugin to suggest documentation links when someone asks a basic question.
Functions
sopel-rtfm
provides one command:
.rtfm
— searches the configured Sphinx object inventory for the best match, and outputs a link to its documentation.
Configuration
Two settings exist, one of which is required:
[rtfm]
# Required: URL of the objects.inv file you want `.rtfm` to search
inventory = https://docs.project.site/objects.inv
# Optional, but useful if automatically determining the base URL doesn't work
link_base = https://docs.project.site/
Requirements
This plugin is built for Sopel 7.0+, but targets Python 3.6+ only (no py2.7).
In addition, it needs the sphobjinv
module from PyPI.
Optionally, you can install sphobjinv[speedup]
for faster searches; this may
or may not work depending on whether your installation of Python includes the
necessary dependencies for building C extensions.
0.4.0
Added:
.docs
command alias, for when.rtfm
feels harsh (#2)
0.3.0
Added:
- Proper help output for
.rtfm
command (#1)
Changed:
- Prioritize "bigger" object types when sorting results
- Simplify retrieving output URL
0.2.0
Added:
- Caching behavior: The configured Sphinx inventory is fetched at startup, and re-fetched automatically every 24 hours
- Bot admins can force an update with the new
.rtfmupdate
command
0.1.1
Changed:
- Empty/missing query now outputs the docs' base URL instead of an error
Fixed:
rtfm_base
was left inbot.memory
aftershutdown()
0.1.0
Initial release.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sopel-rtfm-0.4.0.tar.gz
.
File metadata
- Download URL: sopel-rtfm-0.4.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/5.1.0 pkginfo/1.8.1 requests/2.31.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d21a9d5aa6c7a987cc1f201c5474bb039d45e54f753c81d5dde35e28fed71ee |
|
MD5 | 3059c19a5f2889143508063fb387bf8a |
|
BLAKE2b-256 | 0e45d93966af67c6776e069627fb8fdd931d7830f20debd6d3cf54502c66ea83 |
File details
Details for the file sopel_rtfm-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: sopel_rtfm-0.4.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/5.1.0 pkginfo/1.8.1 requests/2.31.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdaf6f646f529b9d0e7d54d64cda1f8a0ba37e7d25d145089e706f2437c87195 |
|
MD5 | afbfd000de8841c91338255167b56ce1 |
|
BLAKE2b-256 | 352a57a3765e7d829e921c66c72d4df6c7c9686d9621e645e1b3b67507a1d6eb |