I’ve been working on some addons for Anki, and I host the code on GitHub. Publishing the addon to AnkiWeb involves basically copying over all the information I have in the README on the GitHub addon page, and then copying over the files I have in the GitHub repository. Making changes to the addon involves repeating all that process. The only unique action I’m taking on the upload addon page is specifying the versions.
It would be very nice if I could create a GitHub repository for my addon and maintain the code there, and uploading the addon to AnkiWeb would just involve providing the link to that GitHub page.
In this proposed solution, an addon developer would maintain their addon repository on GitHub, and would simply link the repo with the addon page on AnkiWeb. Updating the addon would just be specifying which revisions should be considered “released” in the repository via a template file. Anki users who are navigating the addons page would still see the information, but it would just be pulled from GitHub instead of using the information that would have otherwise been copied over into AnkiWeb during the addon process. Downloading the addon would be, instead of pulling from AnkiWeb’s code, pulling the code from GitHub through the specified “released” version from the aforementioned template file.
Overall, what I’m imagining is a template GitHub repository that developers can clone, containing:
- src folder, where they put the code that will be pulled when downloading or updating addons
- README file, which is what is shown to users on AnkiWeb
- file that specifies the revisions that are “released” to users
- file that specifies which versions of Anki the addon supports
AnkiWeb addon uploading would involve specifying a link to the GitHub repo.
Downloading the addon would work the same:
- A user navigates to an addon page on AnkiWeb, which appears the same to them as before. On that page:
- Existing addon pages continue to work as before
- GitHub addons: display information from GitHub through the specified revision for the README.
- Downloading the addon: behind the scenes, AnkiWeb pulls the code through the specified revision from GitHub and sends it over to the Anki client that’s requesting it.
- MUCH easier maintenance and uploading for addons. Only have to maintain the GitHub repo.
- Versioning for addons, where a developer can release versions of the addon that correspond to different anki versions
- No change for Anki users.
- Requires a sizable update to AnkiWeb