Possible to automap docs to plugins?

I will often check the docs, ex.:

https://beets.readthedocs.io/en/latest/plugins/fromfilename.html

If I want to dive deeper, I have to go to github and mess around a few folders to go here:

\https://github.com/beetbox/beets/blob/master/beetsplug/fromfilename.py

It seems that most/all plugins have a simple mapping between doc and plugin. What if we made a script that autolinked the two? I care mostly about linking docs to source, but linking source to docs might be helpful too.

Do we even need a script to do this? For the number of plugins we’ve got it’s probably easier to just add a link to the plugin source in each plugin doc.

Edit: I am all for this idea — Home Assistant does something similar (or at least used to) for components, and I’ve found it useful in the past.

1 Like

Seems great! Adding a link manually would be cool. I also wonder if there isn’t some manner of simple Sphinx plugin we can make to do it automatically, without even modifying the relevant files.

1 Like

Wouldn’t sphinx autodoc do this?