Generate Anki pylib and aqt documentation

If this doesn’t already exist, does anyone have thoughts if Anki could automatically build some HTML API documentation that would be available on the addon-docs site?

It would make understanding the API easier as a beginner. For example, locally I generated some Sphinx documentation using the ReadTheDocs theme (this only took a few minutes to setup):

I have no preference on how the documentation is generated or what theme is used, but I want to first check with others if this is something that makes sense to be done, and if the devs would accept PRs about this (after deciding on the specific design details).

Hosting them online means we either need to deal with multiple versions, or the documentation will change each time a release is made, which may not be helpful for add-on authors that are trying to adapt to changes during the beta period. And I could do without one extra thing to manage :slight_smile: What about just including a script in the desktop repo that generates the docs and opens a browser to them, and then mentioning it in the add-on docs?

What about just including a script in the desktop repo that generates the docs and opens a browser to them, and then mentioning it in the add-on docs?

Sure! If you’re fine with the screenshots above, I can make a PR that generates the static site locally.

And BTW, we could also host the docs on ReadTheDocs (docs[.]readthedocs[.]io/en/latest/index.html, I can’t post links yet), which lets you select different versions and handles it all automatically. But deciding on this doesn’t block getting the scripts into the repo to build the local site, so we don’t have to decide on this now.

A PR would be appreciated!

Just for reference, I created PR 2720 for this on Github (I can’t include links in posts at the moment).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.